From 958806de7aeeef52344daada069ddb77e89e793e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 09:31:54 +0000 Subject: [PATCH 01/50] Bump follow-redirects from 1.14.1 to 1.14.8 in /website Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.1 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.1...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 9e875a2e..7d648611 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -4020,9 +4020,9 @@ flux@^4.0.1: fbjs "^3.0.0" follow-redirects@^1.0.0, follow-redirects@^1.10.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" - integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== + version "1.14.8" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" + integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== for-in@^1.0.2: version "1.0.2" From bbd09bfa2904781114419e82f3d347af3c37d305 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Mon, 21 Feb 2022 11:07:46 +0100 Subject: [PATCH 02/50] Updated sbt version and JDK/scala versions in images --- Dockerfile | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d6acc6fd..9d651f2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ## Build environment. # Java 11, Scala 2.12.13, SBT 1.5.0 included. -FROM hseeberger/scala-sbt:11.0.11-oraclelinux8_1.5.4_2.13.6 as build +FROM hseeberger/scala-sbt:11.0.14.1-oraclelinux8_1.6.2_2.13.8 as build # Build application inside /app WORKDIR /app diff --git a/project/build.properties b/project/build.properties index e67343ae..c8fcab54 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.0 +sbt.version=1.6.2 From 26e9a100e29bda6a78404989ecdad08900cb399e Mon Sep 17 00:00:00 2001 From: Eduardo Ulibarri Toledo <35763574+ulitol97@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:21:07 +0100 Subject: [PATCH 03/50] Updated sbt version and JDK/scala versions in images (#289) --- Dockerfile | 2 +- project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d6acc6fd..9d651f2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ## Build environment. # Java 11, Scala 2.12.13, SBT 1.5.0 included. -FROM hseeberger/scala-sbt:11.0.11-oraclelinux8_1.5.4_2.13.6 as build +FROM hseeberger/scala-sbt:11.0.14.1-oraclelinux8_1.6.2_2.13.8 as build # Build application inside /app WORKDIR /app diff --git a/project/build.properties b/project/build.properties index e67343ae..c8fcab54 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.0 +sbt.version=1.6.2 From ce4f8ab4c4bdcfa3c3a1a4fc36d868f7cfc88b76 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Wed, 23 Feb 2022 10:20:44 +0100 Subject: [PATCH 04/50] Refactored permalink service with mongo4cats, started annotating API with Rho --- build.sbt | 17 +- .../es/weso/rdfshape/server/Server.scala | 65 ++- .../server/api/routes/ApiService.scala | 2 +- .../{APIService.scala => BaseService.scala} | 19 +- .../routes/permalink/logic/Permalink.scala | 60 ++- .../permalink/service/PermalinkService.scala | 380 ++++++++---------- .../implicits/query_parsers/package.scala | 50 +++ .../server/utils/json/JsonUtils.scala | 5 +- .../server/utils/numeric/NumericUtils.scala | 16 +- 9 files changed, 374 insertions(+), 240 deletions(-) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/{APIService.scala => BaseService.scala} (64%) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala diff --git a/build.sbt b/build.sbt index 058f5d0b..7d666f57 100644 --- a/build.sbt +++ b/build.sbt @@ -262,6 +262,7 @@ lazy val server = project http4sBlazeClient, http4sEmberClient, http4sCirce, + rho_swagger, umlShaclex, shexs, shaclex, @@ -274,7 +275,8 @@ lazy val server = project scalaj, wesoUtils % Test, munitEffect % Test, - mongodb + mongo4catsCore, + mongo4catsCirce ) ) @@ -302,9 +304,11 @@ lazy val docs = project lazy val MUnitFramework = new TestFramework("munit.Framework") /* DEPENDENCY versions */ lazy val http4sVersion = "1.0.0-M30" +lazy val rhoVersion = "0.23.0-M1" lazy val catsVersion = "2.7.0" /* ------------------------------------------------------------------------- */ -lazy val mongodbVersion = "4.4.0" +lazy val mongodbVersion = "4.4.1" +lazy val mongo4catsVersion = "0.4.5" lazy val any23Version = "2.4" lazy val rdf4jVersion = "3.7.4" lazy val graphvizJavaVersion = "0.18.1" @@ -328,11 +332,16 @@ lazy val http4sBlazeClient = lazy val http4sEmberClient = "org.http4s" %% "http4s-ember-client" % http4sVersion lazy val http4sCirce = "org.http4s" %% "http4s-circe" % http4sVersion +lazy val rho_swagger = "org.http4s" %% "rho-swagger" % rhoVersion lazy val catsCore = "org.typelevel" %% "cats-core" % catsVersion lazy val catsKernel = "org.typelevel" %% "cats-kernel" % catsVersion lazy val mongodb = "org.mongodb.scala" %% "mongo-scala-driver" % mongodbVersion -lazy val any23_core = "org.apache.any23" % "apache-any23-core" % any23Version -lazy val any23_api = "org.apache.any23" % "apache-any23-api" % any23Version +lazy val mongo4catsCore = + "io.github.kirill5k" %% "mongo4cats-core" % mongo4catsVersion +lazy val mongo4catsCirce = + "io.github.kirill5k" %% "mongo4cats-circe" % mongo4catsVersion +lazy val any23_core = "org.apache.any23" % "apache-any23-core" % any23Version +lazy val any23_api = "org.apache.any23" % "apache-any23-api" % any23Version lazy val any23_scraper = "org.apache.any23.plugins" % "apache-any23-html-scraper" % "2.3" lazy val rdf4j_runtime = "org.eclipse.rdf4j" % "rdf4j-runtime" % rdf4jVersion diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index be1d2b56..bae807f1 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -1,10 +1,10 @@ package es.weso.rdfshape.server import cats.effect._ -import cats.implicits._ +import cats.implicits.{catsSyntaxOptionId, toSemigroupKOps} import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.Server._ -import es.weso.rdfshape.server.api.routes.api.service.APIService +import es.weso.rdfshape.server.api.routes.api.service.BaseService import es.weso.rdfshape.server.api.routes.data.service.DataService import es.weso.rdfshape.server.api.routes.endpoint.service.EndpointService import es.weso.rdfshape.server.api.routes.fetch.service.FetchService @@ -20,6 +20,10 @@ import org.http4s.blaze.client.BlazeClientBuilder import org.http4s.blaze.server.BlazeServerBuilder import org.http4s.client.Client import org.http4s.implicits.http4sKleisliResponseSyntaxOptionT +import org.http4s.rho.RhoMiddleware +import org.http4s.rho.swagger.models._ +import org.http4s.rho.swagger.syntax.{io => ioSwagger} +import org.http4s.rho.swagger.{DefaultSwaggerFormats, SwaggerMetadata} import org.http4s.server.middleware.{CORS, CORSPolicy, Logger} import org.http4s.{HttpApp, HttpRoutes} @@ -193,15 +197,64 @@ object Server { /** Configure the http4s application to use the specified sources as API routes */ private def routesService(client: Client[IO]): HttpRoutes[IO] = { - corsConfiguration.apply( - APIService(client).routes <+> + val allRoutes = + (BaseService(client).routes and PermalinkService(client).routes) + .toRoutes(swaggerMiddleware) <+> DataService(client).routes <+> SchemaService(client).routes <+> ShapeMapService(client).routes <+> WikibaseService(client).routes <+> EndpointService(client).routes <+> - PermalinkService(client).routes <+> FetchService(client).routes - ) + corsConfiguration.apply(allRoutes) } + + /** All route functions composed into one + * @note <+> is part of cats syntax for composing functions + */ +// def allRoutes(client: Client[IO]): HttpRoutes[IO] = +// BaseService(client).routes <+> +// DataService(client).routes <+> +// SchemaService(client).routes <+> +// ShapeMapService(client).routes <+> +// WikibaseService(client).routes <+> +// EndpointService(client).routes <+> +// PermalinkService(client).routes <+> +// FetchService(client).routes + + /** Swagger middleware to transform the RhoService into HttpService + * with an attached Swagger definition + * Includes the base API spec + * @note We use the default API paths; therefore swagger files are in + * /swagger.(json|yml) + */ + lazy val swaggerMiddleware: RhoMiddleware[IO] = + ioSwagger.createRhoMiddleware( + swaggerFormats = DefaultSwaggerFormats, + swaggerMetadata = SwaggerMetadata( + apiInfo = Info( + title = "RDFShape API", + version = + buildinfo.BuildInfo.version, // programmatically get project version + description = + ("RDFShape is web API for semantic data analysis and validation" + + "implemented in Scala using http4s (https://http4s.org/)").some, + contact = Contact( + name = "WESO Research group", + email = "info@weso.es".some, + url = "https://www.weso.es/#contact".some + ).some, + license = License( + name = "Apache 2.0", + url = "https://www.apache.org/licenses/LICENSE-2.0.html" + ).some + ), + host = "api.rdfshape.weso.es".some, + basePath = "/api/".some, + schemes = List(Scheme.HTTP, Scheme.HTTPS), + consumes = List("multipart/form-data"), + produces = List("text/plain; charset=utf-8", "application/json"), + tags = List(Tag(name = "api", description = "RDFShape REST API".some)) + ) + ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala index b33de24e..9990defb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala @@ -6,5 +6,5 @@ trait ApiService { /** The service's characteristic verb, e.g.: "permalink", "data", "wikidata"... */ - val verb: String = "api" + val verb: String } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/APIService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala similarity index 64% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/APIService.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala index 6b97bffe..8bd4a62b 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/APIService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala @@ -3,35 +3,34 @@ package es.weso.rdfshape.server.api.routes.api.service import cats.effect._ import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService -import org.http4s._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl +import org.http4s.rho.RhoRoutes /** API service to handle multiple general tasks (server status, etc.) * * @param client HTTP4S client object */ -class APIService(client: Client[IO]) extends Http4sDsl[IO] with ApiService { +class BaseService(client: Client[IO]) extends Http4sDsl[IO] with ApiService { - override val verb: String = "" + override val verb: String = "base" /** Describe the API routes handled by this service and the actions performed on each of them */ - val routes: HttpRoutes[IO] = HttpRoutes.of[IO] { - - case GET -> Root / `api` / "health" => + val routes: RhoRoutes[IO] = new RhoRoutes[IO] { + GET / `api` / "health" |>> { () => Ok("Healthy") + } } - } -object APIService { +object BaseService { /** Service factory * * @param client Underlying http4s client * @return A new API Service */ - def apply(client: Client[IO]): APIService = - new APIService(client) + def apply(client: Client[IO]): BaseService = + new BaseService(client) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/logic/Permalink.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/logic/Permalink.scala index 2239af64..cb6176e4 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/logic/Permalink.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/logic/Permalink.scala @@ -1,21 +1,55 @@ package es.weso.rdfshape.server.api.routes.permalink.logic -import com.typesafe.scalalogging.LazyLogging +import es.weso.rdfshape.server.utils.numeric.NumericUtils.getRandomInt +import io.circe.syntax.EncoderOps +import io.circe.{Decoder, Encoder, HCursor, Json} +import mongo4cats.bson.ObjectId +import mongo4cats.circe._ -import java.net.URL -import java.util.Date +import java.time.Instant /** Data class representing a permalink * - * @param longUrl Permalink target - * @param code Permalink identifying code - * @param creationDate Permalink identifying code + * @param _id Permalink ID (mongo) + * @param longUrl Permalink target (only the path of the target URL) + * @param urlCode Permalink identifying code + * @param date Date of last usage of the permalink, defaults to its creation date */ -sealed case class Permalink( - longUrl: URL, - code: Long, - creationDate: Date = new Date(), - editionDate: Date -) +final case class Permalink( + _id: ObjectId = ObjectId(), + longUrl: String, + // Time based code + urlCode: Long = s"${Instant.now.getEpochSecond}${getRandomInt()}".toLong, + date: Instant = Instant.now +) { -private[api] object Permalink extends LazyLogging {} + override def toString: String = + s"Link '$urlCode' for '$longUrl' (used '$date')" +} + +/** Companion object for [[Permalink]] including custom circe codecs + */ +private[permalink] object Permalink { + // Forcibly implement codecs so that they are in implicit scope later + implicit val encoder: Encoder[Permalink] = (pm: Permalink) => + Json.obj( + ("_id", pm._id.asJson), + ("longUrl", pm.longUrl.asJson), + ("urlCode", pm.urlCode.asJson), + ("date", pm.date.asJson) + ) + implicit val decoder: Decoder[Permalink] = (cursor: HCursor) => + for { + id <- cursor.downField("_id").as[ObjectId] + longUrl <- cursor.downField("longUrl").as[String] + urlCode <- cursor.downField("urlCode").as[Long] + date <- cursor.downField("date").as[Instant] + + decoded = Permalink( + id, + longUrl, + urlCode, + date + ) + } yield decoded +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala index b1a93178..72f0432d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala @@ -4,25 +4,20 @@ import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService +import es.weso.rdfshape.server.api.routes.permalink.logic.Permalink import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ UrlCodeParameter, UrlParameter } -import org.http4s._ +import es.weso.rdfshape.server.implicits.query_parsers.urlQueryParser +import mongo4cats.circe._ +import mongo4cats.client.MongoClient +import mongo4cats.collection.operations.{Filter, Update} import org.http4s.client.Client import org.http4s.dsl.Http4sDsl -import org.mongodb.scala._ -import org.mongodb.scala.model.Filters.equal -import org.mongodb.scala.model.Updates.set -import org.mongodb.scala.result.{InsertOneResult, UpdateResult} +import org.http4s.rho.RhoRoutes -import java.net.{MalformedURLException, URL} -import java.time.Instant -import java.util.Calendar -import java.util.concurrent.TimeUnit -import scala.concurrent.duration.Duration -import scala.concurrent.{Await, Promise} -import scala.util.Random +import java.net.URL /** API endpoint to handle the permalink service (creation, retrieval, etc.) * @@ -33,233 +28,210 @@ class PermalinkService(client: Client[IO]) with ApiService with LazyLogging { - lazy val mongoClient: MongoClient = MongoClient(mongoConnectionString) - lazy val db: MongoDatabase = mongoClient.getDatabase(mongoDatabase) - lazy val collection: MongoCollection[Document] = - db.getCollection(collectionName) + /** Database user. Can be overridden by environment variables. + */ + private lazy val dbUserName = + sys.env.getOrElse("MONGO_USER", "rdfshape-user") + + /** Database password. Can be overridden by environment variables. + */ + private lazy val dbPassword = + sys.env.getOrElse("MONGO_PASSWORD", "rdfshape-user") + + /** Database name. Can be overridden by environment variables. + */ + private lazy val dbName = + sys.env.getOrElse("MONGO_DATABASE", "rdfshape") + + /** Database collection name. Can be overridden by environment variables. + */ + private lazy val collectionName = + sys.env.getOrElse("MONGO_COLLECTION", "permalinks") + + /** Final connection String formed by interpolating database credentials. + */ + private lazy val connectionString = + s"mongodb+srv://$dbUserName:$dbPassword@cluster0.pnja6.mongodb.net/$dbName" + + "?retryWrites=true&w=majority" + + private lazy val dbClient = + MongoClient.fromConnectionString[IO](connectionString) + override val verb: String = "permalink" - // Utils for url generation - val random: Random.type = Random /** Describe the API routes handled by this service and the actions performed on each of them */ - val routes: HttpRoutes[IO] = HttpRoutes.of[IO] { + val routes: RhoRoutes[IO] = new RhoRoutes[IO] { /** Create a permalink to another resource. * Receives the URL to be linked: * - url [String]: URL to be linked * Returns the permalink unique code in the response body + * + * @note QueryParser already checks for the validity of the URL */ - case GET -> Root / `api` / `verb` / "generate" :? - UrlParameter(url) => - // Store only query path and query params - val urlObj = new URL(url) - val urlPath = s"${urlObj.getPath}?${urlObj.getQuery}" - - val existingUrlCode = retrieveUrlCode(urlPath) - if(existingUrlCode.isDefined) { - Ok(existingUrlCode.get.toString) - } else { - try { - val urlCode = Instant.now.getEpochSecond.toString + random.nextInt(10) - - // Create DB entry - val doc: Document = Document( - // "_id" -> Autogenerated, - "longUrl" -> urlPath, - "urlCode" -> urlCode.toLong, - "date" -> Calendar.getInstance().getTime - ) - - // Insert doc - val observable: Observable[InsertOneResult] = - collection.insertOne(doc) - observable.subscribe(new Observer[InsertOneResult] { - override def onSubscribe(subscription: Subscription): Unit = - subscription.request(1) - - override def onNext(result: InsertOneResult): Unit = - logger.info(s"Created permalink: $url => $urlCode") - - override def onError(e: Throwable): Unit = { - logger.error(s"Permalink creation failed: ${e.getMessage}") - InternalServerError( - s"Could not generate the permalink for url: $url" - ) - } - - override def onComplete(): Unit = - logger.info("Permalink processing completed.") - }) - - Created(urlCode) - - } catch { - case _: MalformedURLException => - BadRequest(s"Invalid URL provided for shortening: $url") - case _: Exception => - InternalServerError( - s"Could not generate the permalink for url: $url" - ) - } - - } + GET / `api` / `verb` / "generate" +? param[URL](UrlParameter.name) |>> { + (urlObj: URL) => + // Extract the relevant info from the URL + val urlPath = extractUrlPathAndQuery(urlObj) + for { + // Check if the permalink exists + optExistingPermalink <- getPermalinkByUrl(urlPath) + response <- optExistingPermalink match { + // Exists, return its code + case Some(pm) => + Ok(pm.urlCode.toString) + // Does not exist, create it + case None => + // Create permalink model object + val newPermalink = Permalink(longUrl = urlPath) + insertPermalink(newPermalink).flatMap { + // Inserted, return code + case Some(pm) => Created(pm.urlCode.toString) + // Not inserted, return generic error + case None => + InternalServerError( + s"Could not generate the permalink for url: $urlObj" + ) + } + } + } yield response + } /** Retrieve a URL to a resource given its permalink code. * Receives the permalink code to be checked: - * - urlCode [String]: code to be checked + * - urlCode [Long]: code to be checked * Returns the permalink target (if present in the database) in the response body */ - case GET -> Root / `api` / `verb` / "get" :? - UrlCodeParameter(urlCode) => - try { - val code = urlCode.toLong - val promise = Promise[IO[Response[IO]]]() - + GET / `api` / `verb` / "get" +? param[Long](UrlCodeParameter.name) |>> { + urlCode: Long => // Fetch document in database - val observable: SingleObservable[Document] = - collection.find(equal("urlCode", code)).first() - observable.subscribe(new Observer[Document] { - - override def onSubscribe(subscription: Subscription): Unit = - subscription.request(1) - - override def onNext(result: Document): Unit = { - val longUrl = result.getString("longUrl") - val urlCode = result.getLong("urlCode") - - logger.info(s"Retrieved original url: $urlCode => $longUrl") - promise.success(Ok(longUrl)) - - // Refresh use date of the link - updateUrl(urlCode) - } - - override def onError(e: Throwable): Unit = { - logger.error(s"Original url recovery failed: ${e.getMessage}") - promise.success( - BadGateway(s"Original url recovery failed for code: $urlCode") - ) - } - - override def onComplete(): Unit = { - if(!promise.isCompleted) { - logger.warn(s"Could not find the original url for code: $urlCode") - promise.success( - NotFound(s"Could not find the original url for code: $urlCode") + for { + optExistingPermalink <- getPermalinkByCode(urlCode) + response <- optExistingPermalink match { + // Exists, return its code + case Some(pm) => + logger.info( + s"Retrieved original url: ${pm.urlCode} => ${pm.longUrl}" ) - } - logger.info("Permalink processing completed.") + Ok(pm.longUrl) + // Does not exist, return error + case None => + val msg = s"Could not find the permalink with code: $urlCode" + logger.warn(msg) + NotFound(msg) } - }) - - val result = Await.result(promise.future, Duration(8, TimeUnit.SECONDS)) - result - - } catch { - case _: NumberFormatException => - BadRequest(s"Invalid permalink code: $urlCode") - case _: Exception => - InternalServerError( - s"Could not execute the request for the permalink with code: $urlCode" - ) - } + } yield response + } } - // DB credentials. Access is limited to application needs. - /** Database user. Can be overridden by environment variables. - */ - private val mongoUser = sys.env.getOrElse("MONGO_USER", "rdfshape-user") - /** Database password. Can be overridden by environment variables. + /** @param url URL object used as input + * @return A String containing the query path followed by the query string, if any + * @example http://google.com/es => /es + * @example http://google.com/es?param=value => /es?param=value */ - private val mongoPassword = - sys.env.getOrElse("MONGO_PASSWORD", "rdfshape-user") - - /** Database name. Can be overridden by environment variables. - */ - private val mongoDatabase = sys.env.getOrElse("MONGO_DATABASE", "rdfshape") - - /** Database collection name. Can be overridden by environment variables. - */ - private val collectionName = - sys.env.getOrElse("MONGO_COLLECTION", "permalinks") + private def extractUrlPathAndQuery(url: URL): String = { + Option(url.getQuery) match { + case Some(queryString) => s"${url.getPath}?$queryString" + case None => url.getPath + } + } - /** Final connection String formed by interpolating database credentials. + /** Given a possible permalink code, get its corresponding permalink + * + * @param urlCode Permalink code for which we want to find the permalink + * @return Optionally, the Permalink with the given code */ - private val mongoConnectionString = - s"mongodb+srv://$mongoUser:$mongoPassword@cluster0.pnja6.mongodb.net/$mongoDatabase" + - "?retryWrites=true&w=majority" + private def getPermalinkByCode(urlCode: Long): IO[Option[Permalink]] = { + logger.debug(s"Retrieve permalink with code: $urlCode") + val codeFilter = Filter.eq("urlCode", urlCode) + retrievePermalink(codeFilter) + } - /** Given a URL, search for a permalink already targeting it. + /** Given the path of a URL, get the permalink already targeting it, if any * * @param urlPath URL which we want to find a permalink for - * @return Optionally, the identifier of the permalink targeting the given URL - * @note This is internally used to prevent creating multiple permalinks for the same targets. - * Instead, the access-date of the permalink is updated. + * @return Optionally, the Permalink targeting the given URL */ - private def retrieveUrlCode(urlPath: String): Option[Long] = { - - val promise = Promise[Option[Long]]() - - // Fetch document in database - val observable: SingleObservable[Document] = - collection.find(equal("longUrl", urlPath)).first() - observable.subscribe(new Observer[Document] { - override def onSubscribe(subscription: Subscription): Unit = - subscription.request(1) - - override def onNext(result: Document): Unit = { - val urlCode = result.getLong("urlCode") - - logger.info(s"Retrieved permalink: $urlPath => $urlCode") - promise.success(Option(urlCode)) - - // Refresh use date of the link - updateUrl(urlCode) - } - - override def onError(e: Throwable): Unit = { - logger.error(s"Permalink recovery failed: ${e.getMessage}") - promise.success(None) - } + private def getPermalinkByUrl(urlPath: String): IO[Option[Permalink]] = { + logger.debug(s"Retrieve permalink for URL: $urlPath") + val sameUrlPathFilter = Filter.eq("longUrl", urlPath) + retrievePermalink(sameUrlPathFilter) + } - override def onComplete(): Unit = { - if(!promise.isCompleted) { - logger.error(s"Could not find the permalink for url: $urlPath") - promise.success(None) + /** Given a condition, search for a permalink fulfilling it. + * + * @param filter Filter used to to find the permalink + * @param updateDate Whether to update the access-date of the permalink when + * retrieved to mark its last usage + * @return Optionally, the Permalink already fulfilling the condition + */ + private def retrievePermalink( + filter: Filter, + updateDate: Boolean = true + ): IO[Option[Permalink]] = { + // Connect to check for already existing links to the target + dbClient + .use(client => { + for { + db <- client.getDatabase(dbName) + col <- db.getCollectionWithCodec[Permalink](collectionName) + existingPermalink <- col.find(filter).first + } yield existingPermalink match { + // Refresh the use date of the link if found + case Some(permalink) if updateDate => updatePermalinkUsage(permalink) + case Some(_) | None => IO.pure(existingPermalink) } - logger.info("Permalink processing completed.") - } - }) - - val result = Await.result(promise.future, Duration(8, TimeUnit.SECONDS)) - result + }) + .flatten } /** Update the access date of a given permalink (invoked when it is accessed) * - * @param code Unique identofier of the permalink + * @param permalink Permalink to be updated */ - private def updateUrl(code: Long): Unit = { - logger.debug(s"URL code to update: $code") - // Update date of document in database - val observable: SingleObservable[UpdateResult] = collection.updateOne( - equal("urlCode", code), - set("date", Calendar.getInstance().getTime) - ) - - observable.subscribe(new Observer[UpdateResult] { - override def onSubscribe(subscription: Subscription): Unit = - subscription.request(1) - - override def onNext(result: UpdateResult): Unit = { - logger.debug(s"Refreshed date of permalink: $code") - } - - override def onError(e: Throwable): Unit = () + private def updatePermalinkUsage( + permalink: Permalink + ): IO[Option[Permalink]] = { + logger.debug(s"Permalink update: $permalink") + + // Create filter to query the database + val sameCodeFilter = Filter.eq("urlCode", permalink.urlCode) + // Create update to be applied + val usageDateUpdate = Update.currentDate("date") + + // Connect to update matching links + dbClient + .use(client => { + for { + db <- client.getDatabase(dbName) + col <- db.getCollectionWithCodec[Permalink](collectionName) + update <- col.findOneAndUpdate(sameCodeFilter, usageDateUpdate) + } yield update + }) + } - override def onComplete(): Unit = () - }) + /** Insert a given permalink in the database + * + * @param permalink Permalink to be inserted + */ + private def insertPermalink( + permalink: Permalink + ): IO[Option[Permalink]] = { + logger.debug(s"Permalink insert: $permalink") + + // Connect and insert + dbClient + .use(client => { + for { + db <- client.getDatabase(dbName) + col <- db.getCollectionWithCodec[Permalink](collectionName) + insertion <- col.insertOne(permalink) + } yield + if(insertion.wasAcknowledged) { + Some(permalink) + } else None + }) } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala new file mode 100644 index 00000000..5cc0ae62 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala @@ -0,0 +1,50 @@ +package es.weso.rdfshape.server.implicits + +import cats.effect.IO +import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson +import org.http4s.Status._ +import org.http4s.rho.bits.QueryParser.Params +import org.http4s.rho.bits.{FailureResponse, QueryParser, SuccessResponse} + +import java.net.{MalformedURLException, URL} +import scala.util.{Failure, Success, Try} + +/** Custom query parsers used by Rho when parsing query parameters to complex datatypes + */ +package object query_parsers { + + /** Parse the given URL parameter to an instance of [[java.net.URL]] + * or return an error response + */ + implicit val urlQueryParser: QueryParser[IO, URL] = + (name: String, params: Params, _: Option[URL]) => + params.get(name) match { + case Some(Seq(value, _*)) if !value.isBlank => + Try { + new URL(value) + } match { + case Success(urlObj) => SuccessResponse(urlObj) + case Failure(exception) => + exception match { + case _: MalformedURLException => + FailureResponse.pure( + errorResponseJson( + s"Invalid URL provided for shortening: $value", + BadRequest + ) + ) + case _ => + FailureResponse.pure( + errorResponseJson( + s"Failed to parse the URL sent in the request: $value", + InternalServerError + ) + ) + } + } + case _ => + FailureResponse.pure( + errorResponseJson(s"Missing query param: $name", BadRequest) + ) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/json/JsonUtils.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/json/JsonUtils.scala index 94f44fd1..79e1d4c0 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/json/JsonUtils.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/json/JsonUtils.scala @@ -74,7 +74,10 @@ object JsonUtils extends Http4sDsl[IO] { * @param status Desired HTTP status of the response * @return The response object, ready to be dispatched elsewhere */ - def errorResponseJson(msg: String, status: Status = Ok): IO[Response[IO]] = { + def errorResponseJson( + msg: String, + status: Status = InternalServerError + ): IO[Response[IO]] = { val responseMessage = mkJsonError(msg) mapStatusCodes(status) match { case Status.Created => Created(responseMessage) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/numeric/NumericUtils.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/numeric/NumericUtils.scala index 9ef106e7..ea08c0ab 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/numeric/NumericUtils.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/numeric/NumericUtils.scala @@ -1,11 +1,15 @@ package es.weso.rdfshape.server.utils.numeric -import scala.util.Try +import scala.util.{Random, Try} /** Utilities related to math */ case object NumericUtils { + /** Random generator to help creating random amounts + */ + private lazy val random = Random + /** Try to parse an integer * * @param str Text chain to be parsed @@ -14,4 +18,14 @@ case object NumericUtils { def parseInt(str: String): Either[String, Int] = Try(str.toInt).map(Right(_)).getOrElse(Left(s"$str is not a number")) + /** Generate a random integer in a given range + * + * @param min Lower limit (inclusive) + * @param max Upper limit (exclusive) + * @return A random Int in range [min-max) + */ + def getRandomInt(min: Int = 0, max: Int = 10): Int = { + random.between(min, max) + } + } From 0b5b61893fc91790d86e6aa2d755752a46ea39f1 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Wed, 23 Feb 2022 11:41:50 +0100 Subject: [PATCH 05/50] Annotated fetch service with Rho --- .../es/weso/rdfshape/server/Server.scala | 54 ++++--------------- .../routes/fetch/service/FetchService.scala | 14 ++--- .../rdfshape/server/api/swagger/package.scala | 47 ++++++++++++++++ .../implicits/query_parsers/package.scala | 2 +- 4 files changed, 66 insertions(+), 51 deletions(-) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index bae807f1..80aff3ba 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -1,7 +1,7 @@ package es.weso.rdfshape.server import cats.effect._ -import cats.implicits.{catsSyntaxOptionId, toSemigroupKOps} +import cats.implicits.toSemigroupKOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.Server._ import es.weso.rdfshape.server.api.routes.api.service.BaseService @@ -12,6 +12,7 @@ import es.weso.rdfshape.server.api.routes.permalink.service.PermalinkService import es.weso.rdfshape.server.api.routes.schema.service.SchemaService import es.weso.rdfshape.server.api.routes.shapemap.service.ShapeMapService import es.weso.rdfshape.server.api.routes.wikibase.service.WikibaseService +import es.weso.rdfshape.server.api.swagger.swaggerMiddleware import es.weso.rdfshape.server.utils.error.exceptions.SSLContextCreationException import es.weso.rdfshape.server.utils.error.{ExitCodes, SysUtils} import es.weso.rdfshape.server.utils.secure.SSLHelper @@ -20,10 +21,6 @@ import org.http4s.blaze.client.BlazeClientBuilder import org.http4s.blaze.server.BlazeServerBuilder import org.http4s.client.Client import org.http4s.implicits.http4sKleisliResponseSyntaxOptionT -import org.http4s.rho.RhoMiddleware -import org.http4s.rho.swagger.models._ -import org.http4s.rho.swagger.syntax.{io => ioSwagger} -import org.http4s.rho.swagger.{DefaultSwaggerFormats, SwaggerMetadata} import org.http4s.server.middleware.{CORS, CORSPolicy, Logger} import org.http4s.{HttpApp, HttpRoutes} @@ -197,15 +194,19 @@ object Server { /** Configure the http4s application to use the specified sources as API routes */ private def routesService(client: Client[IO]): HttpRoutes[IO] = { + val routesFromRho = + (BaseService(client).routes and + PermalinkService(client).routes and + FetchService(client).routes) + .toRoutes(swaggerMiddleware) val allRoutes = - (BaseService(client).routes and PermalinkService(client).routes) - .toRoutes(swaggerMiddleware) <+> + routesFromRho <+> DataService(client).routes <+> SchemaService(client).routes <+> ShapeMapService(client).routes <+> WikibaseService(client).routes <+> - EndpointService(client).routes <+> - FetchService(client).routes + EndpointService(client).routes + corsConfiguration.apply(allRoutes) } @@ -222,39 +223,4 @@ object Server { // PermalinkService(client).routes <+> // FetchService(client).routes - /** Swagger middleware to transform the RhoService into HttpService - * with an attached Swagger definition - * Includes the base API spec - * @note We use the default API paths; therefore swagger files are in - * /swagger.(json|yml) - */ - lazy val swaggerMiddleware: RhoMiddleware[IO] = - ioSwagger.createRhoMiddleware( - swaggerFormats = DefaultSwaggerFormats, - swaggerMetadata = SwaggerMetadata( - apiInfo = Info( - title = "RDFShape API", - version = - buildinfo.BuildInfo.version, // programmatically get project version - description = - ("RDFShape is web API for semantic data analysis and validation" + - "implemented in Scala using http4s (https://http4s.org/)").some, - contact = Contact( - name = "WESO Research group", - email = "info@weso.es".some, - url = "https://www.weso.es/#contact".some - ).some, - license = License( - name = "Apache 2.0", - url = "https://www.apache.org/licenses/LICENSE-2.0.html" - ).some - ), - host = "api.rdfshape.weso.es".some, - basePath = "/api/".some, - schemes = List(Scheme.HTTP, Scheme.HTTPS), - consumes = List("multipart/form-data"), - produces = List("text/plain; charset=utf-8", "application/json"), - tags = List(Tag(name = "api", description = "RDFShape REST API".some)) - ) - ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala index 3f830901..b5d6ed27 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala @@ -5,11 +5,13 @@ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.UrlParameter -import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson +import es.weso.rdfshape.server.implicits.query_parsers.urlQueryParser import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents -import org.http4s._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl +import org.http4s.rho.RhoRoutes + +import java.net.URL class FetchService() extends Http4sDsl[IO] with ApiService with LazyLogging { @@ -17,19 +19,19 @@ class FetchService() extends Http4sDsl[IO] with ApiService with LazyLogging { /** Describe the API routes handled by this service and the actions performed on each of them */ - val routes: HttpRoutes[IO] = HttpRoutes.of[IO] { + val routes: RhoRoutes[IO] = new RhoRoutes[IO] { /** Query a given URL and return the response. * Receives the URL to be queried: * - url [String]: URL to be queried * Returns the URL contents (response body) */ - case GET -> Root / `api` / `verb` :? - UrlParameter(url) => + GET / `api` / `verb` +? param[URL](UrlParameter.name) |>> { (url: URL) => getUrlContents(url) match { - case Left(err) => errorResponseJson(err, InternalServerError) + case Left(err) => InternalServerError(err) case Right(content) => Ok(content) } + } } case class RequestData(domain: String, url: String) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala new file mode 100644 index 00000000..550b90dd --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -0,0 +1,47 @@ +package es.weso.rdfshape.server.api + +import cats.effect.IO +import cats.implicits.catsSyntaxOptionId +import org.http4s.rho.RhoMiddleware +import org.http4s.rho.swagger.models._ +import org.http4s.rho.swagger.syntax.{io => ioSwagger} +import org.http4s.rho.swagger.{DefaultSwaggerFormats, SwaggerMetadata} + +package object swagger { + + /** Swagger middleware to transform RhoServices into HttpServices + * with an attached Swagger definition + * Includes the base API spec + * @note We use the default API paths; therefore swagger files are in + * /swagger.(json|yml) + */ + lazy val swaggerMiddleware: RhoMiddleware[IO] = + ioSwagger.createRhoMiddleware( + swaggerFormats = DefaultSwaggerFormats, + swaggerMetadata = SwaggerMetadata( + apiInfo = Info( + title = "RDFShape API", + version = + buildinfo.BuildInfo.version, // programmatically get project version + description = + ("RDFShape is web API for semantic data analysis and validation" + + "implemented in Scala using http4s (https://http4s.org/)").some, + contact = Contact( + name = "WESO Research group", + email = "info@weso.es".some, + url = "https://www.weso.es/#contact".some + ).some, + license = License( + name = "Apache 2.0", + url = "https://www.apache.org/licenses/LICENSE-2.0.html" + ).some + ), + host = "api.rdfshape.weso.es".some, + basePath = "/api/".some, + schemes = List(Scheme.HTTP, Scheme.HTTPS), + consumes = List("multipart/form-data"), + produces = List("text/plain; charset=utf-8", "application/json"), + tags = List(Tag(name = "api", description = "RDFShape REST API".some)) + ) + ) +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala index 5cc0ae62..da6edb2a 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala @@ -9,7 +9,7 @@ import org.http4s.rho.bits.{FailureResponse, QueryParser, SuccessResponse} import java.net.{MalformedURLException, URL} import scala.util.{Failure, Success, Try} -/** Custom query parsers used by Rho when parsing query parameters to complex datatypes +/** Custom query parsers used by Rho when parsing query parameters to complex data-types */ package object query_parsers { From f5730e79105f8d44754493fb0dd999bd2211ab61 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Wed, 23 Feb 2022 20:39:22 +0100 Subject: [PATCH 06/50] Started documenting and validating client data with Rho (Endpoint service) --- .../es/weso/rdfshape/server/Server.scala | 4 +- .../server/api/ServiceRouteOperation.scala | 16 +++ .../data/logic/operations/DataQuery.scala | 2 +- .../api/routes/endpoint/logic/Outgoing.scala | 22 ++-- .../endpoint/logic/query/SparqlQuery.scala | 111 ++++++++++------ .../logic/query/SparqlQuerySource.scala | 2 +- .../endpoint/service/EndpointService.scala | 122 +++++++----------- .../operations/EndpointOutgoingInput.scala | 38 ++++++ .../permalink/service/PermalinkService.scala | 22 ++-- .../logic/model/wikibase/Wikibase.scala | 2 +- .../operations/WikibaseOperationDetails.scala | 2 +- .../rdfshape/server/api/swagger/package.scala | 88 ++++++++++++- .../IncomingRequestParameters.scala | 22 ++++ .../server/implicits/codecs/package.scala | 28 ++++ .../implicits/query_parsers/package.scala | 1 + .../server/utils/codec/CodecUtils.scala | 14 -- 16 files changed, 339 insertions(+), 157 deletions(-) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala delete mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/utils/codec/CodecUtils.scala diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index 80aff3ba..d311e2d4 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -197,6 +197,7 @@ object Server { val routesFromRho = (BaseService(client).routes and PermalinkService(client).routes and + EndpointService(client).routes and FetchService(client).routes) .toRoutes(swaggerMiddleware) val allRoutes = @@ -204,8 +205,7 @@ object Server { DataService(client).routes <+> SchemaService(client).routes <+> ShapeMapService(client).routes <+> - WikibaseService(client).routes <+> - EndpointService(client).routes + WikibaseService(client).routes corsConfiguration.apply(allRoutes) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala new file mode 100644 index 00000000..8192cef5 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala @@ -0,0 +1,16 @@ +package es.weso.rdfshape.server.api + +import io.circe.Decoder + +/** This trait defines an operation performed by a route in a service + * and the way to decode the incoming data into the required object + * + * @tparam C Type into which the client data will be decoded for usage in this route + */ +trait ServiceRouteOperation[C] { + + /** Decoder in charge of converting the data sent by the client to a + * usable domain structure + */ + implicit val decoder: Decoder[Either[String, C]] +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala index 8437503e..3cb60fc7 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala @@ -36,7 +36,7 @@ private[api] object DataQuery { */ def dataQuery(data: Data, query: SparqlQuery): IO[DataQuery] = - query.rawQuery match { + query.fetchedQueryContents match { case Left(err) => IO.raiseError(new RuntimeException(err)) case Right(raw) => for { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Outgoing.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Outgoing.scala index b214a45a..f9f78db9 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Outgoing.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Outgoing.scala @@ -2,14 +2,14 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic import cats.data.EitherT import cats.effect.IO -import cats.implicits._ import es.weso.rdf.jena.{Endpoint => EndpointJena} import es.weso.rdf.nodes.{IRI, RDFNode} import es.weso.rdf.triples.RDFTriple -import es.weso.rdfshape.server.utils.numeric.NumericUtils import es.weso.utils.IOUtils.{ESIO, stream2es} import io.circe.{Encoder, Json} +import java.net.URL + case class Outgoing(node: IRI, endpoint: IRI, children: Children) case class Children(m: Map[IRI, Vector[Value]]) @@ -20,24 +20,18 @@ object Outgoing { val noChildren: Children = Children(Map()) def getOutgoing( - optEndpoint: Option[String], - optNode: Option[String], - optLimit: Option[String] + endpoint: URL, + node: String, + optLimit: Option[Int] = Some(1) ): EitherT[IO, String, Outgoing] = { for { endpointIRI <- EitherT.fromEither[IO]( - Either - .fromOption(optEndpoint, "No endpoint provided") - .flatMap(IRI.fromString(_)) + IRI.fromString(endpoint.toString) ) node <- EitherT.fromEither[IO]( - Either - .fromOption(optNode, "No node provided") - .flatMap(IRI.fromString(_)) - ) - limit <- EitherT.fromEither[IO]( - NumericUtils.parseInt(optLimit.getOrElse("1")) + IRI.fromString(node) ) + limit = optLimit.getOrElse(1) o <- outgoing(endpointIRI, node, limit) } yield o } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala index 23ec05c4..e185814d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala @@ -1,27 +1,24 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic.query import cats.effect.IO +import cats.implicits.{catsSyntaxEitherId, toBifunctorOps} import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuerySource.{ - SparqlQuerySource, - defaultQuerySource -} -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ - QueryParameter, - QuerySourceParameter -} +import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuerySource.{SparqlQuerySource, defaultQuerySource} +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ContentParameter, QueryParameter, QuerySourceParameter, SourceParameter} import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents +import io.circe._ import io.circe.syntax.EncoderOps -import io.circe.{Encoder, Json} + +import scala.util.Try /** Data class representing a SPARQL query and its current source * - * @param queryPre Query contents, as received before being processed depending on the [[querySource]] + * @param queryContent Query contents, as received before being processed depending on the [[querySource]] * @param querySource Active source, used to know which source the query comes from */ sealed case class SparqlQuery private ( - private val queryPre: Option[String], + private val queryContent: String, querySource: SparqlQuerySource ) extends LazyLogging { @@ -30,40 +27,78 @@ sealed case class SparqlQuery private ( * * @return Either an error building the query text or a String containing the final text of the SPARQL query */ - lazy val rawQuery: Either[String, String] = - queryPre.map(_.trim) match { - case None | Some("") => Left("Could not build the query from empty data") - - case Some(userQuery) => - querySource match { - case SparqlQuerySource.TEXT | SparqlQuerySource.FILE => - Right(userQuery) - case SparqlQuerySource.URL => - getUrlContents(userQuery) - - case other => - val msg = s"Unknown query source: $other" - logger.warn(msg) - Left(msg) - } + lazy val fetchedQueryContents: Either[String, String] = + querySource match { + case SparqlQuerySource.URL => + getUrlContents(queryContent) + + // Text or file + case _ => + Right(queryContent) + } + + assume(fetchedQueryContents.isRight, + fetchedQueryContents.left.getOrElse("Unknown error")) + + /** + * Raw query value, i.e.: the text forming the query + * @note It is safely extracted fromm [[fetchedQueryContents]] after asserting + * the contents are right + */ + val rawQuery: String = fetchedQueryContents.toOption.get + + } private[api] object SparqlQuery extends LazyLogging { - implicit val encodeSparqlQuery: Encoder[SparqlQuery] = + /** + * Encoder [[SparqlQuery]] => [[Json]] + */ + implicit val encoder: Encoder[SparqlQuery] = (query: SparqlQuery) => Json.obj( - ("query", query.rawQuery.toOption.asJson), + ("query", query.fetchedQueryContents.toOption.asJson), ("source", query.querySource.asJson) ) - /** Placeholder value used for the sparql query whenever an empty query is issued/needed. - */ - private val emptyQuery = SparqlQuery( - queryPre = None, - querySource = defaultQuerySource - ) + /** + * Decoder [[Json]] => [[SparqlQuery]] + * @note Returns an either whose left contains specific errors building the query + */ + implicit val decoder: Decoder[Either[String, SparqlQuery]] = + (cursor: HCursor) => { + // Get request data + val queryData = for { + queryContent <- cursor + .downField(ContentParameter.name) + .as[String] + .map(_.trim) + querySource <- cursor + .downField(SourceParameter.name) + .as[SparqlQuerySource] + + } yield (queryContent, querySource) + + // Safety checks: non empty query content and valid query source + queryData.map { + // Destructure + case (content, source) => + if(content.isBlank) + "Could not build the query from empty data".asLeft[SparqlQuery] + else if( + source != SparqlQuerySource.TEXT && source != SparqlQuerySource.URL && source != SparqlQuerySource.FILE + ) + s"Unknown query source: \"$source\"".asLeft[SparqlQuery] + else { + // Try to build a query, catch the exception as error message if needed + Try { + SparqlQuery(content, source) + }.toEither.leftMap( err => s"Could not build the SPARQL query from user data:\n ${err.getMessage}") + } + } + } /** Given a request's parameters, try to extract a SPARQL query from them * @@ -100,12 +135,12 @@ private[api] object SparqlQuery extends LazyLogging { ): IO[Either[String, SparqlQuery]] = for { query <- IO { - emptyQuery.copy( - queryPre = queryStr, + SparqlQuery( + queryContent = queryStr.getOrElse(""), querySource = activeQuerySource.getOrElse(defaultQuerySource) ) } - } yield query.rawQuery.fold( + } yield query.fetchedQueryContents.fold( // If the query text built is blank, an error occurred err => Left(err), _ => Right(query) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala index 85abd97c..50c612df 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala @@ -5,7 +5,7 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic.query * to be fetched or as a text file containing the query. * In case the client submits the query in several formats, the selected source will indicate the one format. */ -private[logic] object SparqlQuerySource extends Enumeration { +private[api] object SparqlQuerySource extends Enumeration { type SparqlQuerySource = String val TEXT = "byText" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala index 6a987420..ef3f0d2c 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala @@ -1,33 +1,22 @@ package es.weso.rdfshape.server.api.routes.endpoint.service -import cats.data.EitherT import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService -import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.{ - getEndpointAsRDFReader, - getEndpointUrl -} -import es.weso.rdfshape.server.api.routes.endpoint.logic.Outgoing -import es.weso.rdfshape.server.api.routes.endpoint.logic.Outgoing.getOutgoing -import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery -import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery.mkSparqlQuery -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ - EndpointParameter, - LimitParameter, - NodeParameter -} -import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson -import es.weso.utils.IOUtils._ -import io.circe.Json +import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.getEndpointAsRDFReader +import es.weso.rdfshape.server.api.routes.endpoint.logic.Outgoing._ +import es.weso.rdfshape.server.api.routes.endpoint.service.operations.EndpointOutgoingInput +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ +import es.weso.rdfshape.server.implicits.query_parsers.urlQueryParser +import es.weso.utils.IOUtils.io2es import io.circe.syntax.EncoderOps -import org.http4s._ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl._ -import org.http4s.multipart._ +import org.http4s.rho.RhoRoutes + +import java.net.URL /** API service to handle endpoints and operations targeted to them (queries, etc.) * @@ -42,10 +31,11 @@ class EndpointService(client: Client[IO]) /** Describe the API routes handled by this service and the actions performed on each of them */ - def routes: HttpRoutes[IO] = HttpRoutes.of[IO] { + def routes: RhoRoutes[IO] = new RhoRoutes[IO] { /** Perform a SPARQL query targeted to a specific endpoint. * Receives a JSON object with the input endpoint query: + * - endpoint [URL]: Query target endpoint * - query [String]: User input for the query * - querySource [String]: Identifies the source of the query (raw, URL, file...) * Returns a JSON object with the query results: @@ -56,51 +46,33 @@ class EndpointService(client: Client[IO]) */ /** */ - case req @ POST -> Root / `api` / `verb` / "query" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - - val r: EitherT[IO, String, Json] = for { - endpointUrl <- EitherT(getEndpointUrl(partsMap)) - endpoint <- getEndpointAsRDFReader(endpointUrl) - either <- EitherT - .liftF[IO, String, Either[ - String, - SparqlQuery - ]]( - mkSparqlQuery(partsMap) - ) - eitherQuery <- EitherT.fromEither[IO](either) - - json <- { - eitherQuery.rawQuery.fold( - err => EitherT.left(IO.pure(err)), - raw => { - logger.debug(s"Query to endpoint $endpoint: $raw") - io2es(endpoint.queryAsJson(raw)) - } - ) + POST / `api` / `verb` / "query" ^ jsonOf[ + IO, + Either[String, EndpointOutgoingInput] + ] |>> { (body: Either[String, EndpointOutgoingInput]) => + body match { + // Return any error accumulated during the parsing of the body + case Left(err) => BadRequest(err) + case Right(EndpointOutgoingInput(endpointUrl, queryObject)) => + + val ioResponse = for { + endpoint <- getEndpointAsRDFReader(endpointUrl) + _ = logger.debug(s"Query to \"$endpointUrl\": \"${queryObject.rawQuery}\"") + queryResponse <- io2es(endpoint.queryAsJson(queryObject.rawQuery)) + } yield queryResponse + + ioResponse.value.flatMap { + case Left(err) => InternalServerError(err) + case Right(json) => Ok(json) } - } yield json - - for { - either <- r.value - resp <- either.fold( - e => - errorResponseJson( - s"Query failed. $e", - InternalServerError - ), - json => Ok(json) - ) - } yield resp } + } /** Attempt to contact a wikibase endpoint and return the data (triplets) about a node in it. * Receives a JSON object with the input endpoint, node and limits: - * - endpoint [String]: Target endpoint + * - endpoint [URL]: Query target endpoint * - node [String]: Node identifier in the target wikibase - * - limit [Int]: Max number of results + * - limit [Int]: Max number of results, defaults to one * Returns a JSON object with the endpoint response: * - endpoint [String]: Target endpoint * - node [String]: Node identifier in the target wikibase @@ -108,20 +80,25 @@ class EndpointService(client: Client[IO]) * - pred: [String]: Predicate identifier in the target wikibase * - values: [Array]: List of raw values for the entity and predicate */ - case GET -> Root / `api` / `verb` / "outgoing" :? - EndpointParameter(optEndpoint) +& - NodeParameter(optNode) +& - LimitParameter(optLimit) => - for { - eitherOutgoing <- getOutgoing(optEndpoint, optNode, optLimit).value - resp <- eitherOutgoing.fold( - (s: String) => errorResponseJson(s"Error: $s", InternalServerError), - (outgoing: Outgoing) => Ok(outgoing.asJson) - ) - } yield resp + GET / `api` / `verb` / "outgoing" +? + param[URL](EndpointParameter.name) & + param[String](NodeParameter.name) & + param[Option[Int]](LimitParameter.name) |>> { + (endpointUrl: URL, node: String, limit: Option[Int]) => + for { + eitherOutgoing <- getOutgoing( + endpointUrl, + node, + limit + ).value + resp <- eitherOutgoing.fold( + err => InternalServerError(s"Error: $err"), + outgoing => Ok(outgoing.asJson) + ) + } yield resp + } } - } object EndpointService { @@ -133,4 +110,5 @@ object EndpointService { */ def apply(client: Client[IO]): EndpointService = new EndpointService(client) + } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala new file mode 100644 index 00000000..fc06fc1a --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala @@ -0,0 +1,38 @@ +package es.weso.rdfshape.server.api.routes.endpoint.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + EndpointParameter, + QueryParameter +} +import es.weso.rdfshape.server.implicits.codecs.decodeUrl +import io.circe.{Decoder, HCursor} + +import java.net.URL + +case class EndpointOutgoingInput(endpoint: URL, query: SparqlQuery) + +object EndpointOutgoingInput + extends ServiceRouteOperation[EndpointOutgoingInput] { + + override implicit val decoder + : Decoder[Either[String, EndpointOutgoingInput]] = + (cursor: HCursor) => { + for { + maybeEndpoint <- cursor + .downField(EndpointParameter.name) + .as[Either[String, URL]] + + maybeQuery <- cursor + .downField(QueryParameter.name) + .as[Either[String, SparqlQuery]] + + decoded = for { + endpoint <- maybeEndpoint + query <- maybeQuery + } yield EndpointOutgoingInput(endpoint, query) + + } yield decoded + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala index 72f0432d..7f2ac4b1 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala @@ -148,17 +148,6 @@ class PermalinkService(client: Client[IO]) retrievePermalink(codeFilter) } - /** Given the path of a URL, get the permalink already targeting it, if any - * - * @param urlPath URL which we want to find a permalink for - * @return Optionally, the Permalink targeting the given URL - */ - private def getPermalinkByUrl(urlPath: String): IO[Option[Permalink]] = { - logger.debug(s"Retrieve permalink for URL: $urlPath") - val sameUrlPathFilter = Filter.eq("longUrl", urlPath) - retrievePermalink(sameUrlPathFilter) - } - /** Given a condition, search for a permalink fulfilling it. * * @param filter Filter used to to find the permalink @@ -211,6 +200,17 @@ class PermalinkService(client: Client[IO]) }) } + /** Given the path of a URL, get the permalink already targeting it, if any + * + * @param urlPath URL which we want to find a permalink for + * @return Optionally, the Permalink targeting the given URL + */ + private def getPermalinkByUrl(urlPath: String): IO[Option[Permalink]] = { + logger.debug(s"Retrieve permalink for URL: $urlPath") + val sameUrlPathFilter = Filter.eq("longUrl", urlPath) + retrievePermalink(sameUrlPathFilter) + } + /** Insert a given permalink in the database * * @param permalink Permalink to be inserted diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala index 7e0e7d60..1c8f9a40 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala @@ -1,6 +1,6 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase -import es.weso.rdfshape.server.utils.codec.CodecUtils.uriEncoder +import es.weso.rdfshape.server.implicits.codecs.encodeUri import io.circe.syntax.EncoderOps import io.circe.{Encoder, Json} import org.http4s._ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala index 607b0ad6..d47cea63 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala @@ -7,7 +7,7 @@ import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationFormats.WikibaseQueryFormat import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.utils.codec.CodecUtils.uriEncoder +import es.weso.rdfshape.server.implicits.codecs.encodeUri import io.circe.syntax.EncoderOps import io.circe.{Encoder, Json} import org.http4s.Uri diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala index 550b90dd..1e62d1ba 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -2,22 +2,44 @@ package es.weso.rdfshape.server.api import cats.effect.IO import cats.implicits.catsSyntaxOptionId +import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery +import es.weso.rdfshape.server.api.swagger.SwaggerModelProperties.url import org.http4s.rho.RhoMiddleware import org.http4s.rho.swagger.models._ import org.http4s.rho.swagger.syntax.{io => ioSwagger} import org.http4s.rho.swagger.{DefaultSwaggerFormats, SwaggerMetadata} +import java.net.URL +import scala.reflect.runtime.universe.typeOf + package object swagger { + // Import all models + + import es.weso.rdfshape.server.api.swagger.SwaggerModels._ /** Swagger middleware to transform RhoServices into HttpServices * with an attached Swagger definition * Includes the base API spec + * + * All swagger serializers in [[customSwaggerSerializers]] are added to the middleware + * to create better definitions for complex objects + * * @note We use the default API paths; therefore swagger files are in * /swagger.(json|yml) */ lazy val swaggerMiddleware: RhoMiddleware[IO] = ioSwagger.createRhoMiddleware( - swaggerFormats = DefaultSwaggerFormats, + swaggerFormats = allCustomSerializers.foldLeft( + DefaultSwaggerFormats + )((prev, curr) => + curr match { + case (classType, serializerModel) => + serializerModel match { + case model: Set[Model] => prev.withSerializers(classType, model) + case prop: Property => prev.withFieldSerializers(classType, prop) + } + } + ), swaggerMetadata = SwaggerMetadata( apiInfo = Info( title = "RDFShape API", @@ -37,11 +59,73 @@ package object swagger { ).some ), host = "api.rdfshape.weso.es".some, - basePath = "/api/".some, + basePath = None, schemes = List(Scheme.HTTP, Scheme.HTTPS), consumes = List("multipart/form-data"), produces = List("text/plain; charset=utf-8", "application/json"), tags = List(Tag(name = "api", description = "RDFShape REST API".some)) ) ) + + /** Merge of both object and field serializer sets + */ + lazy val allCustomSerializers = + customSwaggerSerializers ++ customSwaggerFieldSerializers + + /** Set of all swagger object serializers defined in [[SwaggerModels]] + */ + val customSwaggerSerializers = Set( + (typeOf[SparqlQuery], sparqlQuery) + ) + + /** Set of all swagger field serializers defined in [[SwaggerModelProperties]] + */ + val customSwaggerFieldSerializers = Set( + (typeOf[URL], url) + ) + + /** Models used by Rho to create swagger definitions for complex objects + * in the domain + */ + object SwaggerModels { + val sparqlQuery: Set[Model] = Set( + ModelImpl( + id = "SparqlQuery", + id2 = "SparqlQuery", + `type` = "object".some, + description = "Sparql Query description".some, + name = "SPARQL Query".some, + properties = Map( + "content" -> StringProperty( + required = true, + description = "Query content: textual, URL or file".some, + enums = Set() + ), + "source" -> StringProperty( + required = true, + description = + "Source of the query content, used to know how to access it".some, + enums = Set("byText", "byUrl", "byFile") + ) + ), + example = """{ + | "content": "https://pastebin.com/raw/4fFvFjXp", + | "source": "byUrl" + |}""".stripMargin.some + ) + ) + } + + /** Properties used by Rho to create swagger definitions for special objects + * in the domain + */ + object SwaggerModelProperties { + val url: StringProperty = StringProperty( + required = true, + description = + "Representation of a valid URL (including protocol, host, port... as needed)".some, + enums = Set() + ) + + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala index 324bdb42..97700382 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala @@ -35,6 +35,9 @@ object IncomingRequestParameters { lazy val endpoint = "endpoint" + lazy val content = "content" + + lazy val source = "source" lazy val dataSource = "dataSource" lazy val schemaSource = "schemaSource" lazy val shapeMapSource = "shapeMapSource" @@ -58,6 +61,17 @@ object IncomingRequestParameters { lazy val continue = "continue" lazy val withDot = "withDot" + /** Parameter expected to contain the content inputted by the user for a certain + * operation + * + * @note These contents may be raw data, a URL/File with the contents... + * The source of the query is therefore specified in other [[SourceParameter]] + */ + object ContentParameter + extends OptionalQueryParamDecoderMatcher[String](content) { + val name: String = content + } + /** Parameter expected to contain RDF data contents (URL encoded) * * @note These contents may be raw data, a URL with the data or a File with the data. @@ -201,6 +215,14 @@ object IncomingRequestParameters { val name: String = endpoint } + /** Parameter expected to contain a valid identifier of the source of the data sent by the client + * for any operation + */ + object SourceParameter + extends OptionalQueryParamDecoderMatcher[String](source) { + val name: String = source + } + /** Parameter expected to contain a valid identifier of the source of the data sent by the client (currently raw data, a URL or a file) * in data-related operations */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala new file mode 100644 index 00000000..760a4f68 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala @@ -0,0 +1,28 @@ +package es.weso.rdfshape.server.implicits + +import cats.implicits.toBifunctorOps +import io.circe.{Decoder, Encoder, HCursor, Json} +import org.http4s.Uri + +import java.net.URL +import scala.util.Try + +/** Additional codecs used throughout the application + */ +package object codecs { + + /** JSON encoder for the [[Uri]] class used in http4s + */ + implicit val encodeUri: Encoder[Uri] = (uri: Uri) => + Json.fromString(uri.renderString) + + /** JSON decoder for [[URL]]. Returns an option since the URL may be malformed + * and thus None is decoded + */ + implicit val decodeUrl: Decoder[Either[String, URL]] = (cursor: HCursor) => + for { + urlStr <- cursor.value.as[String] + } yield Try { + new URL(urlStr) + }.toEither.leftMap(_.getMessage) +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala index da6edb2a..220f716d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala @@ -10,6 +10,7 @@ import java.net.{MalformedURLException, URL} import scala.util.{Failure, Success, Try} /** Custom query parsers used by Rho when parsing query parameters to complex data-types + * @see https://github.com/http4s/rho/blob/main/core/src/main/scala/org/http4s/rho/bits/QueryParser.scala */ package object query_parsers { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/codec/CodecUtils.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/codec/CodecUtils.scala deleted file mode 100644 index 6f654d65..00000000 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/codec/CodecUtils.scala +++ /dev/null @@ -1,14 +0,0 @@ -package es.weso.rdfshape.server.utils.codec - -import io.circe.{Encoder, Json} -import org.http4s.Uri - -/** Codecs for Circe to (de)serialize JSON data - */ -case object CodecUtils { - - /** JSON encoder for the [[Uri]] class used in http4s - */ - implicit val uriEncoder: Encoder[Uri] = (uri: Uri) => - Json.fromString(uri.renderString) -} From 8c0b5e24ba133f9f25893a1a90acaf83379b2c17 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 24 Feb 2022 16:02:27 +0100 Subject: [PATCH 07/50] Checking decoders --- .../server/api/ServiceRouteOperation.scala | 2 +- .../api/routes/endpoint/logic/Endpoint.scala | 45 ++++----------- .../endpoint/logic/query/SparqlQuery.scala | 16 ++---- .../logic/query/SparqlQuerySource.scala | 3 +- .../endpoint/service/EndpointService.scala | 53 ++++++++++-------- .../operations/EndpointOutgoingInput.scala | 20 +++++-- .../shapemap/service/ShapeMapService.scala | 11 +--- .../rdfshape/server/api/swagger/package.scala | 56 ++++++++++++------- .../implicits/query_parsers/package.scala | 4 +- 9 files changed, 106 insertions(+), 104 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala index 8192cef5..0fc5f731 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala @@ -12,5 +12,5 @@ trait ServiceRouteOperation[C] { /** Decoder in charge of converting the data sent by the client to a * usable domain structure */ - implicit val decoder: Decoder[Either[String, C]] + implicit val decoder: Decoder[C] } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Endpoint.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Endpoint.scala index a3f24353..41849ae7 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Endpoint.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/Endpoint.scala @@ -1,7 +1,5 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic -import cats.effect.IO -import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.RDFReader import es.weso.rdf.jena.{Endpoint => EndpointJena} @@ -10,27 +8,19 @@ import es.weso.rdfshape.server.api.routes.endpoint.logic.EndpointStatus.{ OFFLINE, ONLINE } -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import es.weso.utils.IOUtils.{ESIO, io2es} -import io.circe.Json +import io.circe.syntax.EncoderOps +import io.circe.{Encoder, Json} import java.net.URL -import scala.util.{Failure, Success, Try} /** Data class representing an endpoint * - * @param msg Message attached to the information/returned by the endpoint + * @param response Message attached to the information/returned by the endpoint * @param status Status of the endpoint */ -sealed case class Endpoint(msg: String, status: EndpointStatus) { - def asJson: Json = Json.fromFields( - List( - ("message", Json.fromString(msg)), - ("status", Json.fromString(status)) - ) - ) -} +sealed case class Endpoint(response: String, status: EndpointStatus) /** Static utilities used by the {@link es.weso.rdfshape.server.api.routes.endpoint.service.EndpointService} * to operate on endpoints @@ -58,27 +48,14 @@ private[api] object Endpoint extends LazyLogging { } } - /** Given a request's parameters, try to extract an endpoint URL from them - * - * @param partsMap Request's parameter - * @return The endpoint URL or an error message + /** Encoder [[Endpoint]] => [[Json]] */ - def getEndpointUrl( - partsMap: PartsMap - ): IO[Either[String, URL]] = for { - maybeStr <- partsMap.optPartValue("endpoint").map(_.toRight("")) - - ep = maybeStr match { - case Left(_) => - val msg = s"No value provided for parameter endpoint" - msg.asLeft[URL] - case Right(endpointStr) => - Try(new URL(endpointStr)) match { - case Success(url) => url.asRight[String] - case Failure(ex) => ex.getMessage.asLeft[URL] - } - } - } yield ep + implicit val encoder: Encoder[Endpoint] = + (endpoint: Endpoint) => + Json.obj( + ("online", (endpoint.status == ONLINE).asJson), + ("response", endpoint.response.asJson) + ) } /** Enumeration of the different possible Endpoint states. diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala index e185814d..18d7e958 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala @@ -28,15 +28,11 @@ sealed case class SparqlQuery private ( * @return Either an error building the query text or a String containing the final text of the SPARQL query */ lazy val fetchedQueryContents: Either[String, String] = - querySource match { - case SparqlQuerySource.URL => - getUrlContents(queryContent) - - // Text or file - case _ => - Right(queryContent) - - } + if (querySource equalsIgnoreCase SparqlQuerySource.URL) + getUrlContents(queryContent) + // Text or file + else Right(queryContent) + assume(fetchedQueryContents.isRight, fetchedQueryContents.left.getOrElse("Unknown error")) @@ -88,7 +84,7 @@ private[api] object SparqlQuery extends LazyLogging { if(content.isBlank) "Could not build the query from empty data".asLeft[SparqlQuery] else if( - source != SparqlQuerySource.TEXT && source != SparqlQuerySource.URL && source != SparqlQuerySource.FILE + !SparqlQuerySource.values.exists(_ equalsIgnoreCase source) ) s"Unknown query source: \"$source\"".asLeft[SparqlQuery] else { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala index 50c612df..c4859294 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala @@ -5,12 +5,13 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic.query * to be fetched or as a text file containing the query. * In case the client submits the query in several formats, the selected source will indicate the one format. */ -private[api] object SparqlQuerySource extends Enumeration { +private[api] object SparqlQuerySource { type SparqlQuerySource = String val TEXT = "byText" val URL = "byUrl" val FILE = "byFile" + val values = Set(TEXT, URL, FILE) val defaultQuerySource: SparqlQuerySource = TEXT } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala index ef3f0d2c..3d1bf7e8 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala @@ -4,7 +4,8 @@ import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService -import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.getEndpointAsRDFReader +import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint +import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.{getEndpointAsRDFReader, getEndpointInfo} import es.weso.rdfshape.server.api.routes.endpoint.logic.Outgoing._ import es.weso.rdfshape.server.api.routes.endpoint.service.operations.EndpointOutgoingInput import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ @@ -33,34 +34,25 @@ class EndpointService(client: Client[IO]) */ def routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Perform a SPARQL query targeted to a specific endpoint. - * Receives a JSON object with the input endpoint query: - * - endpoint [URL]: Query target endpoint - * - query [String]: User input for the query - * - querySource [String]: Identifies the source of the query (raw, URL, file...) - * Returns a JSON object with the query results: - * - head [Object]: Query metadata - * - vars: [Array]: Query variables - * - results [Object]: Query results - * - bindings: [Array]: Query results, each item being an object mapping each variable to its value - */ - /** - */ - POST / `api` / `verb` / "query" ^ jsonOf[ + /** Check the existence of an endpoint and get its response, if any + * Receives a JSON object with the input endpoint: + * - endpoint [URL]: Target endpoint + * - query [String]: User query with content and source + * Returns a JSON object with the results (see [[Endpoint.encoder]]). + */ + POST / `api` / `verb` / "info" ^ jsonOf[ IO, - Either[String, EndpointOutgoingInput] - ] |>> { (body: Either[String, EndpointOutgoingInput]) => + EndpointOutgoingInput + ] |>> { (body:EndpointOutgoingInput) => body match { - // Return any error accumulated during the parsing of the body - case Left(err) => BadRequest(err) - case Right(EndpointOutgoingInput(endpointUrl, queryObject)) => - + case EndpointOutgoingInput(endpointUrl, queryObject) => + val ioResponse = for { endpoint <- getEndpointAsRDFReader(endpointUrl) _ = logger.debug(s"Query to \"$endpointUrl\": \"${queryObject.rawQuery}\"") queryResponse <- io2es(endpoint.queryAsJson(queryObject.rawQuery)) } yield queryResponse - + ioResponse.value.flatMap { case Left(err) => InternalServerError(err) case Right(json) => Ok(json) @@ -68,6 +60,23 @@ class EndpointService(client: Client[IO]) } } + /** Perform a SPARQL query targeted to a specific endpoint. + * Receives a JSON object with the input endpoint query: + * - endpoint [URL]: Query target endpoint + * - query [String]: User query with content and source + * Returns a JSON object with the query results: + * - head [Object]: Query metadata + * - vars: [Array]: Query variables + * - results [Object]: Query results + * - bindings: [Array]: Query results, each item being an object mapping each variable to its value + */ + /** + */ + GET / `api` / `verb` / "info" +? + param[URL](EndpointParameter.name) |>> { (endpointUrl: URL) => + Ok(getEndpointInfo(endpointUrl).asJson) + } + /** Attempt to contact a wikibase endpoint and return the data (triplets) about a node in it. * Receives a JSON object with the input endpoint, node and limits: * - endpoint [URL]: Query target endpoint diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala index fc06fc1a..25fbd6df 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala @@ -1,5 +1,6 @@ package es.weso.rdfshape.server.api.routes.endpoint.service.operations +import cats.implicits.catsSyntaxEitherId import es.weso.rdfshape.server.api.ServiceRouteOperation import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ @@ -7,7 +8,7 @@ import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ QueryParameter } import es.weso.rdfshape.server.implicits.codecs.decodeUrl -import io.circe.{Decoder, HCursor} +import io.circe.{Decoder, DecodingFailure, HCursor} import java.net.URL @@ -16,10 +17,9 @@ case class EndpointOutgoingInput(endpoint: URL, query: SparqlQuery) object EndpointOutgoingInput extends ServiceRouteOperation[EndpointOutgoingInput] { - override implicit val decoder - : Decoder[Either[String, EndpointOutgoingInput]] = + override implicit val decoder: Decoder[EndpointOutgoingInput] = (cursor: HCursor) => { - for { + val decodeResult = for { maybeEndpoint <- cursor .downField(EndpointParameter.name) .as[Either[String, URL]] @@ -28,11 +28,21 @@ object EndpointOutgoingInput .downField(QueryParameter.name) .as[Either[String, SparqlQuery]] - decoded = for { + decoded: Either[String, EndpointOutgoingInput] = for { endpoint <- maybeEndpoint query <- maybeQuery } yield EndpointOutgoingInput(endpoint, query) } yield decoded + + /* If a native decoding failure occurred, leave it as is, else if an error + * occurred return it as a decoding failure , else return the value */ + decodeResult.fold( + _.asLeft, + { + case Left(errStr) => DecodingFailure(errStr, Nil).asLeft + case Right(value) => value.asRight + } + ) } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala index a910844f..0282cdfa 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala @@ -42,16 +42,9 @@ class ShapeMapService(client: Client[IO]) /** Obtain information about a shapeMap. * Receives a JSON object with the input shapeMap information: * - shapeMap [String]: Raw shapemap data - * - shapeMapUrl [String]: Url containing the shapemap - * - shapeMapFile [File Object]: File containing the shapemap * - shapeMapFormat [String]: Format of the shapeMap - * - activeShapeMapTab [String]: Identifies the source of the shapeMap (raw, URL, file...) - * Returns a JSON object with the shapeMap information: - * - shapeMap [String]: Input shapeMap string - * - shapeMapFormat [String]: Input shapeMap format - * - shapeMapJson [Array]: Array of the elements in the shapeMap - * - node [String]: Referenced node - * - shape [String]: Target shape for the node + * - shapeMapSource [String]: Identifies the source of the shapeMap (raw, URL, file...) + * Returns a JSON object with the query inputs and results (see [[ShapeMapInfo.encodeShapeMapInfoOperation]]). */ case req @ POST -> Root / `api` / `verb` / "info" => req.decode[Multipart[IO]] { m => diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala index 1e62d1ba..ede2a574 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -2,12 +2,19 @@ package es.weso.rdfshape.server.api import cats.effect.IO import cats.implicits.catsSyntaxOptionId -import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery +import es.weso.rdfshape.server.api.routes.endpoint.logic.query.{ + SparqlQuery, + SparqlQuerySource +} import es.weso.rdfshape.server.api.swagger.SwaggerModelProperties.url import org.http4s.rho.RhoMiddleware import org.http4s.rho.swagger.models._ import org.http4s.rho.swagger.syntax.{io => ioSwagger} -import org.http4s.rho.swagger.{DefaultSwaggerFormats, SwaggerMetadata} +import org.http4s.rho.swagger.{ + DefaultSwaggerFormats, + SwaggerFormats, + SwaggerMetadata +} import java.net.URL import scala.reflect.runtime.universe.typeOf @@ -29,17 +36,7 @@ package object swagger { */ lazy val swaggerMiddleware: RhoMiddleware[IO] = ioSwagger.createRhoMiddleware( - swaggerFormats = allCustomSerializers.foldLeft( - DefaultSwaggerFormats - )((prev, curr) => - curr match { - case (classType, serializerModel) => - serializerModel match { - case model: Set[Model] => prev.withSerializers(classType, model) - case prop: Property => prev.withFieldSerializers(classType, prop) - } - } - ), + swaggerFormats = allSwaggerFormats, swaggerMetadata = SwaggerMetadata( apiInfo = Info( title = "RDFShape API", @@ -67,10 +64,28 @@ package object swagger { ) ) - /** Merge of both object and field serializer sets + /** Merge of both object and field serializer sets as SwaggerFormats */ - lazy val allCustomSerializers = - customSwaggerSerializers ++ customSwaggerFieldSerializers + lazy val allSwaggerFormats: SwaggerFormats = { + // Add all object models + val objectSerializers = customSwaggerSerializers.foldLeft( + DefaultSwaggerFormats + )((prev, curr) => + curr match { + case (classType, serializerModel) => + prev.withSerializers(classType, serializerModel) + } + ) + // Add all property models on top + customSwaggerFieldSerializers.foldLeft( + objectSerializers + )((prev, curr) => + curr match { + case (classType, prop) => + prev.withFieldSerializers(classType, prop) + } + ) + } /** Set of all swagger object serializers defined in [[SwaggerModels]] */ @@ -108,9 +123,9 @@ package object swagger { enums = Set("byText", "byUrl", "byFile") ) ), - example = """{ - | "content": "https://pastebin.com/raw/4fFvFjXp", - | "source": "byUrl" + example = s"""{ + | "content": "SELECT ?a ?b ?c WHERE { ?a ?b ?c } LIMIT 1", + | "source": "${SparqlQuerySource.TEXT}" |}""".stripMargin.some ) ) @@ -124,7 +139,8 @@ package object swagger { required = true, description = "Representation of a valid URL (including protocol, host, port... as needed)".some, - enums = Set() + enums = Set(), + default = "https://...".some ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala index 220f716d..00c517dc 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala @@ -4,7 +4,7 @@ import cats.effect.IO import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson import org.http4s.Status._ import org.http4s.rho.bits.QueryParser.Params -import org.http4s.rho.bits.{FailureResponse, QueryParser, SuccessResponse} +import org.http4s.rho.bits._ import java.net.{MalformedURLException, URL} import scala.util.{Failure, Success, Try} @@ -30,7 +30,7 @@ package object query_parsers { case _: MalformedURLException => FailureResponse.pure( errorResponseJson( - s"Invalid URL provided for shortening: $value", + s"Invalid URL provided: $value", BadRequest ) ) From 5748994d03f5961b80df9354705f01717dd881b0 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 24 Feb 2022 21:35:53 +0100 Subject: [PATCH 08/50] Documented and validated ShapeMap service with Rho --- Dockerfile | 2 +- .../es/weso/rdfshape/server/Server.scala | 2 +- .../server/api/definitions/ApiDefaults.scala | 6 +- .../rdfshape/server/api/format/Format.scala | 4 +- .../api/routes/data/logic/DataSource.scala | 8 +- .../data/logic/operations/DataQuery.scala | 2 +- .../routes/data/logic/types/DataSingle.scala | 61 ++++---- .../endpoint/logic/query/SparqlQuery.scala | 58 ++++---- .../logic/query/SparqlQuerySource.scala | 8 +- .../endpoint/service/EndpointService.scala | 6 +- .../operations/EndpointOutgoingInput.scala | 14 +- .../routes/schema/logic/SchemaSource.scala | 7 +- .../schema/logic/trigger/TriggerMode.scala | 16 +- .../logic/trigger/TriggerShapeMap.scala | 35 +++-- .../trigger/TriggerTargetDeclarations.scala | 29 ++-- .../schema/logic/types/SchemaSimple.scala | 75 +++++----- .../api/routes/shapemap/logic/ShapeMap.scala | 138 ++++++++++-------- .../shapemap/logic/ShapeMapSource.scala | 7 +- .../shapemap/service/ShapeMapService.scala | 43 ++---- .../operations/ShapeMapInfoInput.scala | 23 +++ .../operations/WikibaseOperationFormats.scala | 5 +- .../schema/WikibaseSchemaValidate.scala | 2 +- .../rdfshape/server/api/swagger/package.scala | 72 +++++++-- .../IncomingRequestParameters.scala | 16 +- .../rdfshape/server/utils/other/MyEnum.scala | 16 ++ .../rdfshape/server/utils/other/package.scala | 29 ++++ 26 files changed, 405 insertions(+), 279 deletions(-) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/MyEnum.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala diff --git a/Dockerfile b/Dockerfile index 9d651f2f..2824033a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ ENV SSL_FIX="-Djdk.tls.client.protocols=TLSv1.2" # Define commands to launch RDFShape ENV HTTPS_CLI_ARG="--https" -ENV RDFSHAPE_CMD_HTTP="rdfshape $SSL_FIX --port $PORT" +ENV RDFSHAPE_CMD_HTTP="rdfshape $SSL_FIX --port $PORT -s" ENV RDFSHAPE_CMD_HTTPS="$RDFSHAPE_CMD_HTTP $HTTPS_CLI_ARG" CMD bash -c "if [[ ! -z '$USE_HTTPS' ]]; then $RDFSHAPE_CMD_HTTPS; else $RDFSHAPE_CMD_HTTP; fi" \ No newline at end of file diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index d311e2d4..7b67c00c 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -196,6 +196,7 @@ object Server { private def routesService(client: Client[IO]): HttpRoutes[IO] = { val routesFromRho = (BaseService(client).routes and + ShapeMapService(client).routes and PermalinkService(client).routes and EndpointService(client).routes and FetchService(client).routes) @@ -204,7 +205,6 @@ object Server { routesFromRho <+> DataService(client).routes <+> SchemaService(client).routes <+> - ShapeMapService(client).routes <+> WikibaseService(client).routes corsConfiguration.apply(allRoutes) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala index 9cb5c87e..33888440 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala @@ -61,17 +61,17 @@ case object ApiDefaults { /** [[DataSource]] used when the source can be omitted or is needed but none was provided */ - val defaultDataSource: DataSource = DataSource.defaultDataSource + val defaultDataSource: DataSource = DataSource.default /** [[SchemaSource]] used when the source can be omitted or is needed but none was provided */ val defaultSchemaSource: SchemaSource = - SchemaSource.defaultSchemaSource + SchemaSource.default /** [[ShapeMapSource]] used when the source can be omitted or is needed but none was provided */ val defaultShapeMapSource: ShapeMapSource = - ShapeMapSource.defaultShapeMapSource + ShapeMapSource.default /** [[IRI]] used when the shape label can be omitted or is needed but none was provided */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala index 4b7d63be..9c0ed3a5 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala @@ -56,7 +56,7 @@ trait FormatCompanion[F <: Format] extends LazyLogging { /** Format encoder. Forms a JSON object with the formats name and mimetype */ - implicit val encodeFormat: Encoder[F] = (format: F) => { + implicit val encoder: Encoder[F] = (format: F) => { Json.obj( ("name", Json.fromString(format.name)), ( @@ -73,7 +73,7 @@ trait FormatCompanion[F <: Format] extends LazyLogging { * @note The decoder is simplified because the client normally sends the format name only, like: * "format": "turtle" */ - implicit val decodeFormat: Decoder[F] = (cursor: HCursor) => + implicit val decoder: Decoder[F] = (cursor: HCursor) => for { formatStr <- cursor.value.as[String] format = fromString(formatStr).toOption.getOrElse(defaultFormat) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala index 03317d02..6a850841 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala @@ -1,11 +1,13 @@ package es.weso.rdfshape.server.api.routes.data.logic +import es.weso.rdfshape.server.utils.other.MyEnum + /** Enumeration of the different possible Data sources sent by the client. * The source sent indicates the API if the schema was sent in raw text, as a URL * to be fetched or as a text file containing the data. * In case the client submits the data in several formats, the selected source will indicate the preferred one. */ -private[api] object DataSource extends Enumeration { +private[api] object DataSource extends MyEnum[String] { type DataSource = String val TEXT = "byText" @@ -14,5 +16,7 @@ private[api] object DataSource extends Enumeration { val COMPOUND = "compoundData" val ENDPOINT = "dataEndpoint" - val defaultDataSource: DataSource = TEXT + override val values = + Set(TEXT, URL, FILE, COMPOUND, ENDPOINT) + override val default: DataSource = TEXT } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala index 3cb60fc7..95caebbb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala @@ -36,7 +36,7 @@ private[api] object DataQuery { */ def dataQuery(data: Data, query: SparqlQuery): IO[DataQuery] = - query.fetchedQueryContents match { + query.fetchedContents match { case Left(err) => IO.raiseError(new RuntimeException(err)) case Right(raw) => for { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala index 8cbca296..f190cd25 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala @@ -82,6 +82,8 @@ sealed case class DataSingle( } + override def toString: String = rawData.toString + /** @param dataStr RDF data as a raw string * @param format RDF data format * @param base Base @@ -118,8 +120,6 @@ sealed case class DataSingle( (iri: IRI) => IO(Some(iri)) ) } - - override def toString: String = rawData.toString } private[api] object DataSingle @@ -144,6 +144,33 @@ private[api] object DataSingle ("inference", data.inference.asJson), ("source", data.dataSource.asJson) ) + override implicit val decodeData: Decoder[DataSingle] = + (cursor: HCursor) => + for { + data <- cursor.downField("data").as[Option[String]] + + dataFormat <- cursor + .downField("dataFormat") + .as[RdfFormat] + + dataInference <- + cursor + .downField("dataInference") + .as[InferenceEngine] + + dataSource <- cursor + .downField("dataSource") + .as[DataSource] + .orElse(Right(DataSource.default)) + + decoded = DataSingle.emptyData.copy( + dataPre = data, + dataFormat = dataFormat, + dataSource = dataSource, + inference = dataInference + ) + + } yield decoded override def mkData(partsMap: PartsMap): IO[Either[String, DataSingle]] = for { @@ -163,7 +190,7 @@ private[api] object DataSingle format = paramFormat.getOrElse(ApiDefaults.defaultDataFormat) // Check the client's selected source - dataSource = paramDataSource.getOrElse(DataSource.defaultDataSource) + dataSource = paramDataSource.getOrElse(DataSource.default) _ = logger.debug(s"RDF Data received - Source: $dataSource") // Create the data instance @@ -184,32 +211,4 @@ private[api] object DataSingle ): Option[InferenceEngine] = { inferenceStr.flatMap(InferenceEngine.fromString(_).toOption) } - - override implicit val decodeData: Decoder[DataSingle] = - (cursor: HCursor) => - for { - data <- cursor.downField("data").as[Option[String]] - - dataFormat <- cursor - .downField("dataFormat") - .as[RdfFormat] - - dataInference <- - cursor - .downField("dataInference") - .as[InferenceEngine] - - dataSource <- cursor - .downField("dataSource") - .as[DataSource] - .orElse(Right(DataSource.defaultDataSource)) - - decoded = DataSingle.emptyData.copy( - dataPre = data, - dataFormat = dataFormat, - dataSource = dataSource, - inference = dataInference - ) - - } yield decoded } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala index 18d7e958..5a7de355 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala @@ -1,9 +1,9 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic.query import cats.effect.IO -import cats.implicits.{catsSyntaxEitherId, toBifunctorOps} +import cats.implicits.toBifunctorOps import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuerySource.{SparqlQuerySource, defaultQuerySource} +import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuerySource.SparqlQuerySource import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ContentParameter, QueryParameter, QuerySourceParameter, SourceParameter} import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents @@ -14,35 +14,43 @@ import scala.util.Try /** Data class representing a SPARQL query and its current source * - * @param queryContent Query contents, as received before being processed depending on the [[querySource]] - * @param querySource Active source, used to know which source the query comes from + * @param content Query contents, as received before being processed depending on the [[source]] + * @param source Active source, used to know which source the query comes from */ sealed case class SparqlQuery private ( - private val queryContent: String, - querySource: SparqlQuerySource + private val content: String, + source: SparqlQuerySource ) extends LazyLogging { + // Non empty content + assume(!content.isBlank, "Could not build the query from empty data") + // Valid source + assume(SparqlQuerySource.values.exists(_ equalsIgnoreCase source), + s"Unknown query source: \"$source\"") + + /** Given the (user input) for the query and its source, fetch the Query contents using the input in the way the source needs it * (e.g.: for URLs, fetch the input with a web request; for files, decode the input; for raw data, do nothing) * * @return Either an error building the query text or a String containing the final text of the SPARQL query */ - lazy val fetchedQueryContents: Either[String, String] = - if (querySource equalsIgnoreCase SparqlQuerySource.URL) - getUrlContents(queryContent) + lazy val fetchedContents: Either[String, String] = + if (source equalsIgnoreCase SparqlQuerySource.URL) + getUrlContents(content) // Text or file - else Right(queryContent) + else Right(content) - assume(fetchedQueryContents.isRight, - fetchedQueryContents.left.getOrElse("Unknown error")) + assume(fetchedContents.isRight, + fetchedContents.left.getOrElse("Unknown error")) /** * Raw query value, i.e.: the text forming the query - * @note It is safely extracted fromm [[fetchedQueryContents]] after asserting + * + * @note It is safely extracted fromm [[fetchedContents]] after asserting * the contents are right */ - val rawQuery: String = fetchedQueryContents.toOption.get + val raw: String = fetchedContents.toOption.get } @@ -55,8 +63,8 @@ private[api] object SparqlQuery extends LazyLogging { implicit val encoder: Encoder[SparqlQuery] = (query: SparqlQuery) => Json.obj( - ("query", query.fetchedQueryContents.toOption.asJson), - ("source", query.querySource.asJson) + ("query", query.raw.asJson), + ("source", query.source.asJson) ) /** @@ -77,22 +85,12 @@ private[api] object SparqlQuery extends LazyLogging { } yield (queryContent, querySource) - // Safety checks: non empty query content and valid query source queryData.map { - // Destructure + // Destructure and try to build the object, catch the exception as error message if needed case (content, source) => - if(content.isBlank) - "Could not build the query from empty data".asLeft[SparqlQuery] - else if( - !SparqlQuerySource.values.exists(_ equalsIgnoreCase source) - ) - s"Unknown query source: \"$source\"".asLeft[SparqlQuery] - else { - // Try to build a query, catch the exception as error message if needed Try { SparqlQuery(content, source) }.toEither.leftMap( err => s"Could not build the SPARQL query from user data:\n ${err.getMessage}") - } } } @@ -132,11 +130,11 @@ private[api] object SparqlQuery extends LazyLogging { for { query <- IO { SparqlQuery( - queryContent = queryStr.getOrElse(""), - querySource = activeQuerySource.getOrElse(defaultQuerySource) + content = queryStr.getOrElse(""), + source = activeQuerySource.getOrElse(SparqlQuerySource.default) ) } - } yield query.fetchedQueryContents.fold( + } yield query.fetchedContents.fold( // If the query text built is blank, an error occurred err => Left(err), _ => Right(query) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala index c4859294..5d6f21bb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuerySource.scala @@ -1,17 +1,19 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic.query +import es.weso.rdfshape.server.utils.other.MyEnum + /** Enumeration of the different possible Query sources by the client. * The source sent indicates the API if the Query was sent in raw text, as a URL * to be fetched or as a text file containing the query. * In case the client submits the query in several formats, the selected source will indicate the one format. */ -private[api] object SparqlQuerySource { +private[api] object SparqlQuerySource extends MyEnum[String] { type SparqlQuerySource = String val TEXT = "byText" val URL = "byUrl" val FILE = "byFile" - val values = Set(TEXT, URL, FILE) - val defaultQuerySource: SparqlQuerySource = TEXT + val values = Set(TEXT, URL, FILE) + val default: SparqlQuerySource = TEXT } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala index 3d1bf7e8..544e043d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala @@ -43,14 +43,14 @@ class EndpointService(client: Client[IO]) POST / `api` / `verb` / "info" ^ jsonOf[ IO, EndpointOutgoingInput - ] |>> { (body:EndpointOutgoingInput) => + ] |>> { (body: EndpointOutgoingInput) => body match { case EndpointOutgoingInput(endpointUrl, queryObject) => val ioResponse = for { endpoint <- getEndpointAsRDFReader(endpointUrl) - _ = logger.debug(s"Query to \"$endpointUrl\": \"${queryObject.rawQuery}\"") - queryResponse <- io2es(endpoint.queryAsJson(queryObject.rawQuery)) + _ = logger.debug(s"Query to \"$endpointUrl\": \"${queryObject.raw}\"") + queryResponse <- io2es(endpoint.queryAsJson(queryObject.raw)) } yield queryResponse ioResponse.value.flatMap { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala index 25fbd6df..104a67f5 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/operations/EndpointOutgoingInput.scala @@ -1,6 +1,5 @@ package es.weso.rdfshape.server.api.routes.endpoint.service.operations -import cats.implicits.catsSyntaxEitherId import es.weso.rdfshape.server.api.ServiceRouteOperation import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ @@ -8,7 +7,8 @@ import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ QueryParameter } import es.weso.rdfshape.server.implicits.codecs.decodeUrl -import io.circe.{Decoder, DecodingFailure, HCursor} +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} import java.net.URL @@ -35,14 +35,6 @@ object EndpointOutgoingInput } yield decoded - /* If a native decoding failure occurred, leave it as is, else if an error - * occurred return it as a decoding failure , else return the value */ - decodeResult.fold( - _.asLeft, - { - case Left(errStr) => DecodingFailure(errStr, Nil).asLeft - case Right(value) => value.asRight - } - ) + mapEitherToDecodeResult(decodeResult) } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/SchemaSource.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/SchemaSource.scala index 1cca2995..f5d54295 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/SchemaSource.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/SchemaSource.scala @@ -1,16 +1,19 @@ package es.weso.rdfshape.server.api.routes.schema.logic +import es.weso.rdfshape.server.utils.other.MyEnum + /** Enumeration of the different possible Schema sources sent by the client. * The source sent indicates the API if the schema was sent in raw text, as a URL * to be fetched or as a text file containing the schema. * In case the client submits the schema in several formats, the selected source will indicate the preferred one. */ -private[api] object SchemaSource extends Enumeration { +private[api] object SchemaSource extends MyEnum[String] { type SchemaSource = String val TEXT = "byText" val URL = "byUrl" val FILE = "byFile" - val defaultSchemaSource: SchemaSource = TEXT + override val values: Set[String] = Set(TEXT, URL, FILE) + val default: SchemaSource = TEXT } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 622a65ba..c8a417a5 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -40,23 +40,23 @@ object TriggerMode extends TriggerModeCompanion[TriggerMode] { * If called on a general [[TriggerMode]] instance, pattern match among the available types to * use the correct implementation */ - override implicit val encodeTriggerMode: Encoder[TriggerMode] = { - case tsm: TriggerShapeMap => TriggerShapeMap.encodeTriggerMode(tsm) + override implicit val encoder: Encoder[TriggerMode] = { + case tsm: TriggerShapeMap => TriggerShapeMap.encoder(tsm) case ttd: TriggerTargetDeclarations => - TriggerTargetDeclarations.encodeTriggerMode(ttd) + TriggerTargetDeclarations.encoder(ttd) } /** Dummy implementation meant to be overridden * If called on a general [[TriggerMode]] instance, pattern match among the available types to * use the correct implementation */ - override implicit val decodeTriggerMode: Decoder[TriggerMode] = + override implicit val decoder: Decoder[TriggerMode] = (cursor: HCursor) => { this.getClass match { case tsm if tsm == classOf[TriggerShapeMap] => - TriggerShapeMap.decodeTriggerMode(cursor) + TriggerShapeMap.decoder(cursor) case ttd if ttd == classOf[TriggerTargetDeclarations] => - TriggerTargetDeclarations.decodeTriggerMode(cursor) + TriggerTargetDeclarations.decoder(cursor) } } @@ -100,11 +100,11 @@ private[schema] trait TriggerModeCompanion[T <: TriggerMode] /** Encoder used to transform [[TriggerMode]] instances to JSON values */ - implicit val encodeTriggerMode: Encoder[T] + implicit val encoder: Encoder[T] /** Decoder used to extract [[TriggerMode]] instances from JSON values */ - implicit val decodeTriggerMode: Decoder[T] + implicit val decoder: Decoder[T] /** Given a request's parameters, try to extract an instance of [[TriggerMode]] (type [[T]]) from them * diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala index 036b21a8..4780cac3 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala @@ -42,6 +42,23 @@ private[api] object TriggerShapeMap extends TriggerModeCompanion[TriggerShapeMap] with LazyLogging { + override implicit val encoder: Encoder[TriggerShapeMap] = + (tsm: TriggerShapeMap) => + Json.obj( + ("type", tsm.triggerModeType.asJson), + ("shapeMap", tsm.shapeMap.asJson), + ("data", tsm.data.asJson), + ("schema", tsm.schema.asJson) + ) + override implicit val decoder: Decoder[TriggerShapeMap] = + (cursor: HCursor) => + for { + shapeMap <- cursor.downField("shapeMap").as[Either[String, ShapeMap]] + data <- cursor.downField("data").as[Option[Data]] + schema <- cursor.downField("schema").as[Option[Schema]] + decoded = TriggerShapeMap(shapeMap.toOption.get, data, schema) + } yield decoded + /** Given a request's parameters, try to extract a TriggerMode instance from them * * @param partsMap Request's parameters @@ -101,22 +118,4 @@ private[api] object TriggerShapeMap } yield maybeTriggerMode } - - override implicit val encodeTriggerMode: Encoder[TriggerShapeMap] = - (tsm: TriggerShapeMap) => - Json.obj( - ("type", tsm.triggerModeType.asJson), - ("shapeMap", tsm.shapeMap.asJson), - ("data", tsm.data.asJson), - ("schema", tsm.schema.asJson) - ) - - override implicit val decodeTriggerMode: Decoder[TriggerShapeMap] = - (cursor: HCursor) => - for { - shapeMap <- cursor.downField("shapeMap").as[ShapeMap] - data <- cursor.downField("data").as[Option[Data]] - schema <- cursor.downField("schema").as[Option[Schema]] - decoded = TriggerShapeMap(shapeMap, data, schema) - } yield decoded } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala index b3c0fe02..636c226d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala @@ -30,31 +30,30 @@ private[api] object TriggerTargetDeclarations extends TriggerModeCompanion[TriggerTargetDeclarations] with LazyLogging { - /** Given a request's parameters, try to extract a TriggerMode instance from them - * - * @param partsMap Request's parameters - * @return Either the trigger mode or an error message - */ - def mkTriggerMode( - partsMap: PartsMap, - data: Option[Data], - schema: Option[Schema] - ): IO[Either[String, TriggerTargetDeclarations]] = - IO.pure(Right(TriggerTargetDeclarations(data, schema))) - - override implicit val encodeTriggerMode: Encoder[TriggerTargetDeclarations] = + override implicit val encoder: Encoder[TriggerTargetDeclarations] = (tsm: TriggerTargetDeclarations) => Json.obj( ("type", tsm.triggerModeType.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) - - override implicit val decodeTriggerMode: Decoder[TriggerTargetDeclarations] = + override implicit val decoder: Decoder[TriggerTargetDeclarations] = (cursor: HCursor) => for { data <- cursor.downField("data").as[Option[Data]] schema <- cursor.downField("schema").as[Option[Schema]] decoded = TriggerTargetDeclarations(data, schema) } yield decoded + + /** Given a request's parameters, try to extract a TriggerMode instance from them + * + * @param partsMap Request's parameters + * @return Either the trigger mode or an error message + */ + def mkTriggerMode( + partsMap: PartsMap, + data: Option[Data], + schema: Option[Schema] + ): IO[Either[String, TriggerTargetDeclarations]] = + IO.pure(Right(TriggerTargetDeclarations(data, schema))) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala index 6c5f33b6..c381aaa7 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala @@ -102,43 +102,6 @@ private[api] object SchemaSimple schemaEngine = ApiDefaults.defaultSchemaEngine, schemaSource = ApiDefaults.defaultSchemaSource ) - - override def mkSchema(partsMap: PartsMap): IO[Either[String, SchemaSimple]] = - for { - // Schema param as sent by client - paramSchema <- partsMap.optPartValue(SchemaParameter.name) - paramFormat <- SchemaFormat.fromRequestParams( - SchemaFormatParameter.name, - partsMap - ) - paramEngine <- partsMap.optPartValue(SchemaEngineParameter.name) - paramSource <- partsMap.optPartValue(SchemaSourceParameter.name) - _ = Schemas.availableSchemaNames - // Confirm format and engine or resort to defaults - schemaFormat = paramFormat.getOrElse(ApiDefaults.defaultSchemaFormat) - schemaEngine = paramEngine - .flatMap(SchemaAdapter.schemaEngineFromString) - .getOrElse(ApiDefaults.defaultSchemaEngine) - - // Check the client's selected source - schemaSource = paramSource.getOrElse(SchemaSource.defaultSchemaSource) - _ = logger.debug( - s"Schema received ($schemaFormat) - Source: $schemaSource" - ) - - // Base for the result - schema = SchemaSimple( - schemaPre = paramSchema, - schemaFormat = schemaFormat, - schemaEngine = schemaEngine, - schemaSource = schemaSource - ) - - } yield schema.rawSchema.fold( - err => Left(err), - _ => Right(schema) - ) - override implicit val encodeSchema: Encoder[SchemaSimple] = (schema: SchemaSimple) => { Json.obj( @@ -165,7 +128,7 @@ private[api] object SchemaSimple schemaSource <- cursor .downField("schemaSource") .as[SchemaSource] - .orElse(Right(SchemaSource.defaultSchemaSource)) + .orElse(Right(SchemaSource.default)) decoded = SchemaSimple.emptySchema.copy( schemaPre = schema, @@ -175,4 +138,40 @@ private[api] object SchemaSimple ) } yield decoded + + override def mkSchema(partsMap: PartsMap): IO[Either[String, SchemaSimple]] = + for { + // Schema param as sent by client + paramSchema <- partsMap.optPartValue(SchemaParameter.name) + paramFormat <- SchemaFormat.fromRequestParams( + SchemaFormatParameter.name, + partsMap + ) + paramEngine <- partsMap.optPartValue(SchemaEngineParameter.name) + paramSource <- partsMap.optPartValue(SchemaSourceParameter.name) + _ = Schemas.availableSchemaNames + // Confirm format and engine or resort to defaults + schemaFormat = paramFormat.getOrElse(ApiDefaults.defaultSchemaFormat) + schemaEngine = paramEngine + .flatMap(SchemaAdapter.schemaEngineFromString) + .getOrElse(ApiDefaults.defaultSchemaEngine) + + // Check the client's selected source + schemaSource = paramSource.getOrElse(SchemaSource.default) + _ = logger.debug( + s"Schema received ($schemaFormat) - Source: $schemaSource" + ) + + // Base for the result + schema = SchemaSimple( + schemaPre = paramSchema, + schemaFormat = schemaFormat, + schemaEngine = schemaEngine, + schemaSource = schemaSource + ) + + } yield schema.rawSchema.fold( + err => Left(err), + _ => Right(schema) + ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala index 9776468a..bfad7f92 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala @@ -1,14 +1,12 @@ package es.weso.rdfshape.server.api.routes.shapemap.logic import cats.effect.IO +import cats.implicits.{catsSyntaxEitherId, toBifunctorOps} import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.PrefixMap import es.weso.rdfshape.server.api.definitions.ApiDefaults import es.weso.rdfshape.server.api.format.dataFormats.ShapeMapFormat -import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMapSource.{ - ShapeMapSource, - defaultShapeMapSource -} +import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMapSource.ShapeMapSource import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents @@ -16,82 +14,83 @@ import es.weso.shapemaps.{ShapeMap => ShapeMapW} import io.circe.syntax.EncoderOps import io.circe.{Decoder, Encoder, HCursor, Json} +import scala.util.Try + /** Data class representing a ShapeMap and its current source. * * @note Invalid initial data is accepted, but may cause exceptions when operating with it (like converting to JSON). - * @param shapeMapPre Shapemap contents, as received before being processed depending on the [[source]] + * @param content Shapemap contents, as received before being processed depending on the [[source]] * @param nodesPrefixMap Prefix mappings of the data referenced in the shapemap * @param shapesPrefixMap Prefix mappings of the ShEx schema referenced in the shapemap * @param format Shapemap format * @param source Active source, used to know which source the shapemap comes from */ sealed case class ShapeMap private ( - private val shapeMapPre: Option[String], + private val content: String, private val nodesPrefixMap: PrefixMap = PrefixMap.empty, private val shapesPrefixMap: PrefixMap = PrefixMap.empty, format: ShapeMapFormat, source: ShapeMapSource ) extends LazyLogging { + // Non empty content + assume(!content.isBlank, "Could not build the shapeMap from empty data") + // Valid source + assume(ShapeMapSource.values.exists(_ equalsIgnoreCase source), + s"Unknown shapemap source: \"$source\"") + /** Given the (user input) for the shapeMap and its source, fetch the shapeMap contents using the input in the way the source needs it * (e.g.: for URLs, fetch the input with a web request; for files, decode the input; for raw data, do nothing) * * @return Optionally, a String containing the final text of the shapeMap query */ - lazy val rawShapeMap: Option[String] = source match { - case ShapeMapSource.TEXT | ShapeMapSource.FILE => - shapeMapPre - case ShapeMapSource.URL => - shapeMapPre.flatMap(getUrlContents(_).toOption) - - case other => - logger.warn(s"Unknown value for activeQueryTab: $other") - None - } - + lazy val fetchedContents: Either[String, String] = + if (source equalsIgnoreCase ShapeMapSource.URL) + getUrlContents(content) + // Text or file + else Right(content) + + + assume(fetchedContents.isRight, + fetchedContents.left.getOrElse("Unknown error")) + /** Inner shapemap structure of the data in this instance * * @return A ShapeMap instance used by WESO libraries in validation */ lazy val innerShapeMap: Either[String, ShapeMapW] = { - rawShapeMap.map(_.trim) match { - case None | Some("") => - Left("Cannot extract the ShapeMap from an empty instance") - case Some(shapeMapStr) => - ShapeMapW - .fromString( - shapeMapStr, - format.name, - base = None, - nodesPrefixMap, - shapesPrefixMap - ) match { - case Left(errorList) => Left(errorList.toList.mkString("\n")) - case Right(shapeMap) => Right(shapeMap) - } + if (raw.isBlank) "Cannot extract the ShapeMap from an empty instance".asLeft + else ShapeMapW + .fromString( + raw, + format.name, + base = None, + nodesPrefixMap, + shapesPrefixMap + ) match { + case Left(errorList) => errorList.toList.mkString("\n").asLeft + case Right(shapeMap) => shapeMap.asRight } } + /** + * Raw shapeMap value, i.e.: the text forming the shapeMap + * + * @note It is safely extracted fromm [[fetchedContents]] after asserting + * the contents are right + */ + val raw: String = fetchedContents.toOption.get } private[api] object ShapeMap extends LazyLogging { - /** Placeholder value used for the shapemap whenever an empty shapemap is issued/needed. - */ - val emptyShapeMap: ShapeMap = - ShapeMap( - shapeMapPre = None, - format = ApiDefaults.defaultShapeMapFormat, - source = ShapeMapSource.defaultShapeMapSource - ) - /** JSON representation of this shapemap to be used in API responses * * @return JSON information of the shapemap (raw content, format, JSON structure) */ - implicit val encodeShapeMap: Encoder[ShapeMap] = + implicit val encoder: Encoder[ShapeMap] = (shapeMap: ShapeMap) => Json.obj( - ("shapeMap", shapeMap.rawShapeMap.asJson), + ("shapeMap", shapeMap.raw.asJson), ("format", shapeMap.format.asJson), ("model", shapeMap.innerShapeMap.toOption.map(_.toJson).asJson) ) @@ -100,27 +99,42 @@ private[api] object ShapeMap extends LazyLogging { * * @return [[ShapeMap]] instance created from JSON data */ - implicit val decodeShapeMap: Decoder[ShapeMap] = - (cursor: HCursor) => - for { - shapeMap <- cursor.downField("shapeMap").as[Option[String]] - - shapeMapFormat <- cursor - .downField("shapeMapFormat") + implicit val decoder: Decoder[Either[String, ShapeMap]] = + (cursor: HCursor) => { + val shapeMapData = for { + content <- cursor + .downField(ContentParameter.name) + .as[String] + .map(_.trim) + + format <- cursor + .downField(FormatParameter.name) .as[ShapeMapFormat] - shapeMapSource <- cursor - .downField("shapeMapSource") + source <- cursor + .downField(SourceParameter.name) .as[ShapeMapSource] - .orElse(Right(ShapeMapSource.defaultShapeMapSource)) - decoded = ShapeMap.emptyShapeMap.copy( - shapeMapPre = shapeMap, - format = shapeMapFormat, - source = shapeMapSource - ) - - } yield decoded + } yield (content, format, source) + + shapeMapData.map { + /* Destructure and try to build the object, catch the exception as error + * message if needed */ + case (content, format, source) => + Try { + ShapeMap( + content, + nodesPrefixMap = PrefixMap.empty, + shapesPrefixMap = PrefixMap.empty, + format, + source + ) + }.toEither.leftMap(err => + s"Could not build the ShapeMap from user data:\n ${err.getMessage}" + ) + + } + } /** Given a request's parameters, try to extract a shapemap from them * @@ -151,11 +165,11 @@ private[api] object ShapeMap extends LazyLogging { // Create the shapemap instance shapeMap = ShapeMap( - shapeMapPre = paramShapeMap, + content = paramShapeMap.getOrElse(""), nodesPrefixMap = nodesPrefixMap.getOrElse(PrefixMap.empty), shapesPrefixMap = shapesPrefixMap.getOrElse(PrefixMap.empty), format = paramFormat.getOrElse(ApiDefaults.defaultShapeMapFormat), - source = paramSource.getOrElse(defaultShapeMapSource) + source = paramSource.getOrElse(ShapeMapSource.default) ) } yield shapeMap.innerShapeMap.map(_ => shapeMap) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMapSource.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMapSource.scala index 789559a1..5f46da40 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMapSource.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMapSource.scala @@ -1,16 +1,19 @@ package es.weso.rdfshape.server.api.routes.shapemap.logic +import es.weso.rdfshape.server.utils.other.MyEnum + /** Enumeration of the different possible ShapeMap sources sent by the client. * The source sent indicates the API if the shapemap was sent in raw text, as a URL * to be fetched or as a text file containing the shapemap. * In case the client submits the shapemap in several formats, the selected source will indicate the preferred one. */ -private[api] object ShapeMapSource extends Enumeration { +private[api] object ShapeMapSource extends MyEnum[String] { type ShapeMapSource = String val TEXT = "byText" val URL = "byUrl" val FILE = "byFile" - val defaultShapeMapSource: ShapeMapSource = TEXT + val values = Set(TEXT, URL, FILE) + val default: ShapeMapSource = TEXT } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala index 0282cdfa..7dc83f03 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala @@ -5,17 +5,14 @@ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService -import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMap import es.weso.rdfshape.server.api.routes.shapemap.logic.operations.ShapeMapInfo -import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson +import es.weso.rdfshape.server.api.routes.shapemap.service.operations.ShapeMapInfoInput import io.circe._ import io.circe.syntax.EncoderOps -import org.http4s._ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl -import org.http4s.multipart._ +import org.http4s.rho.RhoRoutes /** API service to handle shapemap-related operations * @@ -30,14 +27,15 @@ class ShapeMapService(client: Client[IO]) /** Describe the API routes handled by this service and the actions performed on each of them */ - val routes: HttpRoutes[IO] = HttpRoutes.of[IO] { + val routes: RhoRoutes[IO] = new RhoRoutes[IO] { /** Returns a JSON array with the accepted shapeMap formats. */ - case GET -> Root / `api` / `verb` / "formats" => + GET / `api` / `verb` / "formats" |>> { val formats = ApiDefinitions.availableShapeMapFormats val json = Json.fromValues(formats.map(f => Json.fromString(f.name))) Ok(json) + } /** Obtain information about a shapeMap. * Receives a JSON object with the input shapeMap information: @@ -46,30 +44,13 @@ class ShapeMapService(client: Client[IO]) * - shapeMapSource [String]: Identifies the source of the shapeMap (raw, URL, file...) * Returns a JSON object with the query inputs and results (see [[ShapeMapInfo.encodeShapeMapInfoOperation]]). */ - case req @ POST -> Root / `api` / `verb` / "info" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - - for { - // Get the schema from the partsMap - eitherShapeMap <- ShapeMap.mkShapeMap( - partsMap - ) - response <- eitherShapeMap.fold( - // If there was an error parsing the schema, return it - err => errorResponseJson(err, InternalServerError), - // Else, try and compute the schema info - shapeMap => - ShapeMapInfo - .shapeMapInfo(shapeMap) - .flatMap(info => Ok(info.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - ) - - } yield response - } + POST / `api` / `verb` / "info" ^ jsonOf[IO, ShapeMapInfoInput] |>> { + body: ShapeMapInfoInput => + ShapeMapInfo + .shapeMapInfo(body.shapeMap) + .flatMap(info => Ok(info.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala new file mode 100644 index 00000000..d9883419 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala @@ -0,0 +1,23 @@ +package es.weso.rdfshape.server.api.routes.shapemap.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMap +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.ShapeMapParameter +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +case class ShapeMapInfoInput(shapeMap: ShapeMap) + +object ShapeMapInfoInput extends ServiceRouteOperation[ShapeMapInfoInput] { + + override implicit val decoder: Decoder[ShapeMapInfoInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeShapeMap <- cursor + .downField(ShapeMapParameter.name) + .as[Either[String, ShapeMap]] + } yield maybeShapeMap.map(ShapeMapInfoInput(_)) + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala index 76369146..b0098108 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala @@ -1,11 +1,13 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.operations +import es.weso.rdfshape.server.utils.other.MyEnum + /** Enumeration of the different formats that can be requested to wikibase's API. * The "fm" formats are meant for debugging * * @see [[https://www.mediawiki.org/wiki/Wikibase/API#Request_Format]] */ -private[api] object WikibaseOperationFormats extends Enumeration { +private[api] object WikibaseOperationFormats extends MyEnum[String] { type WikibaseQueryFormat = String val JSON = "json" @@ -13,5 +15,6 @@ private[api] object WikibaseOperationFormats extends Enumeration { val XML = "xml" val XML_FM = "xmlfm" + val values = Set(JSON, JSON_FM, XML, XML_FM) val default: WikibaseQueryFormat = JSON } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala index 9c94a5ec..cfb51b09 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala @@ -104,7 +104,7 @@ private[wikibase] case class WikibaseSchemaValidate( shapeMapFinalModel <- shapeMapModel.serialize(Compact.name) trigger = TriggerShapeMap( shapeMap = ShapeMap( - shapeMapPre = Some(shapeMapFinalModel), + content = shapeMapFinalModel, nodesPrefixMap = shapeMapModel.nodesPrefixMap.addPrefixMap( Wikidata.wikidataPrefixMap ), diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala index ede2a574..36fcca7a 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -2,11 +2,21 @@ package es.weso.rdfshape.server.api import cats.effect.IO import cats.implicits.catsSyntaxOptionId +import es.weso.rdfshape.server.api.format.dataFormats.ShapeMapFormat import es.weso.rdfshape.server.api.routes.endpoint.logic.query.{ SparqlQuery, SparqlQuerySource } +import es.weso.rdfshape.server.api.routes.shapemap.logic.{ + ShapeMap, + ShapeMapSource +} import es.weso.rdfshape.server.api.swagger.SwaggerModelProperties.url +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + ContentParameter, + FormatParameter, + SourceParameter +} import org.http4s.rho.RhoMiddleware import org.http4s.rho.swagger.models._ import org.http4s.rho.swagger.syntax.{io => ioSwagger} @@ -90,6 +100,7 @@ package object swagger { /** Set of all swagger object serializers defined in [[SwaggerModels]] */ val customSwaggerSerializers = Set( + (typeOf[ShapeMap], shapeMap), (typeOf[SparqlQuery], sparqlQuery) ) @@ -103,30 +114,71 @@ package object swagger { * in the domain */ object SwaggerModels { + val shapeMap: Set[Model] = Set( + ModelImpl( + id = classOf[ShapeMap].getSimpleName, + id2 = classOf[ShapeMap].getSimpleName, + `type` = "object".some, + description = "ShapeMap matching nodes with shapes".some, + name = "ShapeMap".some, + properties = Map( + ContentParameter.name -> StringProperty( + required = true, + description = "ShapeMap contents".some, + enums = Set(), + pattern = "(@)+".some + ), + FormatParameter.name -> StringProperty( + required = true, + description = "ShapeMap format".some, + enums = ShapeMapFormat.availableFormats.map(_.name).toSet + ), + SourceParameter.name -> StringProperty( + required = true, + description = + "Source of the shapeMap content, used to know how to access it".some, + enums = SparqlQuerySource.values + ) + ), + externalDocs = ExternalDocs( + "W3C Draft - ShapeMap Structure and Language", + "https://shex.io/shape-map/" + ).some, + example = s"""{ + | "content": "@", + | "source": "${ShapeMapSource.TEXT}" + |}""".stripMargin.some + ) + ) + val sparqlQuery: Set[Model] = Set( ModelImpl( - id = "SparqlQuery", - id2 = "SparqlQuery", + id = classOf[SparqlQuery].getSimpleName, + id2 = classOf[SparqlQuery].getSimpleName, `type` = "object".some, - description = "Sparql Query description".some, + description = "SPARQL query used to query RDF data".some, name = "SPARQL Query".some, properties = Map( - "content" -> StringProperty( + ContentParameter.name -> StringProperty( required = true, - description = "Query content: textual, URL or file".some, + description = "Query contents".some, enums = Set() ), - "source" -> StringProperty( + SourceParameter.name -> StringProperty( required = true, description = "Source of the query content, used to know how to access it".some, - enums = Set("byText", "byUrl", "byFile") + enums = SparqlQuerySource.values ) ), + externalDocs = ExternalDocs( + "W3C - SPARQL query language for RDF", + "https://www.w3.org/TR/rdf-sparql-query/" + ).some, example = s"""{ - | "content": "SELECT ?a ?b ?c WHERE { ?a ?b ?c } LIMIT 1", - | "source": "${SparqlQuerySource.TEXT}" - |}""".stripMargin.some + | "content": "SELECT ?a ?b ?c WHERE { ?a ?b ?c } LIMIT 1", + | "source": "${SparqlQuerySource.TEXT}" + |}""".stripMargin.some ) ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala index 97700382..f0286df0 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala @@ -37,6 +37,8 @@ object IncomingRequestParameters { lazy val content = "content" + lazy val format = "format" + lazy val source = "source" lazy val dataSource = "dataSource" lazy val schemaSource = "schemaSource" @@ -57,7 +59,7 @@ object IncomingRequestParameters { lazy val languages = "languages" lazy val label = "label" lazy val limit = "limit" - lazy val format = "wbFormat" + lazy val wbFormat = "wbFormat" lazy val continue = "continue" lazy val withDot = "withDot" @@ -72,6 +74,14 @@ object IncomingRequestParameters { val name: String = content } + /** Parameter expected to contain the format of the content inputted by the user for a certain + * operation + */ + object FormatParameter + extends OptionalQueryParamDecoderMatcher[String](format) { + val name: String = format + } + /** Parameter expected to contain RDF data contents (URL encoded) * * @note These contents may be raw data, a URL with the data or a File with the data. @@ -335,8 +345,8 @@ object IncomingRequestParameters { * searching for data */ object WikibaseFormatParameter - extends OptionalQueryParamDecoderMatcher[String](format) { - val name: String = format + extends OptionalQueryParamDecoderMatcher[String](wbFormat) { + val name: String = wbFormat } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/MyEnum.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/MyEnum.scala new file mode 100644 index 00000000..b84ae336 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/MyEnum.scala @@ -0,0 +1,16 @@ +package es.weso.rdfshape.server.utils.other + +/** Enumeration with support for free properties and values + * + * @tparam T Type contained in the enum + */ +trait MyEnum[T] { + + /** Set of values in the enum + */ + val values: Set[T] + + /** Default value to be used + */ + val default: T +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala new file mode 100644 index 00000000..ac934e05 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala @@ -0,0 +1,29 @@ +package es.weso.rdfshape.server.utils + +import cats.implicits.catsSyntaxEitherId +import io.circe._ + +package object other { + + /** Given a decoding operation whose result may contain an error, map the + * erroring result to a [[DecodingFailure]] containing it as message + * If a native decoding failure occurred, leave it as is, else if an error + * occurred return it as a decoding failure , else return the value + * @param input Either resulting of a Circe decode operation + * @tparam L Left type of input either + * @tparam R Right type of input Either + * @return A [[Decoder.Result]] containing a Decoding failure or an item of type [[R]] + * @note This method fulfills a specific goal for this app, mainly + */ + def mapEitherToDecodeResult[L, R]( + input: Either[DecodingFailure, Either[L, R]] + ): Either[DecodingFailure, R] = { + input.fold( + _.asLeft, + { + case Left(err) => DecodingFailure(err.toString, Nil).asLeft + case Right(value) => value.asRight + } + ) + } +} From b620d411f0996cee3dff3a7f12e2a15f9989e0c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 02:13:31 +0000 Subject: [PATCH 09/50] Bump prismjs from 1.24.0 to 1.27.0 in /website Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.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.24.0...v1.27.0) --- updated-dependencies: - dependency-name: prismjs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 9e875a2e..5ad80dbf 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -6637,9 +6637,9 @@ prism-react-renderer@^1.2.1: integrity sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg== prismjs@^1.23.0: - version "1.24.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.24.0.tgz#0409c30068a6c52c89ef7f1089b3ca4de56be2ac" - integrity sha512-SqV5GRsNqnzCL8k5dfAjCNhUrF3pR0A9lTDSCUZeh/LIshheXJEaP0hwLz2t4XHivd2J/v2HR+gRnigzeKe3cQ== + 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" From d78d1e4883eee5ab6394ed5ffaa00c49fb7257ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 27 Feb 2022 15:24:31 +0000 Subject: [PATCH 10/50] Bump url-parse from 1.5.1 to 1.5.10 in /website Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.10) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- website/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 9e875a2e..9afa6e45 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -8376,9 +8376,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.4.3, url-parse@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From a182d406072da62c94a71aa594e7ac09f315935f Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Mon, 28 Feb 2022 20:07:24 +0100 Subject: [PATCH 11/50] Annotating routes and decoding input data with Rho. --- .../es/weso/rdfshape/server/Server.scala | 42 +-- .../server/api/ServiceRouteOperation.scala | 3 + .../server/api/definitions/ApiDefaults.scala | 8 +- .../api/definitions/ApiDefinitions.scala | 2 +- .../rdfshape/server/api/format/Format.scala | 10 +- .../api/format/dataFormats/DataFormat.scala | 2 +- .../format/dataFormats/GraphicFormat.scala | 2 +- .../api/format/dataFormats/HtmlFormat.scala | 2 +- .../api/format/dataFormats/RdfFormat.scala | 14 +- .../format/dataFormats/ShapeMapFormat.scala | 2 +- .../schemaFormats/SchemaFormat.scala | 2 +- .../schemaFormats/ShExFormat.scala | 2 +- .../schemaFormats/ShaclFormat.scala | 2 +- .../api/routes/data/logic/DataSource.scala | 10 +- .../data/logic/operations/DataConvert.scala | 33 +- .../data/logic/operations/DataExtract.scala | 71 ++-- .../data/logic/operations/DataQuery.scala | 54 ++- .../api/routes/data/logic/types/Data.scala | 97 +++-- .../data/logic/types/DataEndpoint.scala | 130 ------- .../routes/data/logic/types/DataSingle.scala | 180 +++++----- .../logic/types/merged/DataCompound.scala | 121 ++++--- .../api/routes/data/service/DataService.scala | 306 +++++----------- .../service/operations/DataConvertInput.scala | 42 +++ .../service/operations/DataExtractInput.scala | 76 ++++ .../service/operations/DataInfoInput.scala | 25 ++ .../service/operations/DataQueryInput.scala | 43 +++ .../endpoint/logic/query/SparqlQuery.scala | 74 ++-- .../endpoint/service/EndpointService.scala | 14 +- .../schema/logic/aux/SchemaAdapter.scala | 33 +- .../logic/operations/SchemaConvert.scala | 86 ++--- .../logic/operations/SchemaValidate.scala | 84 +++-- .../schema/logic/trigger/TriggerMode.scala | 81 +++-- .../logic/trigger/TriggerModeType.scala | 7 +- .../logic/trigger/TriggerShapeMap.scala | 87 ++++- .../trigger/TriggerTargetDeclarations.scala | 28 +- .../routes/schema/logic/types/Schema.scala | 74 ++-- .../schema/logic/types/SchemaSimple.scala | 191 +++++----- .../routes/schema/service/SchemaService.scala | 300 +++++----------- .../operations/SchemaConvertInput.scala | 65 ++++ .../service/operations/SchemaInfoInput.scala | 27 ++ .../operations/SchemaValidateInput.scala | 54 +++ .../api/routes/shapemap/logic/ShapeMap.scala | 99 ++--- .../shapemap/service/ShapeMapService.scala | 4 - .../operations/ShapeMapInfoInput.scala | 4 + .../operations/WikibaseOperationDetails.scala | 117 +++++- .../schema/WikibaseSchemaExtract.scala | 2 +- .../schema/WikibaseSchemaValidate.scala | 6 +- .../search/WikibaseSearchEntity.scala | 2 +- .../search/WikibaseSearchOperation.scala | 4 + .../search/WikibaseSearchTypes.scala | 10 +- .../wikibase/service/WikibaseService.scala | 340 ++++++------------ .../operations/WikibaseOperationInput.scala | 28 ++ .../operations/WikibaseValidateInput.scala | 46 +++ .../IncomingRequestParameters.scala | 44 ++- .../server/implicits/codecs/package.scala | 24 +- .../implicits/query_parsers/package.scala | 28 ++ .../implicits/string_parsers/package.scala | 44 +++ .../rdfshape/server/utils/other/package.scala | 11 +- version.sbt | 2 +- 59 files changed, 1754 insertions(+), 1547 deletions(-) delete mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataEndpoint.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataConvertInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataExtractInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataInfoInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataQueryInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaConvertInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaInfoInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaValidateInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseOperationInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseValidateInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index 7b67c00c..c7555706 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -1,7 +1,6 @@ package es.weso.rdfshape.server import cats.effect._ -import cats.implicits.toSemigroupKOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.Server._ import es.weso.rdfshape.server.api.routes.api.service.BaseService @@ -191,36 +190,23 @@ object Server { s.main(Array.empty[String]) } - /** Configure the http4s application to use the specified sources as API routes + /** Application's global service composed of all routes and CORS configuration */ private def routesService(client: Client[IO]): HttpRoutes[IO] = { - val routesFromRho = - (BaseService(client).routes and - ShapeMapService(client).routes and - PermalinkService(client).routes and - EndpointService(client).routes and - FetchService(client).routes) - .toRoutes(swaggerMiddleware) - val allRoutes = - routesFromRho <+> - DataService(client).routes <+> - SchemaService(client).routes <+> - WikibaseService(client).routes - - corsConfiguration.apply(allRoutes) + corsConfiguration.apply(allRoutes(client)) } - /** All route functions composed into one - * @note <+> is part of cats syntax for composing functions - */ -// def allRoutes(client: Client[IO]): HttpRoutes[IO] = -// BaseService(client).routes <+> -// DataService(client).routes <+> -// SchemaService(client).routes <+> -// ShapeMapService(client).routes <+> -// WikibaseService(client).routes <+> -// EndpointService(client).routes <+> -// PermalinkService(client).routes <+> -// FetchService(client).routes + /** All Rho route functions composed into one with swagger middleware + */ + private def allRoutes(client: Client[IO]): HttpRoutes[IO] = + (BaseService(client).routes and + DataService(client).routes and + SchemaService(client).routes and + ShapeMapService(client).routes and + WikibaseService(client).routes and + PermalinkService(client).routes and + EndpointService(client).routes and + FetchService(client).routes) + .toRoutes(swaggerMiddleware) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala index 0fc5f731..dd5ab39d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/ServiceRouteOperation.scala @@ -5,6 +5,9 @@ import io.circe.Decoder /** This trait defines an operation performed by a route in a service * and the way to decode the incoming data into the required object * + * All errors occurred during object instantiation will be mapped to + * DecodingErrors + * * @tparam C Type into which the client data will be decoded for usage in this route */ trait ServiceRouteOperation[C] { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala index 33888440..29af5b5f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefaults.scala @@ -31,19 +31,19 @@ case object ApiDefaults { /** [[DataFormat]] used when the format can be omitted or is needed but none was provided */ - val defaultDataFormat: DataFormat = DataFormat.defaultFormat + val defaultDataFormat: DataFormat = DataFormat.default /** [[RdfFormat]] used when the format can be omitted or is needed but none was provided */ - val defaultRdfFormat: RdfFormat = RdfFormat.defaultFormat + val defaultRdfFormat: RdfFormat = RdfFormat.default /** [[SchemaFormat]] used when the format can be omitted or is needed but none was provided */ - val defaultSchemaFormat: SchemaFormat = ShaclFormat.defaultFormat + val defaultSchemaFormat: SchemaFormat = ShaclFormat.default /** [[ShapeMapFormat]] used when the format can be omitted or is needed but none was provided */ - val defaultShapeMapFormat: ShapeMapFormat = ShapeMapFormat.defaultFormat + val defaultShapeMapFormat: ShapeMapFormat = ShapeMapFormat.default /** Schema engined ([[SchemaW]]) used when the engine can be omitted or is needed but none was provided */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefinitions.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefinitions.scala index 2db70fe5..7652bccb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefinitions.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/definitions/ApiDefinitions.scala @@ -45,7 +45,7 @@ case object ApiDefinitions { ShapeMap.formats .map(f => ShapeMapFormat.fromString(f)) .filter(_.isRight) - .map(_.getOrElse(ShapeMapFormat.defaultFormat)) + .map(_.getOrElse(ShapeMapFormat.default)) /** [[List]] of [[TriggerMode]]s accepted by the application, by name * diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala index 9c0ed3a5..aafc14f4 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala @@ -32,7 +32,7 @@ trait Format { object Format extends FormatCompanion[Format] { - override val defaultFormat: Format = DataFormat.defaultFormat + override val default: Format = DataFormat.default // Should append all available formats in the future. // Currently, all formats are data formats. @@ -48,7 +48,7 @@ trait FormatCompanion[F <: Format] extends LazyLogging { /** Default format to be used when none specified */ - val defaultFormat: F + val default: F /** List of all formats available for the current type of entity */ @@ -73,10 +73,10 @@ trait FormatCompanion[F <: Format] extends LazyLogging { * @note The decoder is simplified because the client normally sends the format name only, like: * "format": "turtle" */ - implicit val decoder: Decoder[F] = (cursor: HCursor) => + implicit val decoder: Decoder[Either[String, F]] = (cursor: HCursor) => for { formatStr <- cursor.value.as[String] - format = fromString(formatStr).toOption.getOrElse(defaultFormat) + format = fromString(formatStr) } yield format /** Try to build a Format object from a request's parameters @@ -110,7 +110,7 @@ trait FormatCompanion[F <: Format] extends LazyLogging { * @return the Format object with the format data (an error String if it does not exist) */ def fromString(name: String): Either[String, F] = { - if(name.isBlank) Right(defaultFormat) + if(name.isBlank) Right(default) else { formatsMap.get(name.toLowerCase) match { case None => diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/DataFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/DataFormat.scala index 52e38947..095dda71 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/DataFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/DataFormat.scala @@ -22,7 +22,7 @@ object DataFormat extends FormatCompanion[DataFormat] { GraphicFormat.availableFormats ++ ShapeMapFormat.availableFormats ++ List(Json, Dot)).distinct - override val defaultFormat: DataFormat = Json + override val default: DataFormat = Json } /** Represents the mime-type "application/json" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/GraphicFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/GraphicFormat.scala index 06f3dbbe..688f2749 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/GraphicFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/GraphicFormat.scala @@ -20,7 +20,7 @@ object GraphicFormat extends FormatCompanion[GraphicFormat] { override lazy val availableFormats: List[GraphicFormat] = List(Svg, Png, PS) - override val defaultFormat: GraphicFormat = Svg + override val default: GraphicFormat = Svg } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/HtmlFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/HtmlFormat.scala index 71335d42..48c45680 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/HtmlFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/HtmlFormat.scala @@ -19,7 +19,7 @@ object HtmlFormat extends FormatCompanion[HtmlFormat] { HtmlRdfa11, HtmlMicrodata ) - override val defaultFormat: HtmlFormat = HtmlRdfa11 + override val default: HtmlFormat = HtmlRdfa11 } /** Represents the mime-type "text/html" when used along rdfa11 diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/RdfFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/RdfFormat.scala index 80ac22f5..eaa6adeb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/RdfFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/RdfFormat.scala @@ -1,6 +1,7 @@ package es.weso.rdfshape.server.api.format.dataFormats import es.weso.rdfshape.server.api.format.FormatCompanion +import es.weso.rdfshape.server.api.routes.data.logic.types.merged.DataCompound import org.http4s.MediaType /** Dummy class to differentiate RDF formats from the more generic DataFormat @@ -22,9 +23,10 @@ object RdfFormat extends FormatCompanion[RdfFormat] { Trig, JsonLd, RdfXml, - RdfJson + RdfJson, + Mixed ) - override val defaultFormat: RdfFormat = Turtle + override val default: RdfFormat = Turtle } /** Represents the mime-type "text/turtle" @@ -82,3 +84,11 @@ case object RdfJson formatName = "RDF/JSON", formatMimeType = MediaType.application.json ) + +/** Fictional format used in [[DataCompound]] instances + */ +case object Mixed + extends RdfFormat( + formatName = "mixed", + formatMimeType = new MediaType("application", "mixed") + ) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/ShapeMapFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/ShapeMapFormat.scala index 495df76e..c1b4a20e 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/ShapeMapFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/ShapeMapFormat.scala @@ -22,7 +22,7 @@ object ShapeMapFormat extends FormatCompanion[ShapeMapFormat] { Compact, new ShapeMapFormat(Json) ) - override val defaultFormat: ShapeMapFormat = Compact + override val default: ShapeMapFormat = Compact } /** Represents the mime-type "text/shex" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/SchemaFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/SchemaFormat.scala index 1af48658..4894d940 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/SchemaFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/SchemaFormat.scala @@ -23,5 +23,5 @@ object SchemaFormat extends FormatCompanion[SchemaFormat] { (ShExFormat.availableFormats ++ ShaclFormat.availableFormats).distinct } - override val defaultFormat: SchemaFormat = ShExC + override val default: SchemaFormat = ShExC } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShExFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShExFormat.scala index 17a8a01f..05f862a8 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShExFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShExFormat.scala @@ -23,7 +23,7 @@ object ShExFormat extends FormatCompanion[ShExFormat] { ShExC, ShExJ ) - override val defaultFormat: ShExFormat = ShExC + override val default: ShExFormat = ShExC } /** Represents the mime-type "text/shexc" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShaclFormat.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShaclFormat.scala index c3637040..1c0ab075 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShaclFormat.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/dataFormats/schemaFormats/ShaclFormat.scala @@ -28,5 +28,5 @@ object ShaclFormat extends FormatCompanion[ShaclFormat] { new ShaclFormat(JsonLd), new ShaclFormat(RdfXml) ) - override val defaultFormat: ShaclFormat = new ShaclFormat(Turtle) + override val default: ShaclFormat = new ShaclFormat(Turtle) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala index 6a850841..d23f3594 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/DataSource.scala @@ -9,14 +9,12 @@ import es.weso.rdfshape.server.utils.other.MyEnum */ private[api] object DataSource extends MyEnum[String] { type DataSource = String - val TEXT = "byText" val URL = "byUrl" val FILE = "byFile" - val COMPOUND = "compoundData" - val ENDPOINT = "dataEndpoint" + val COMPOUND = "byCompound" - override val values = - Set(TEXT, URL, FILE, COMPOUND, ENDPOINT) - override val default: DataSource = TEXT + val values = + Set(TEXT, URL, FILE, COMPOUND) + val default: DataSource = TEXT } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataConvert.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataConvert.scala index e43cba68..b6d6c11d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataConvert.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataConvert.scala @@ -40,8 +40,6 @@ private[api] object DataConvert extends LazyLogging { private lazy val rdfDataFormatNames: immutable.Seq[String] = RDFAsJenaModel.availableFormats.map(_.toUpperCase) - private val successMessage = "Conversion successful" - /** Convert a [[DataConvert]] to its JSON representation * * @return JSON representation of the conversion result @@ -57,6 +55,7 @@ private[api] object DataConvert extends LazyLogging { ) ) } + private val successMessage = "Conversion successful" /** Perform the actual conversion operation between RDF text formats * @@ -87,21 +86,18 @@ private[api] object DataConvert extends LazyLogging { case JsonFormat => IO { DataSingle( - dataPre = Option(sgraph.toJson.spaces2), - dataFormat = JsonFormat, - inference = targetInference, - dataSource = inputData.dataSource + content = sgraph.toJson.spaces2, + format = JsonFormat, + inference = targetInference ) } case Dot => IO { DataSingle( - dataPre = - Option(sgraph.toDot(RDFDotPreferences.defaultRDFPrefs)), - dataFormat = Dot, - inference = targetInference, - dataSource = inputData.dataSource + content = sgraph.toDot(RDFDotPreferences.defaultRDFPrefs), + format = Dot, + inference = targetInference ) } case _ if RdfFormat.availableFormats.contains(targetFormat) => @@ -109,20 +105,17 @@ private[api] object DataConvert extends LazyLogging { .serialize(targetFormat.name) .map(data => { DataSingle( - dataPre = Option(data), - dataFormat = targetFormat, - inference = targetInference, - dataSource = inputData.dataSource + content = data, + format = targetFormat, + inference = targetInference ) }) case _ if GraphicFormat.availableFormats.contains(targetFormat) => IO { DataSingle( - dataPre = - Option(sgraph.toDot(RDFDotPreferences.defaultRDFPrefs)), - dataFormat = targetFormat, - inference = targetInference, - dataSource = inputData.dataSource + content = sgraph.toDot(RDFDotPreferences.defaultRDFPrefs), + format = targetFormat, + inference = targetInference ) } case t => diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataExtract.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataExtract.scala index f8b7d42b..585330c3 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataExtract.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataExtract.scala @@ -38,6 +38,23 @@ final case class DataExtract private ( */ private[api] object DataExtract extends LazyLogging { + /** Convert a [[DataExtract]] to its JSON representation + * + * @return JSON representation of the extraction result + */ + + implicit val encodeDataExtractOperation: Encoder[DataExtract] = + (dataExtract: DataExtract) => { + Json.fromFields( + List( + ("message", Json.fromString(dataExtract.successMessage)), + ("data", dataExtract.inputData.asJson), + ("schemaFormat", dataExtract.schemaFormat.asJson), + ("schemaEngine", Json.fromString(dataExtract.schemaEngine.name)), + ("result", dataExtract.result.asJson) + ) + ) + } private val successMessage = "Extraction successful" /** Common infer options to all extraction operations @@ -52,6 +69,24 @@ private[api] object DataExtract extends LazyLogging { sortFunction = InferOptions.orderByIRI ) + /** Encoder for [[DataExtractResult]] + */ + private implicit val encodeDataExtractResult: Encoder[DataExtractResult] = + (dataExtract: DataExtractResult) => + Json.fromFields( + List( + ( + "schema", + Json.fromString( + dataExtract.schema + .serialize(dataExtract.targetSchemaFormat.name) + .unsafeRunSync() + ) + ), + ("shapeMap", Json.fromString(dataExtract.shapeMap.toString)) + ) + ) + /** Extract Shex from a given RDF input * * @param inputData Input data for the extraction @@ -124,42 +159,6 @@ private[api] object DataExtract extends LazyLogging { } yield finalResult } - /** Encoder for [[DataExtractResult]] - */ - private implicit val encodeDataExtractResult: Encoder[DataExtractResult] = - (dataExtract: DataExtractResult) => - Json.fromFields( - List( - ( - "schema", - Json.fromString( - dataExtract.schema - .serialize(dataExtract.targetSchemaFormat.name) - .unsafeRunSync() - ) - ), - ("shapeMap", Json.fromString(dataExtract.shapeMap.toString)) - ) - ) - - /** Convert a [[DataExtract]] to its JSON representation - * - * @return JSON representation of the extraction result - */ - - implicit val encodeDataExtractOperation: Encoder[DataExtract] = - (dataExtract: DataExtract) => { - Json.fromFields( - List( - ("message", Json.fromString(dataExtract.successMessage)), - ("data", dataExtract.inputData.asJson), - ("schemaFormat", dataExtract.schemaFormat.asJson), - ("schemaEngine", Json.fromString(dataExtract.schemaEngine.name)), - ("result", dataExtract.result.asJson) - ) - ) - } - /** Case class representing the results to be returned when performing a data-info operation */ final case class DataExtractResult private ( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala index 95caebbb..ea84094f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/operations/DataQuery.scala @@ -26,6 +26,19 @@ final case class DataQuery private ( /** Static utilities to perform SPARQL queries on RDF data */ private[api] object DataQuery { + + /** Encoder for [[DataQuery]] + */ + implicit val encodeDataQueryOperation: Encoder[DataQuery] = + (dataQuery: DataQuery) => + Json.fromFields( + List( + ("message", Json.fromString(dataQuery.successMessage)), + ("data", dataQuery.inputData.asJson), + ("query", dataQuery.inputQuery.asJson), + ("result", dataQuery.result.json) + ) + ) private val successMessage = "Query executed successfully" /** Given an input data and query, perform the query on the data @@ -36,22 +49,18 @@ private[api] object DataQuery { */ def dataQuery(data: Data, query: SparqlQuery): IO[DataQuery] = - query.fetchedContents match { - case Left(err) => IO.raiseError(new RuntimeException(err)) - case Right(raw) => - for { - rdf <- data.toRdf() // Get the RDF reader - resultJson <- rdf.use( - _.queryAsJson(raw) - ) // Perform query - } yield DataQuery( // Form the results object - inputData = data, - inputQuery = query, - result = DataQueryResult( - json = resultJson - ) - ) - } + for { + rdf <- data.toRdf() // Get the RDF reader + resultJson <- rdf.use( + _.queryAsJson(query.raw) + ) // Perform query + } yield DataQuery( // Form the results object + inputData = data, + inputQuery = query, + result = DataQueryResult( + json = resultJson + ) + ) /** Case class representing the results to be returned when performing a data-query operation * @note Currently limited to JSON formatted results for convenience @@ -60,17 +69,4 @@ private[api] object DataQuery { json: Json ) - /** Encoder for [[DataQuery]] - */ - implicit val encodeDataQueryOperation: Encoder[DataQuery] = - (dataQuery: DataQuery) => - Json.fromFields( - List( - ("message", Json.fromString(dataQuery.successMessage)), - ("data", dataQuery.inputData.asJson), - ("query", dataQuery.inputQuery.asJson), - ("result", dataQuery.result.json) - ) - ) - } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala index 4272e5c6..8d926bb6 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala @@ -1,35 +1,62 @@ package es.weso.rdfshape.server.api.routes.data.logic.types import cats.effect.{IO, Resource} +import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging -import es.weso.rdf.RDFReasoner import es.weso.rdf.nodes.IRI +import es.weso.rdf.{PrefixMap, RDFReasoner} import es.weso.rdfshape.server.api.format.dataFormats.DataFormat -import es.weso.rdfshape.server.api.routes.data.logic.DataSource.DataSource +import es.weso.rdfshape.server.api.routes.data.logic.DataSource._ import es.weso.rdfshape.server.api.routes.data.logic.types.merged.DataCompound import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ CompoundDataParameter, - EndpointParameter + SourceParameter } import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import io.circe.{Decoder, Encoder, HCursor} +import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} /** Common trait to all data, whichever its nature (single, compound, endpoint...) */ trait Data { - /** Either the raw RDF content represented as a String, - * or the error occurred when trying to parse the data + /** Lazily obtain the prefix map of this data instance + * Needs to create the in-memory RDF model first */ - lazy val rawData: Either[String, String] = Left("") + lazy val prefixMap: IO[PrefixMap] = for { + model <- this.toRdf() + pm <- model.use(_.getPrefixMap) + } yield pm + + /** Given the user input for the data and its source, fetch the contents + * using the input in the way the source needs it + * (e.g.: for URLs, fetch the input with a web request; for files, + * decode the input; for raw data, do nothing) + * + * @return Either the raw data contents represented as a String, + * or the error occurred when trying to parse the schema + */ + val fetchedContents: Either[String, String] + + /** Raw data value, i.e.: the text forming the schema + * + * @note It is safely extracted from [[fetchedContents]] after asserting + * the [[source]] and fetched contents are right + */ + val raw: String /** Source where the data comes from */ - val dataSource: DataSource + val source: DataSource /** Format of the data */ - val format: Option[DataFormat] = None + val format: DataFormat + + /** @return A String with the raw contents or the error that made them + * un-parseable + */ + override def toString: String = + fetchedContents.fold(identity, identity) /** Given an RDF source of data, try to parse it and get the RDF model representation * @@ -40,49 +67,45 @@ trait Data { object Data extends DataCompanion[Data] { - /** Dummy implementation meant to be overridden - * - * @note Resort by default to [[DataSingle]]'s empty representation - */ - override val emptyData: Data = DataSingle.emptyData - /** Dummy implementation meant to be overridden. * If called on a general [[Data]] instance, pattern match among the available data types to * use the correct implementation */ - implicit val encodeData: Encoder[Data] = { - case ds: DataSingle => DataSingle.encodeData(ds) - case de: DataEndpoint => DataEndpoint.encodeData(de) - case dc: DataCompound => DataCompound.encodeData(dc) + implicit val encode: Encoder[Data] = { + case ds: DataSingle => DataSingle.encode(ds) + case dc: DataCompound => DataCompound.encode(dc) } /** Dummy implementation meant to be overridden - * If called on a general [[Data]] instance, pattern match among the available data types to - * use the correct implementation + * If called on a general [[Data]] instance, look for the data source to + * redirecting the decoding to the correct implementation + * * @note Defaults to [[DataSingle]]'s implementation */ - implicit val decodeData: Decoder[Data] = (cursor: HCursor) => { - this.getClass match { - case de if de == classOf[DataEndpoint] => DataEndpoint.decodeData(cursor) - case dc if dc == classOf[DataCompound] => DataCompound.decodeData(cursor) - case _ => DataSingle.decodeData(cursor) - } - } + implicit val decode: Decoder[Either[String, Data]] = (cursor: HCursor) => + for { + source <- cursor + .downField(SourceParameter.name) + .as[DataSource] + + decoded <- source match { + case COMPOUND => DataCompound.decode(cursor) + case TEXT | URL | FILE => DataSingle.decode(cursor) + case _ => DecodingFailure(s"Invalid data source '$source'", Nil).asLeft + } + } yield decoded /** General implementation delegating on subclasses */ override def mkData(partsMap: PartsMap): IO[Either[String, Data]] = for { // 1. Make some checks on the parameters to distinguish between Data types - compoundData <- partsMap.optPartValue(CompoundDataParameter.name) - paramEndpoint <- partsMap.optPartValue(EndpointParameter.name) + compoundData <- partsMap.optPartValue(CompoundDataParameter.name) // 2. Delegate on the correct sub-class for creating the Data maybeData <- { // 1. Compound data if(compoundData.isDefined) DataCompound.mkData(partsMap) - // 2. Endpoint data - else if(paramEndpoint.isDefined) DataEndpoint.mkData(partsMap) - // 3. Simple data or unknown + // 2. Simple data or unknown else DataSingle.mkData(partsMap) } @@ -95,17 +118,13 @@ object Data extends DataCompanion[Data] { */ private[data] trait DataCompanion[D <: Data] extends LazyLogging { - /** Empty instance of the [[Data]] representation in use - */ - val emptyData: D - /** Encoder used to transform [[Data]] instances to JSON values */ - implicit val encodeData: Encoder[D] + implicit val encode: Encoder[D] /** Decoder used to extract [[Data]] instances from JSON values */ - implicit val decodeData: Decoder[D] + implicit val decode: Decoder[Either[String, D]] /** Given a request's parameters, try to extract an instance of [[Data]] (type [[D]]) from them * diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataEndpoint.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataEndpoint.scala deleted file mode 100644 index ebeffe96..00000000 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataEndpoint.scala +++ /dev/null @@ -1,130 +0,0 @@ -package es.weso.rdfshape.server.api.routes.data.logic.types - -import cats.effect.{IO, Resource} -import com.typesafe.scalalogging.LazyLogging -import es.weso.rdf.jena.RDFAsJenaModel -import es.weso.rdf.nodes.IRI -import es.weso.rdfshape.server.api.definitions.ApiDefaults -import es.weso.rdfshape.server.api.format.dataFormats.DataFormat -import es.weso.rdfshape.server.api.routes.data.logic.DataSource -import es.weso.rdfshape.server.api.routes.data.logic.DataSource.DataSource -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ - DataFormatParameter, - EndpointParameter -} -import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents -import io.circe.syntax.EncoderOps -import io.circe.{Decoder, Encoder, HCursor, Json} - -import scala.util.matching.Regex - -/** RDF data obtained from a given endpoint - * - * @param endpoint IRI with the RDF data - * @param dataFormat Data format - */ -case class DataEndpoint( - endpoint: IRI, - dataFormat: DataFormat = DataFormat.defaultFormat -) extends Data - with LazyLogging { - - override lazy val rawData: Either[String, String] = getUrlContents( - endpoint.uri.toString - ) - override val dataSource: DataSource = DataSource.ENDPOINT - override val format: Option[DataFormat] = Some(dataFormat) - - override def toRdf( - relativeBase: Option[IRI] - ): IO[Resource[IO, RDFAsJenaModel]] = { - RDFAsJenaModel.fromIRI(this.endpoint, dataFormat.name, relativeBase) - } - - override def toString: String = { - rawData.getOrElse("") - } -} - -private[api] object DataEndpoint extends DataCompanion[DataEndpoint] { - override lazy val emptyData: DataEndpoint = DataEndpoint(defaultIri) - private val defaultIri = IRI("http://www.example.org") - - /** Regular expressions used for identifying if a custom endpoint was given for this data sample - */ - private val endpointRegex: Regex = "Endpoint: (.+)".r - - override implicit val encodeData: Encoder[DataEndpoint] = - (data: DataEndpoint) => - Json.obj( - ("endpoint", Json.fromString(data.endpoint.str)), - ("source", Json.fromString(DataSource.ENDPOINT)), - ("format", data.dataFormat.asJson) - ) - - override def mkData(partsMap: PartsMap): IO[Either[String, DataEndpoint]] = - for { - // Parse params - paramEndpoint <- partsMap.optPartValue(EndpointParameter.name) - paramFormat <- DataFormat.fromRequestParams( - DataFormatParameter.name, - partsMap - ) - - // Get final endpoint and format - endpoint = getEndpoint(paramEndpoint) - format = paramFormat.getOrElse(ApiDefaults.defaultDataFormat) - - // Try to create data - maybeData: Either[String, DataEndpoint] = - if(endpoint.isDefined) { - logger.debug(s"RDF Data received - Endpoint Data: ${endpoint.get}") - IRI - .fromString(endpoint.get) - .fold( - err => Left(s"Could not read endpoint data: $err"), - iri => Right(DataEndpoint(iri, format)) - ) - - } else Left("No endpoint provided") - - } yield maybeData.flatMap(_.rawData.flatMap(_ => maybeData)) - - override implicit val decodeData: Decoder[DataEndpoint] = (cursor: HCursor) => - { - for { - endpoint <- cursor.downField("endpoint").as[String] - - dataFormat <- cursor - .downField("format") - .as[DataFormat] - .orElse(Right(ApiDefaults.defaultDataFormat)) - - base = DataEndpoint.emptyData.copy( - endpoint = IRI.fromString(endpoint).getOrElse(defaultIri), - dataFormat = dataFormat - ) - - } yield base - } - - /** @param endpointStr String containing the endpoint - * @param endpointRegex Regex used to look for the endpoint in the string - * @return Optionally, the endpoint contained in a given data string - */ - private def getEndpoint( - endpointStr: Option[String], - endpointRegex: Regex = endpointRegex - ): Option[String] = { - endpointStr match { - case None => None - case Some(endpoint) => - endpoint match { - case endpointRegex(endpoint) => Some(endpoint) - case rawEndpoint => Some(rawEndpoint) - } - - } - } -} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala index f190cd25..a16c0020 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala @@ -1,6 +1,7 @@ package es.weso.rdfshape.server.api.routes.data.logic.types import cats.effect._ +import cats.implicits.toBifunctorOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.jena._ import es.weso.rdf.nodes.IRI @@ -17,91 +18,78 @@ import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import io.circe._ import io.circe.syntax.EncoderOps +import scala.util.Try + /** Data class representing a single RDF data instance with its inner content, format and source * * @note Invalid initial data is accepted, but may cause errors when operating with it. - * @param dataPre RDF data, as it is received before being processed depending on the [[dataSource]] - * @param dataFormat Data format - * @param inference Data inference - * @param dataSource Origin source, used to know how to process the raw data + * @param content RDF data, as it is received before being processed depending on the [[source]] + * @param format Data format + * @param inference Data inference + * @param source Origin source, used to know how to process the raw data */ sealed case class DataSingle( - private val dataPre: Option[String], - private val dataFormat: DataFormat, - inference: InferenceEngine, - override val dataSource: DataSource + private val content: String, + override val format: DataFormat = DataFormat.default, + inference: InferenceEngine = NONE, + override val source: DataSource = DataSource.default ) extends Data with LazyLogging { - /** Given the user input [[dataPre]] for the data and its source, fetch the Data contents using the input in the way the source needs it - * (e.g.: for URLs, fetch the input with a web request; for files, decode the input; for raw data, do nothing) - * - * @return Either an error creating the raw data or a String containing the final text - */ - override lazy val rawData: Either[String, String] = - dataPre.map(_.trim) match { - case None | Some("") => Left("Could not build the RDF from empty data") - case Some(userData) => - dataSource match { - case DataSource.TEXT | // Raw text input by user - DataSource.FILE | // File input already decoded to string - DataSource.COMPOUND => // Compound data already processed by server - Right(userData) - - case DataSource.URL => - getUrlContents(userData) - - case other => - val msg = s"Unknown data source: $other" - logger.warn(msg) - Left(msg) - } - } + // Non empty content + assume(!content.isBlank, "Could not build the RDF from empty data") + // Valid source + assume( + DataSource.values.exists(_ equalsIgnoreCase source), + s"Unknown data source: '$source'" + ) + + override lazy val fetchedContents: Either[String, String] = { + if(source equalsIgnoreCase DataSource.URL) + getUrlContents(content) + // Text or file + else Right(content) + } - // Override and make publicly available the trait properties - override val format: Option[DataFormat] = Option(dataFormat) + // Fetched contents successfully + assume( + fetchedContents.isRight, + fetchedContents.left.getOrElse("Unknown error creating the data") + ) + + override val raw: String = fetchedContents.toOption.get /** Given an RDF source of data, try to get the RDF model representation * * @return RDF (Jena) model of RDF data received from a client - * @note Iteratively compares the different possible values of activeDataTab against the one the client attached to decide an extracting strategy */ override def toRdf( relativeBase: Option[IRI] = None ): IO[Resource[IO, RDFAsJenaModel]] = { - - rawData match { - case Right(data) => - for { - rdf <- rdfFromString(data, dataFormat, relativeBase.map(_.str)) - result = rdf.evalMap(rdf => rdf.applyInference(inference)) - - } yield result - case Left(_) => RDFAsJenaModel.empty.flatMap(e => IO(e)) - } - + for { + rdf <- rdfFromString(raw, format, relativeBase.map(_.str)) + result = rdf.evalMap(rdf => rdf.applyInference(inference)) + } yield result } - override def toString: String = rawData.toString - - /** @param dataStr RDF data as a raw string - * @param format RDF data format - * @param base Base + /** @param input RDF data as a raw string + * @param format RDF data format + * @param base Base * @return An RDF model extracted from the input data */ private def rdfFromString( - dataStr: String, + input: String, format: DataFormat, base: Option[String] ): IO[Resource[IO, RDFAsJenaModel]] = { logger.debug(s"RDF from string with format: $format") val formatName = format.name if(HtmlToRdf.availableExtractorNames.contains(formatName)) - IO(HtmlToRdf.extractFromString(dataStr, formatName)) + IO(HtmlToRdf.extractFromString(input, formatName)) else for { baseIri <- mkBase(base) - res <- RDFAsJenaModel.fromChars(dataStr, format.name, baseIri) + res <- RDFAsJenaModel.fromChars(input, format.name, baseIri) } yield res } @@ -126,56 +114,58 @@ private[api] object DataSingle extends DataCompanion[DataSingle] with LazyLogging { - /** Empty data representation, with no inner data and all defaults or None - */ - override lazy val emptyData: DataSingle = - DataSingle( - dataPre = None, - dataFormat = ApiDefaults.defaultDataFormat, - inference = NONE, - dataSource = ApiDefaults.defaultDataSource - ) - - override implicit val encodeData: Encoder[DataSingle] = + override implicit val encode: Encoder[DataSingle] = (data: DataSingle) => Json.obj( - ("data", data.rawData.toOption.asJson), - ("format", data.dataFormat.asJson), + ("content", data.fetchedContents.toOption.asJson), + ("format", data.format.asJson), ("inference", data.inference.asJson), - ("source", data.dataSource.asJson) + ("source", data.source.asJson) ) - override implicit val decodeData: Decoder[DataSingle] = - (cursor: HCursor) => - for { - data <- cursor.downField("data").as[Option[String]] - - dataFormat <- cursor - .downField("dataFormat") - .as[RdfFormat] - - dataInference <- + override implicit val decode: Decoder[Either[String, DataSingle]] = + (cursor: HCursor) => { + val dataInfo = for { + content <- cursor + .downField(ContentParameter.name) + .as[String] + .map(_.trim) + + format <- cursor + .downField(FormatParameter.name) + .as[Either[String, RdfFormat]] + + inference <- cursor - .downField("dataInference") + .downField(InferenceParameter.name) .as[InferenceEngine] - dataSource <- cursor - .downField("dataSource") + source <- cursor + .downField(SourceParameter.name) .as[DataSource] - .orElse(Right(DataSource.default)) - - decoded = DataSingle.emptyData.copy( - dataPre = data, - dataFormat = dataFormat, - dataSource = dataSource, - inference = dataInference - ) - } yield decoded + } yield (content, format, inference, source) + + dataInfo.map { + /* Destructure and try to build the object, catch the exception as error + * message if needed */ + case (content, maybeFormat, inference, source) => + for { + format <- maybeFormat + data <- Try { + DataSingle(content, format, inference, source) + }.toEither.leftMap(err => + s"Could not build the schema from user data:\n ${err.getMessage}" + ) + } yield data + } + } override def mkData(partsMap: PartsMap): IO[Either[String, DataSingle]] = for { // Data param as sent by client - paramData <- partsMap.optPartValue(DataParameter.name) + paramData <- partsMap + .optPartValue(DataParameter.name) + .map(_.getOrElse("")) paramFormat <- DataFormat.fromRequestParams( DataFormatParameter.name, partsMap @@ -195,13 +185,13 @@ private[api] object DataSingle // Create the data instance data = DataSingle( - dataPre = paramData, - dataFormat = format, + content = paramData, + format = format, inference = inference, - dataSource = dataSource + source = dataSource ) - } yield data.rawData.map(_ => data) + } yield data.fetchedContents.map(_ => data) /** @param inferenceStr String representing the inference value * @return Optionally, the inference contained in a given data string diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala index f4fe4641..c891372a 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala @@ -6,16 +6,18 @@ import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.RDFReasoner import es.weso.rdf.jena.RDFAsJenaModel import es.weso.rdf.nodes.IRI -import es.weso.rdfshape.server.api.format.dataFormats.DataFormat +import es.weso.rdfshape.server.api.format.dataFormats.{DataFormat, Mixed} import es.weso.rdfshape.server.api.routes.data.logic.DataSource import es.weso.rdfshape.server.api.routes.data.logic.DataSource.DataSource import es.weso.rdfshape.server.api.routes.data.logic.types.{ Data, DataCompanion, - DataEndpoint, DataSingle } -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.CompoundDataParameter +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + CompoundDataParameter, + ContentParameter +} import es.weso.rdfshape.server.api.utils.parameters.PartsMap import io.circe._ import io.circe.parser._ @@ -27,24 +29,33 @@ import io.circe.syntax._ */ case class DataCompound(elements: List[Data]) extends Data with LazyLogging { + // Non empty content + assume(elements.nonEmpty, "Could not build the RDF from an empty set of data") + // Valid source + override val source: DataSource = DataSource.COMPOUND + // Use the first element's format as placeholder + override val format: DataFormat = Mixed + /** Return the compound of all the inner element's data appended to each other. * * @note If one element's data cannot be computed, returns none. */ - override lazy val rawData: Either[String, String] = { + override lazy val fetchedContents: Either[String, String] = { val definedElements = - elements.map(_.rawData).filter(_.isRight).map(_.toOption.get) + elements.map(_.fetchedContents).filter(_.isRight).map(_.toOption.get) // If all elements' raw data was computed... if(elements.length == definedElements.length) Right(definedElements.mkString("\n")) else Left("Could not parse compound data") } - override val dataSource: DataSource = DataSource.COMPOUND - override val format: Option[DataFormat] = { - if(elements.forall(_.format == elements.head.format)) elements.head.format - else None - } // None if each element has its own format. If all elements have the same format, use that format + // Fetched contents successfully + assume( + fetchedContents.isRight, + fetchedContents.left.getOrElse("Unknown error creating the data") + ) + + override val raw: String = fetchedContents.toOption.get /** @return RDF logical model of the data contained in the compound */ @@ -57,24 +68,18 @@ case class DataCompound(elements: List[Data]) extends Data with LazyLogging { val value: IO[Resource[IO, RDFReasoner]] = jenaModels.flatMap(lsRs => IO(lsRs.sequence.evalMap(ls => MergedModels.fromList(ls))) ) - value } - override def toString: String = { - elements.flatMap(_.toString).mkString("\n") - } - - /** Recursively process the data in the compound to extract all individual RDF Jena models to a single list + /** Recursively process the data in the compound to extract all individual + * RDF Jena models to a single list * * @return List of RDF Jena models in each of the elements of the compound */ - // TODO: The moment you use one of these resources, things crash private def getJenaModels: List[IO[Resource[IO, RDFAsJenaModel]]] = { elements.flatMap { // Single data: straight extraction - case sd: DataSingle => List(sd.toRdf()) - case ed: DataEndpoint => List(ed.toRdf()) + case sd: DataSingle => List(sd.toRdf()) case cd: DataCompound => cd.getJenaModels // Compound data: recursive extraction } @@ -85,8 +90,6 @@ private[api] object DataCompound extends DataCompanion[DataCompound] with LazyLogging { - override lazy val emptyData: DataCompound = DataCompound(List()) - override def mkData(partsMap: PartsMap): IO[Either[String, DataCompound]] = { for { // Parse params @@ -94,37 +97,59 @@ private[api] object DataCompound // Try to create data maybeData: Either[String, DataCompound] = if(compoundData.isDefined) { - logger.debug( - s"RDF Data received - Compound Data: ${compoundData.get}" - ) DataCompound .fromJsonString(compoundData.get) .leftMap(err => s"Could not read compound data.\n $err") } else Left("No compound data provided") /* Check if the created data is empty, then an error occurred when merging * the elements */ - } yield maybeData.flatMap(_.rawData.flatMap(_ => maybeData)) + } yield maybeData.flatMap(_.fetchedContents.flatMap(_ => maybeData)) } /** Encoder used to transform CompoundData instances to JSON values */ - override implicit val encodeData: Encoder[DataCompound] = + override implicit val encode: Encoder[DataCompound] = (data: DataCompound) => Json.fromValues(data.elements.map(_.asJson)) /** Decoder used to extract CompoundData instances from JSON values */ - override implicit val decodeData: Decoder[DataCompound] = + override implicit val decode: Decoder[Either[String, DataCompound]] = (cursor: HCursor) => { - cursor.values match { - case None => - DecodingFailure("Empty list for compound data", List()) - .asLeft[DataCompound] - case Some(vs) => - val xs: Decoder.Result[List[Data]] = - vs.toList.map(_.as[Data]).sequence - - xs.map(DataCompound(_)) - } + for { + // Content must exist and be an array of JSON items + content <- cursor + .downField(ContentParameter.name) + .as[Json] + + result <- content.hcursor.values match { + // If no values in the content array, return error + case None => + "Empty dataset supplied for compound data" + .asLeft[DataCompound] + .asRight[ + DecodingFailure // Wrap in either to create a DecodingResult + ] + // Else, process the items cumulatively + case Some(items) => + for { + maybeItems <- items.toList + .map(_.as[Either[String, Data]]) + .sequence + // Scan the list for the first error parsing the data elements + ret = maybeItems.find(_.isLeft) match { + // Error found, return it + case Some(err) => + err.left + .getOrElse("Unknown error parsing compound data") + .asLeft[DataCompound] + // No errors, assume all items are OK and create the compound + case None => + val items = maybeItems.flatMap(_.toOption) + DataCompound(items).asRight[String] + } + } yield ret + } + } yield result } /** Try to build a CompoundData instance from a JSON string @@ -133,14 +158,18 @@ private[api] object DataCompound * @return Either a new CompoundData instance or an error message * @note Internally resorts to the decoding method in this class */ - def fromJsonString(jsonStr: String): Either[String, DataCompound] = for { - json <- parse(jsonStr).leftMap(parseError => - s"CompoundData.fromString: error parsing $jsonStr as JSON: $parseError" - ) - compoundData <- json - .as[DataCompound] - .leftMap(decodeError => - s"Error decoding json to compoundData: $decodeError\nJSON obtained: \n${json.spaces2}" + def fromJsonString(jsonStr: String): Either[String, DataCompound] = { + val decodeStringResult = for { + json <- parse(jsonStr).leftMap(parseError => + s"Error parsing $jsonStr as JSON: $parseError" ) - } yield compoundData + compoundData <- json + .as[Either[String, DataCompound]] + .leftMap(decodeError => + s"Error decoding json to compoundData: $decodeError\nJSON obtained: \n${json.spaces2}" + ) + } yield compoundData + + decodeStringResult.flatten + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala index c3ac3171..70b96793 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala @@ -2,7 +2,6 @@ package es.weso.rdfshape.server.api.routes.data.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging -import es.weso.rdf.nodes.IRI import es.weso.rdfshape.server.api.definitions.ApiDefaults.defaultInferenceEngine import es.weso.rdfshape.server.api.definitions.ApiDefinitions.{ api, @@ -18,19 +17,20 @@ import es.weso.rdfshape.server.api.routes.data.logic.operations.{ DataInfo, DataQuery } -import es.weso.rdfshape.server.api.routes.data.logic.types.Data -import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery +import es.weso.rdfshape.server.api.routes.data.service.operations.{ + DataConvertInput, + DataExtractInput, + DataInfoInput, + DataQueryInput +} import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ -import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson import es.weso.schema.ShExSchema import io.circe.Json import io.circe.syntax.EncoderOps -import org.http4s._ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl -import org.http4s.multipart.Multipart +import org.http4s.rho.RhoRoutes /** API Service to handle RDF data * @@ -46,277 +46,137 @@ class DataService(client: Client[IO]) /** Describe the API routes handled by this service and the actions performed on each of them */ - val routes: HttpRoutes[IO] = HttpRoutes.of[IO] { + val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Returns a JSON array with the accepted input or output RDF data formats + /** Returns a JSON array with the accepted input RDF data formats */ - case GET -> Root / `api` / `verb` / "formats" / "input" => + GET / `api` / `verb` / "formats" / "input" |>> { val formats = RdfFormat.availableFormats ++ HtmlFormat.availableFormats val formatNames = formats.map(_.name) val json = Json.fromValues(formatNames.map(Json.fromString)) Ok(json) + } /** Returns a JSON array with the available output RDF data formats */ - case GET -> Root / `api` / `verb` / "formats" / "output" => - val formatNames = RdfFormat.availableFormats.map(_.name) - val json = Json.fromValues(formatNames.map(Json.fromString)) + GET / `api` / `verb` / "formats" / "output" |>> { + val formatNames = + RdfFormat.availableFormats.filter(!_.equals(Mixed)).map(_.name) + val json = Json.fromValues(formatNames.map(Json.fromString)) Ok(json) + } /** Returns a JSON array with the available visualization formats */ - case GET -> Root / `api` / `verb` / "formats" / "visual" => + GET / `api` / `verb` / "formats" / "visual" |>> { val formats = GraphicFormat.availableFormats.map(_.name) val json = Json.fromValues(formats.map(Json.fromString)) Ok(json) + } /** Returns the default RDF format as a raw string */ - case GET -> Root / `api` / `verb` / "formats" / "default" => - val dataFormat = DataFormat.defaultFormat.name + GET / `api` / `verb` / "formats" / "default" |>> { + val dataFormat = DataFormat.default.name Ok(Json.fromString(dataFormat)) + } /** Returns a JSON array with the available inference engines */ - case GET -> Root / `api` / `verb` / "inferenceEngines" => + GET / `api` / `verb` / "inferenceEngines" |>> { val inferenceEngines = availableInferenceEngines val json = Json.fromValues(inferenceEngines.map(e => Json.fromString(e.name))) Ok(json) + } /** Returns the default inference engine used as a raw string */ - case GET -> Root / `api` / `verb` / "inferenceEngines" / "default" => + GET / `api` / `verb` / "inferenceEngines" / "default" |>> { Ok(Json.fromString(defaultInferenceEngine.name)) + } /** Returns a JSON array with the valid data sources that the server will accept when sent via [[DataSourceParameter]] */ - case GET -> Root / `api` / `verb` / "sources" => + GET / `api` / `verb` / "sources" |>> { val json = Json.arr( Json.fromString(DataSource.TEXT), Json.fromString(DataSource.URL), Json.fromString(DataSource.FILE) ) Ok(json) + } /** Obtain information about an RDF source. - * Receives a JSON object with the input RDF information: - * - data [String]: RDF data (raw, URL containing the data or File with the data) - * - dataFormat [String]: Format of the input RDF data - * - dataSource [String]: Identifies the source of the data (raw, URL, file...) so that the server knows how to handle it - * - dataFormat [String]: Format of the RDF data - * - inference [String]: Inference to be applied to the data - * Returns a JSON object with the operation results. See [[DataInfo.encodeDataInfoOperation]] + * Receives a JSON object with the input RDF information + * Returns a JSON object with the operation results. See [[DataInfo.encodeDataInfoOperation]] */ - case req @ POST -> Root / `api` / `verb` / "info" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - - for { - // Get the data from the partsMap - eitherData <- Data.mkData(partsMap) - response <- eitherData.fold( - // If there was an error parsing the data, return it - err => errorResponseJson(err, InternalServerError), - // Else, try and compute the data info - data => - DataInfo - .dataInfo(data) - .flatMap(info => Ok(info.asJson)) - .handleErrorWith(err => - // Legacy code may return exceptions with "null" messages - err.getMessage match { - case errorMessage: String => - errorResponseJson(errorMessage, InternalServerError) - case _ => // null exception message, return a general error message - errorResponseJson( - DataServiceError.couldNotParseData, - InternalServerError - ) - } - ) - ) - } yield response - } + POST / `api` / `verb` / "info" ^ jsonOf[IO, DataInfoInput] |>> { + body: DataInfoInput => + DataInfo + .dataInfo(body.data) + .flatMap(info => Ok(info.asJson)) + .handleErrorWith(err => { + // Legacy code may return exceptions with "null" messages + val errorMessage = + if(err.getMessage != null) err.getMessage + else DataServiceError.couldNotParseData + InternalServerError(errorMessage) + }) + } /** Convert an RDF source into another format/syntax. * Receives a JSON object with the input RDF information: - * - data [String]: RDF data (raw, URL containing the data or File with the data) - * - dataFormat [String]: Format of the input RDF data - * - dataSource [String]: Identifies the source of the data (raw, URL, file...) so that the server knows how to handle it - * - targetDataFormat [String]: Format of the RDF data - * - inference [String]: Inference to be applied - * Returns a JSON object with the operation results. See [[DataConvert.encodeDataConversionOperation]]. - * @note The "convert" endpoint is invoked for data visualizations too, - * since these are just conversions to JSON, DOT, etc. later - * interpreted by the web client + * Returns a JSON object with the operation results. See [[DataConvert.encodeDataConversionOperation]]. + * + * @note The "convert" endpoint is invoked for data visualizations too, + * since these are just conversions to JSON, DOT, etc. later + * interpreted by the web client */ - case req @ POST -> Root / `api` / `verb` / "convert" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - - for { - // Get the data from the partsMap - eitherData <- Data.mkData(partsMap) - // Get the target data format - optTargetFormatStr <- partsMap.optPartValue( - TargetDataFormatParameter.name - ) - - optTargetFormat = for { - targetFormatStr <- optTargetFormatStr - targetFormat <- DataFormat - .fromString(targetFormatStr) - .toOption - } yield targetFormat - - // Abort if no valid target format, else continue - response <- optTargetFormat match { - case None => - errorResponseJson( - "Empty or invalid target format for conversion", - BadRequest - ) - case Some(targetFormat) => - eitherData.fold( - // If there was an error parsing the data, return it - err => errorResponseJson(err, InternalServerError), - // Else, try and compute the data conversion - data => - // Check for exceptions when converting the data - DataConvert - .dataConvert(data, targetFormat) - .flatMap(conversion => Ok(conversion.asJson)) - .handleErrorWith(err => - err.getMessage match { - case errorMessage: String => - errorResponseJson(errorMessage, InternalServerError) - case _ => // null exception message, return a general error message - errorResponseJson( - DataServiceError.couldNotParseData, - InternalServerError - ) - } - ) - ) - } - } yield response - } + POST / `api` / `verb` / "convert" ^ jsonOf[IO, DataConvertInput] |>> { + body: DataConvertInput => + DataConvert + .dataConvert(body.data, body.targetFormat) + .flatMap(conversion => Ok(conversion.asJson)) + .handleErrorWith(err => { + // Legacy code may return exceptions with "null" messages + val errorMessage = + if(err.getMessage != null) err.getMessage + else DataServiceError.couldNotParseData + InternalServerError(errorMessage) + }) + } /** Perform a SPARQL query on RDF data. - * Receives a JSON object with the input RDF and query information: - * - data [String]: RDF data (raw, URL containing the data or File with the data) - * - dataFormat [String]: Format of the input RDF data - * - dataSource [String]: Identifies the source of the data (raw, URL, file...) so that the server knows how to handle it - * - inference [String]: Inference to be applied - * - * - query [String]: SPARQL query data (raw, URL containing the data or File with the query) - * - querySource [String]: Identifies the source of the query (raw, URL, file...) so that the server knows how to handle it - * + * Receives a JSON object with the input RDF and query information * Returns a JSON object with the query inputs and results (see [[DataQuery.encodeDataQueryOperation]]). */ - case req @ POST -> Root / `api` / `verb` / "query" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - for { - // Get the data from the partsMap - eitherData <- Data.mkData(partsMap) - // Get the query from the partsMap - eitherQuery <- SparqlQuery.mkSparqlQuery(partsMap) - - /* Accumulate either: - * - the errors occurred parsing the data/query - * - the results of parsing the data/query in a single value */ - eitherInputs: Either[String, (Data, SparqlQuery)] = for { - data <- eitherData - query <- eitherQuery - } yield (data, query) - - // Make response - response <- eitherInputs.fold( - // If there was an error parsing the data/query, return it - err => errorResponseJson(err, InternalServerError), - // Else, try and compute the query, first destructuring the tuple - { - // Destructure tuple - case (data, query) => - DataQuery - .dataQuery(data, query) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - - // Generic error. Code should not reach here. - case _ => - errorResponseJson( - DataServiceError.couldNotParseData, - InternalServerError - ) - } - ) - } yield response - } + POST / `api` / `verb` / "query" ^ jsonOf[IO, DataQueryInput] |>> { + body: DataQueryInput => + DataQuery + .dataQuery(body.data, body.query) + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } /** Attempt to extract a schema from an RDF source. - * Receives a JSON object with the input RDF information: - * - data [String]: RDF data (raw, URL containing the data or File with the data) - * - dataFormat [String]: Format of the input RDF data - * - dataSource [String]: Identifies the source of the data (raw, URL, file...) so that the server knows how to handle it - * - inference [String]: Inference to be applied - * - nodeSelector [String]: Node selector to use - * Returns a JSON object with the extraction information (see [[DataExtract.encodeDataExtractOperation]] + * Receives a JSON object with the input RDF information + * Returns a JSON object with the extraction information (see [[DataExtract.encodeDataExtractOperation]] */ - case req @ POST -> Root / `api` / `verb` / "extract" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - for { - // Get the data from the partsMap - eitherData <- Data.mkData(partsMap) - // Schema format and engine will be ShEx, force later. - // Try to map label to IRI or node selector - optLabel <- partsMap - .optPartValue(LabelParameter.name) - .map(_.map(IRI(_))) - // Try to get node selector - optNodeSelectorStr <- partsMap.optPartValue( - NodeSelectorParameter.name - ) - - response <- eitherData.fold( - // If there was an error parsing the data, return it - err => errorResponseJson(err, InternalServerError), - // Else, try and compute the shex extraction - data => - // Return error if no node selector - optNodeSelectorStr match { - case None => - errorResponseJson(DataServiceError.noNodeSelector, BadRequest) - case Some(nodeSelector) if nodeSelector.isBlank => - errorResponseJson( - DataServiceError.emptyNodeSelector, - BadRequest - ) - case Some(nodeSelector) => - DataExtract - .dataExtract( - data, - nodeSelector, - Option(ShExSchema.empty), - Option(ShExC), - optLabel, - relativeBase = None - ) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } + POST / `api` / `verb` / "extract" ^ jsonOf[IO, DataExtractInput] |>> { + body: DataExtractInput => + DataExtract + .dataExtract( + body.data, + body.nodeSelector, + Option(ShExSchema.empty), + Option(ShExC), + body.label, + relativeBase = None ) - - } yield response - - } + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataConvertInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataConvertInput.scala new file mode 100644 index 00000000..11298f0f --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataConvertInput.scala @@ -0,0 +1,42 @@ +package es.weso.rdfshape.server.api.routes.data.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.format.dataFormats.DataFormat +import es.weso.rdfshape.server.api.routes.data.logic.types.Data +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + DataParameter, + TargetFormatParameter +} +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when querying the server + * for RDF data conversions + * @param data RDF to be converted + * @param targetFormat Conversion output format + */ +case class DataConvertInput(data: Data, targetFormat: DataFormat) + +object DataConvertInput extends ServiceRouteOperation[DataConvertInput] { + override implicit val decoder: Decoder[DataConvertInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeData <- cursor + .downField(DataParameter.name) + .as[Either[String, Data]] + maybeTargetFormat <- cursor + .downField(TargetFormatParameter.name) + .as[Either[String, DataFormat]] + + maybeItems = for { + data <- maybeData + targetFormat <- maybeTargetFormat + } yield (data, targetFormat) + + } yield maybeItems.map { case (data, targetFormat) => + DataConvertInput(data, targetFormat) + } + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataExtractInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataExtractInput.scala new file mode 100644 index 00000000..359f63ea --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataExtractInput.scala @@ -0,0 +1,76 @@ +package es.weso.rdfshape.server.api.routes.data.service.operations + +import cats.implicits.catsSyntaxEitherId +import es.weso.rdf.nodes.IRI +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.data.logic.types.Data +import es.weso.rdfshape.server.api.routes.data.service.DataServiceError +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + DataParameter, + LabelParameter, + NodeSelectorParameter +} +import es.weso.rdfshape.server.implicits.codecs.decodeIri +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, DecodingFailure, HCursor} + +/** Data class representing the inputs required when querying the server + * to extract a schema from RDF data + * + * @param data RDF input + * @param nodeSelector Node targeted in the extraction process + * @param label Base label for the extracted shapes + */ +case class DataExtractInput( + data: Data, + nodeSelector: String, + label: Option[IRI] +) + +object DataExtractInput extends ServiceRouteOperation[DataExtractInput] { + override implicit val decoder: Decoder[DataExtractInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeData <- cursor + .downField(DataParameter.name) + .as[Either[String, Data]] + + // Compulsory param, manually trigger decoding failure with message + maybeNodeSelector <- cursor + .downField(NodeSelectorParameter.name) + .as[Option[String]] + .map { + case None => DataServiceError.noNodeSelector.asLeft + case Some(value) if value.isBlank => + DataServiceError.emptyNodeSelector.asLeft + case Some(value) => value.asRight + } + + // Optional param + maybeLabel <- cursor + .downField(LabelParameter.name) + .as[Either[String, IRI]] match { + // Failed to decode at cursor, no label was provided + case Left(_) => None.asRight + // Could decode + case Right(labelDecodeResult) => + labelDecodeResult match { + // Decoded but an error message was returned, promote it + case Left(err) => DecodingFailure(err, Nil).asLeft + // Decoded and everything went OK + case Right(label) => Some(label).asRight + } + } + + maybeItems = for { + data <- maybeData + nodeSelector <- maybeNodeSelector + } yield (data, nodeSelector, maybeLabel) + + } yield maybeItems.map { case (data, nodeSelector, label) => + DataExtractInput(data, nodeSelector, label) + } + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataInfoInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataInfoInput.scala new file mode 100644 index 00000000..68e804b5 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataInfoInput.scala @@ -0,0 +1,25 @@ +package es.weso.rdfshape.server.api.routes.data.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.data.logic.types.Data +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.DataParameter +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when querying the server + * for RDF data information + * @param data RDF to be inspected + */ +case class DataInfoInput(data: Data) + +object DataInfoInput extends ServiceRouteOperation[DataInfoInput] { + override implicit val decoder: Decoder[DataInfoInput] = (cursor: HCursor) => { + val decodeResult = for { + maybeData <- cursor + .downField(DataParameter.name) + .as[Either[String, Data]] + } yield maybeData.map(DataInfoInput(_)) + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataQueryInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataQueryInput.scala new file mode 100644 index 00000000..054ca7bf --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/operations/DataQueryInput.scala @@ -0,0 +1,43 @@ +package es.weso.rdfshape.server.api.routes.data.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.data.logic.types.Data +import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuery +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + DataParameter, + QueryParameter +} +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when querying the server + * to perform a SPARQL query on RDF data + * + * @param data RDF to be queried + * @param query SPARQL query to be performed + */ +case class DataQueryInput(data: Data, query: SparqlQuery) + +object DataQueryInput extends ServiceRouteOperation[DataQueryInput] { + override implicit val decoder: Decoder[DataQueryInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeData <- cursor + .downField(DataParameter.name) + .as[Either[String, Data]] + maybeQuery <- cursor + .downField(QueryParameter.name) + .as[Either[String, SparqlQuery]] + + maybeItems = for { + data <- maybeData + query <- maybeQuery + } yield (data, query) + + } yield maybeItems.map { case (data, query) => + DataQueryInput(data, query) + } + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala index 5a7de355..086eaf1e 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala @@ -4,7 +4,12 @@ import cats.effect.IO import cats.implicits.toBifunctorOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuerySource.SparqlQuerySource -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ContentParameter, QueryParameter, QuerySourceParameter, SourceParameter} +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + ContentParameter, + QueryParameter, + QuerySourceParameter, + SourceParameter +} import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import io.circe._ @@ -18,16 +23,17 @@ import scala.util.Try * @param source Active source, used to know which source the query comes from */ sealed case class SparqlQuery private ( - private val content: String, - source: SparqlQuerySource + private val content: String, + source: SparqlQuerySource ) extends LazyLogging { - // Non empty content + // Non empty content assume(!content.isBlank, "Could not build the query from empty data") // Valid source - assume(SparqlQuerySource.values.exists(_ equalsIgnoreCase source), - s"Unknown query source: \"$source\"") - + assume( + SparqlQuerySource.values.exists(_ equalsIgnoreCase source), + s"Unknown query source: '$source'" + ) /** Given the (user input) for the query and its source, fetch the Query contents using the input in the way the source needs it * (e.g.: for URLs, fetch the input with a web request; for files, decode the input; for raw data, do nothing) @@ -35,42 +41,39 @@ sealed case class SparqlQuery private ( * @return Either an error building the query text or a String containing the final text of the SPARQL query */ lazy val fetchedContents: Either[String, String] = - if (source equalsIgnoreCase SparqlQuerySource.URL) + if(source equalsIgnoreCase SparqlQuerySource.URL) getUrlContents(content) - // Text or file + // Text or file else Right(content) - - - assume(fetchedContents.isRight, - fetchedContents.left.getOrElse("Unknown error")) - - /** - * Raw query value, i.e.: the text forming the query - * - * @note It is safely extracted fromm [[fetchedContents]] after asserting - * the contents are right - */ + + assume( + fetchedContents.isRight, + fetchedContents.left.getOrElse("Unknown error") + ) + + /** Raw query value, i.e.: the text forming the query + * + * @note It is safely extracted fromm [[fetchedContents]] after asserting + * the contents are right + */ val raw: String = fetchedContents.toOption.get - - + } private[api] object SparqlQuery extends LazyLogging { - /** - * Encoder [[SparqlQuery]] => [[Json]] - */ + /** Encoder [[SparqlQuery]] => [[Json]] + */ implicit val encoder: Encoder[SparqlQuery] = (query: SparqlQuery) => Json.obj( - ("query", query.raw.asJson), + ("content", query.raw.asJson), ("source", query.source.asJson) ) - /** - * Decoder [[Json]] => [[SparqlQuery]] - * @note Returns an either whose left contains specific errors building the query - */ + /** Decoder [[Json]] => [[SparqlQuery]] + * @note Returns an either whose left contains specific errors building the query + */ implicit val decoder: Decoder[Either[String, SparqlQuery]] = (cursor: HCursor) => { // Get request data @@ -86,11 +89,14 @@ private[api] object SparqlQuery extends LazyLogging { } yield (queryContent, querySource) queryData.map { - // Destructure and try to build the object, catch the exception as error message if needed + /* Destructure and try to build the object, catch the exception as error + * message if needed */ case (content, source) => - Try { - SparqlQuery(content, source) - }.toEither.leftMap( err => s"Could not build the SPARQL query from user data:\n ${err.getMessage}") + Try { + SparqlQuery(content, source) + }.toEither.leftMap(err => + s"Could not build the SPARQL query from user data:\n ${err.getMessage}" + ) } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala index 544e043d..5f070601 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala @@ -4,9 +4,9 @@ import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService -import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.{getEndpointAsRDFReader, getEndpointInfo} import es.weso.rdfshape.server.api.routes.endpoint.logic.Outgoing._ +import es.weso.rdfshape.server.api.routes.endpoint.logic.{Endpoint, Outgoing} import es.weso.rdfshape.server.api.routes.endpoint.service.operations.EndpointOutgoingInput import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ import es.weso.rdfshape.server.implicits.query_parsers.urlQueryParser @@ -78,16 +78,8 @@ class EndpointService(client: Client[IO]) } /** Attempt to contact a wikibase endpoint and return the data (triplets) about a node in it. - * Receives a JSON object with the input endpoint, node and limits: - * - endpoint [URL]: Query target endpoint - * - node [String]: Node identifier in the target wikibase - * - limit [Int]: Max number of results, defaults to one - * Returns a JSON object with the endpoint response: - * - endpoint [String]: Target endpoint - * - node [String]: Node identifier in the target wikibase - * - children [Array]: List of returned objects, each being a triplet: - * - pred: [String]: Predicate identifier in the target wikibase - * - values: [Array]: List of raw values for the entity and predicate + * Receives a JSON object with the input endpoint, node and limits + * Returns a JSON object with the endpoint response (see [[Outgoing.encode]]) */ GET / `api` / `verb` / "outgoing" +? param[URL](EndpointParameter.name) & diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/aux/SchemaAdapter.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/aux/SchemaAdapter.scala index 28d389d1..1201373d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/aux/SchemaAdapter.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/aux/SchemaAdapter.scala @@ -1,6 +1,6 @@ package es.weso.rdfshape.server.api.routes.schema.logic.aux -import es.weso.rdfshape.server.api.definitions.ApiDefaults +import cats.implicits.catsSyntaxEitherId import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema import es.weso.schema.{Schemas, Schema => SchemaW} import io.circe.{Decoder, Encoder, HCursor, Json} @@ -10,24 +10,14 @@ import io.circe.{Decoder, Encoder, HCursor, Json} */ private[schema] object SchemaAdapter { - /** For a given schema engine name, try to map it to the schema it represents - * - * @param engineName Name (String) of the given schema engine - * @return The schema engine corresponding to the given name, if available - */ - def schemaEngineFromString(engineName: String): Option[SchemaW] = { - Schemas.availableSchemas - .find(schema => schema.name.toLowerCase == engineName.toLowerCase()) - } - /** Simple encoder for [[SchemaW]] instances, simplifying them to their name */ implicit val encodeEngine: Encoder[SchemaW] = (schemaEngine: SchemaW) => Json.fromString(schemaEngine.name) - /** Auxiliary decoder for data inference + /** Auxiliary decoder for [[SchemaW]] */ - implicit val decodeEngine: Decoder[SchemaW] = + implicit val decodeEngine: Decoder[Either[String, SchemaW]] = (cursor: HCursor) => for { engineName <- cursor.value.as[String] @@ -35,7 +25,20 @@ private[schema] object SchemaAdapter { engine = Schemas.availableSchemas .find( _.name.toLowerCase == engineName.toLowerCase - ) - .getOrElse(ApiDefaults.defaultSchemaEngine) + ) match { + case Some(value) => value.asRight + case None => s"The engine '$engineName' does not exist".asLeft + } + } yield engine + + /** For a given schema engine name, try to map it to the schema it represents + * + * @param engineName Name (String) of the given schema engine + * @return The schema engine corresponding to the given name, if available + */ + def schemaEngineFromString(engineName: String): Option[SchemaW] = { + Schemas.availableSchemas + .find(schema => schema.name.toLowerCase == engineName.toLowerCase()) + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala index 24e8b4e0..ed95dab7 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala @@ -3,7 +3,6 @@ package es.weso.rdfshape.server.api.routes.schema.logic.operations import cats.effect.IO import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.jena.RDFAsJenaModel -import es.weso.rdfshape.server.api.definitions.ApiDefaults import es.weso.rdfshape.server.api.definitions.UmlDefinitions.umlOptions import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.SchemaFormat import es.weso.rdfshape.server.api.format.dataFormats.{ @@ -12,6 +11,7 @@ import es.weso.rdfshape.server.api.format.dataFormats.{ Svg, Json => JsonFormat } +import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource import es.weso.rdfshape.server.api.routes.schema.logic.types.{ Schema, SchemaSimple @@ -36,14 +36,12 @@ import io.circe.{Encoder, Json} final case class SchemaConvert private ( override val inputSchema: Schema, targetFormat: SchemaFormat, - targetEngine: Option[SchemaW], + targetEngine: SchemaW, result: Schema ) extends SchemaOperation(SchemaConvert.successMessage, inputSchema) private[api] object SchemaConvert extends LazyLogging { - private val successMessage = "Conversion successful" - /** JSON encoder for [[SchemaConvert]] */ implicit val encodeSchemaConvertOperation: Encoder[SchemaConvert] = @@ -56,26 +54,27 @@ private[api] object SchemaConvert extends LazyLogging { ("targetSchemaFormat", schemaConvert.targetFormat.asJson) ) ) + private val successMessage = "Conversion successful" /** Perform the actual conversion operation between Schema formats. * * @note Firstly, check the conversion target * (another Schema, a Graphic visualization, etc.). * Secondly, invoke the corresponding logic for each transformation - * @param inputSchema Input conversion schema - * @param targetFormat Target format - * @param optTargetEngine Target engine (discarded in visualizations) + * @param inputSchema Input conversion schema + * @param targetFormat Target format + * @param targetEngine Target engine (discarded in visualizations) * @return A new [[SchemaConvert]] instance with the conversion information */ def schemaConvert( inputSchema: Schema, targetFormat: DataFormat, - optTargetEngine: Option[SchemaW] + targetEngine: SchemaW ): IO[SchemaConvert] = { - logger.info( + logger.debug( s"""Schema conversion targets: - Format: ${targetFormat.name} - - Engine: ${optTargetEngine.map(_.name)}""" + - Engine: ${targetEngine.name}""" ) // Check the format nature to see which logic to invoke @@ -84,7 +83,7 @@ private[api] object SchemaConvert extends LazyLogging { schemaToSchema( inputSchema, new SchemaFormat(targetFormat), - optTargetEngine + targetEngine ) } // 2) Schema to visualization @@ -98,7 +97,7 @@ private[api] object SchemaConvert extends LazyLogging { schemaToJson(inputSchema) case _ => val msg = - s"Unavailable conversion from ${inputSchema.format.get.name} to ${targetFormat.name}" + s"Unavailable conversion from ${inputSchema.format.name} to ${targetFormat.name}" logger.error(msg) IO.raiseError(new RuntimeException(msg)) } @@ -109,28 +108,16 @@ private[api] object SchemaConvert extends LazyLogging { * Auxiliary method for [[schemaConvert]] * Convert a given Schema to another one, given the target engine and format * - * @param inputSchema Input schema for conversion - * @param targetFormat Target format - * @param optTargetEngine Target engine + * @param inputSchema Input schema for conversion + * @param targetFormat Target format + * @param targetEngine Target engine * @return A new [[SchemaConvert]] instance with the conversion information */ private def schemaToSchema( inputSchema: Schema, targetFormat: SchemaFormat, - optTargetEngine: Option[SchemaW] + targetEngine: SchemaW ): IO[SchemaConvert] = { - // Get schema engine and target engine. If unavailable, throw errors - if(inputSchema.engine.isEmpty) { - throw new RuntimeException( - "Could not perform conversion, unknown input schema engine" - ) - } - if(optTargetEngine.isEmpty) { - throw new RuntimeException( - "Could not perform conversion, unknown target schema engine" - ) - } - // Try to extract the inner-library schema from the user given schema for { maybeInnerSchema <- inputSchema.getSchema @@ -142,7 +129,7 @@ private[api] object SchemaConvert extends LazyLogging { // Tuple with the input data and an empty representation of the output conversionSchemas = ( innerSchema, - optTargetEngine.get + targetEngine ) _ = logger.debug( s"Schema conversion: ${conversionSchemas._1.name} -> ${conversionSchemas._2.name}" @@ -160,15 +147,15 @@ private[api] object SchemaConvert extends LazyLogging { None ) outputSchema = SchemaSimple( - schemaPre = Option(rawOutputSchema.trim), - schemaFormat = targetFormat, - schemaEngine = schemaOut, - schemaSource = inputSchema.schemaSource + content = rawOutputSchema.trim, + format = targetFormat, + engine = schemaOut, + source = inputSchema.source ) } yield SchemaConvert( inputSchema = inputSchema, targetFormat = targetFormat, - targetEngine = Option(schemaOut), + targetEngine = targetEngine, result = outputSchema ) @@ -180,10 +167,10 @@ private[api] object SchemaConvert extends LazyLogging { outputSchema = shexSchema match { case (_, schemaStr) => SchemaSimple( - schemaPre = Option(schemaStr.trim), - schemaFormat = targetFormat, - schemaEngine = shexOut, - schemaSource = inputSchema.schemaSource + content = schemaStr.trim, + format = targetFormat, + engine = shexOut, + source = SchemaSource.TEXT ) } } yield SchemaConvert( @@ -261,10 +248,10 @@ private[api] object SchemaConvert extends LazyLogging { outputSchema = jsonSchema.map(jsonData => SchemaSimple( - schemaPre = Option(jsonData.spaces2), - schemaFormat = new SchemaFormat(JsonFormat), - schemaEngine = inputSchema.engine.get, - schemaSource = inputSchema.schemaSource + content = jsonData.spaces2, + format = new SchemaFormat(JsonFormat), + engine = inputSchema.engine, + source = SchemaSource.TEXT ) ) @@ -275,7 +262,7 @@ private[api] object SchemaConvert extends LazyLogging { SchemaConvert( inputSchema = inputSchema, targetFormat = new SchemaFormat(JsonFormat), - targetEngine = None, + targetEngine = inputSchema.engine, result = schema ) ) @@ -308,11 +295,10 @@ private[api] object SchemaConvert extends LazyLogging { .toSVG(umlOptions) .map(svg => { SchemaSimple( - schemaPre = Option(svg.trim), - schemaFormat = new SchemaFormat(Svg), - schemaEngine = inputSchema.engine - .getOrElse(ApiDefaults.defaultSchemaEngine), - schemaSource = inputSchema.schemaSource + content = svg.trim, + format = new SchemaFormat(Svg), + engine = inputSchema.engine, + source = SchemaSource.TEXT ) }) ) @@ -326,8 +312,8 @@ private[api] object SchemaConvert extends LazyLogging { _.map(resultSchema => SchemaConvert( inputSchema = inputSchema, - targetFormat = resultSchema.format.get, - targetEngine = None, + targetFormat = resultSchema.format, + targetEngine = inputSchema.engine, result = resultSchema ) ).handleErrorWith(err => diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala index df78911f..7981c1d7 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala @@ -32,6 +32,43 @@ final case class SchemaValidate private ( ) extends SchemaOperation(SchemaValidate.successMessage, inputSchema) private[api] object SchemaValidate extends LazyLogging { + + /** Convert a [[ValidationResult]] to its JSON representation + * + * @note Exceptionally uses unsafeRun + */ + implicit val encodeValidationResult: Encoder[ValidationResult] = + (validationResult: ValidationResult) => + RDFAsJenaModel.empty + .flatMap(_.use(validationResult.toJson(_))) + .unsafeRunSync() + + /** Convert a [[SchemaValidate]] to its JSON representation + * + * @return JSON representation of the validation operation, + * used for API responses + * @note + */ + implicit val encodeSchemaValidateOperation: Encoder[SchemaValidate] = + (schemaValidate: SchemaValidate) => { + + // Convert ValidationResult to JSON + val validationResultJson: IO[Json] = for { + emptyResource <- RDFAsJenaModel.empty + json <- emptyResource.use(schemaValidate.result.toJson(_)) + } yield json + + Json.fromFields( + List( + ("message", Json.fromString(schemaValidate.successMessage)), + ("data", schemaValidate.inputData.asJson), + ("schema", schemaValidate.inputSchema.asJson), + ("trigger", schemaValidate.validationTrigger.asJson), + // UnsafeRun exceptionally. + ("result", validationResultJson.unsafeRunSync()) + ) + ) + } private val successMessage = "Validation successful" /** For a given RDF [[Data]] plus a given [[Schema]], attempt to validate @@ -58,11 +95,9 @@ private[api] object SchemaValidate extends LazyLogging { case _: TriggerShapeMap | _: TriggerTargetDeclarations => for { innerSchema <- schema.getSchema - result = innerSchema.flatMap(s => { - trigger.getValidationTrigger.map(trigger => { - s.validate(rdf, trigger, builder) - }) - }) + result = innerSchema.map( + _.validate(rdf, trigger.getValidationTrigger, builder) + ) validation <- result match { // Check for Lefts, errors while getting the schema, triggers... case Left(err) => IO.raiseError(new RuntimeException(err)) @@ -76,7 +111,7 @@ private[api] object SchemaValidate extends LazyLogging { case other => IO.raiseError( new RuntimeException( - s"Unexpected validation trigger (${other.triggerModeType})" + s"Unexpected validation trigger (${other._type})" ) ) } @@ -87,41 +122,4 @@ private[api] object SchemaValidate extends LazyLogging { validationTrigger = trigger, result = result ) - - /** Convert a [[ValidationResult]] to its JSON representation - * - * @note Exceptionally uses unsafeRun - */ - implicit val encodeValidationResult: Encoder[ValidationResult] = - (validationResult: ValidationResult) => - RDFAsJenaModel.empty - .flatMap(_.use(validationResult.toJson(_))) - .unsafeRunSync() - - /** Convert a [[SchemaValidate]] to its JSON representation - * - * @return JSON representation of the validation operation, - * used for API responses - * @note - */ - implicit val encodeSchemaValidateOperation: Encoder[SchemaValidate] = - (schemaValidate: SchemaValidate) => { - - // Convert ValidationResult to JSON - val validationResultJson: IO[Json] = for { - emptyResource <- RDFAsJenaModel.empty - json <- emptyResource.use(schemaValidate.result.toJson(_)) - } yield json - - Json.fromFields( - List( - ("message", Json.fromString(schemaValidate.successMessage)), - ("data", schemaValidate.inputData.asJson), - ("schema", schemaValidate.inputSchema.asJson), - ("trigger", schemaValidate.validationTrigger.asJson), - // UnsafeRun exceptionally. - ("result", validationResultJson.unsafeRunSync()) - ) - ) - } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index c8a417a5..07e676f9 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -1,14 +1,20 @@ package es.weso.rdfshape.server.api.routes.schema.logic.trigger import cats.effect.IO +import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.data.logic.types.Data import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerModeType._ import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.TriggerModeParameter +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + TriggerModeParameter, + TypeParameter +} import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.schema.ValidationTrigger -import io.circe.{Decoder, Encoder, HCursor} +import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} + +import scala.language.implicitConversions /** Common trait to all schemas, whichever its nature */ @@ -16,7 +22,7 @@ trait TriggerMode { /** Corresponding type of this adapter inside [[ValidationTrigger]] */ - val triggerModeType: TriggerModeType + val _type: TriggerModeType /** Optionally, the [[Data]] being validated in the validation using this trigger */ @@ -28,38 +34,50 @@ trait TriggerMode { /** Get the inner [[ValidationTrigger]], which is used internally for schema validations * - * @return Either the inner [[ValidationTrigger]] logical model as used by WESO libraries, - * or an error extracting the model + * @return The inner [[ValidationTrigger]] logical model as used by WESO libraries */ - def getValidationTrigger: Either[String, ValidationTrigger] + def getValidationTrigger: ValidationTrigger } object TriggerMode extends TriggerModeCompanion[TriggerMode] { + /** Dummy implementation meant to be overridden + * If called on a general [[TriggerMode]] instance, look for the type to + * redirecting the decoding to the correct implementation + */ + override implicit def decode( + data: Option[Data] = None, + schema: Option[Schema] = None + ): Decoder[Either[String, TriggerMode]] = + (cursor: HCursor) => { + for { + triggerType <- cursor + .downField(TypeParameter.name) + .as[TriggerModeType] + + decoded <- triggerType match { + case SHAPEMAP => TriggerShapeMap.decode(data, schema)(cursor) + case TARGET_DECLARATIONS => + TriggerTargetDeclarations.decode(data, schema)(cursor) + case _ => + DecodingFailure( + s"Invalid trigger mode type '$triggerType'", + Nil + ).asLeft + } + } yield decoded + } + /** Dummy implementation meant to be overridden. * If called on a general [[TriggerMode]] instance, pattern match among the available types to * use the correct implementation */ - override implicit val encoder: Encoder[TriggerMode] = { - case tsm: TriggerShapeMap => TriggerShapeMap.encoder(tsm) + override implicit val encode: Encoder[TriggerMode] = { + case tsm: TriggerShapeMap => TriggerShapeMap.encode(tsm) case ttd: TriggerTargetDeclarations => - TriggerTargetDeclarations.encoder(ttd) + TriggerTargetDeclarations.encode(ttd) } - /** Dummy implementation meant to be overridden - * If called on a general [[TriggerMode]] instance, pattern match among the available types to - * use the correct implementation - */ - override implicit val decoder: Decoder[TriggerMode] = - (cursor: HCursor) => { - this.getClass match { - case tsm if tsm == classOf[TriggerShapeMap] => - TriggerShapeMap.decoder(cursor) - case ttd if ttd == classOf[TriggerTargetDeclarations] => - TriggerTargetDeclarations.decoder(cursor) - } - } - /** General implementation delegating on subclasses */ override def mkTriggerMode( @@ -98,19 +116,24 @@ object TriggerMode extends TriggerModeCompanion[TriggerMode] { private[schema] trait TriggerModeCompanion[T <: TriggerMode] extends LazyLogging { - /** Encoder used to transform [[TriggerMode]] instances to JSON values + /** @param data Optional data accompanying the ShapeMap + * @param schema Optional schema accompanying the ShapeMap + * @return Decoding function used to extract [[TriggerMode]] instances from JSON values */ - implicit val encoder: Encoder[T] + implicit def decode( + data: Option[Data], + schema: Option[Schema] + ): Decoder[Either[String, T]] - /** Decoder used to extract [[TriggerMode]] instances from JSON values + /** Encoder used to transform [[TriggerMode]] instances to JSON values */ - implicit val decoder: Decoder[T] + implicit val encode: Encoder[T] /** Given a request's parameters, try to extract an instance of [[TriggerMode]] (type [[T]]) from them * * @param partsMap Request's parameters - * @param data Optionally, the [[Data]] being validated in the validation using this trigger - * @param schema Optionally, the [[Schema]] being used in the validation using this trigger + * @param data Optionally, the [[Data]] being validated in the validation using this trigger + * @param schema Optionally, the [[Schema]] being used in the validation using this trigger * @return Either the [[TriggerMode]] instance or an error message */ def mkTriggerMode( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerModeType.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerModeType.scala index c23ef164..d6b73ffa 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerModeType.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerModeType.scala @@ -1,13 +1,16 @@ package es.weso.rdfshape.server.api.routes.schema.logic.trigger +import es.weso.rdfshape.server.utils.other.MyEnum + /** Enumeration of the different possible Validation Triggers sent by the client. * The trigger sent indicates the API how to proceed with validations */ -private[api] object TriggerModeType extends Enumeration { +private[api] object TriggerModeType extends MyEnum[String] { type TriggerModeType = String val SHAPEMAP = "ShapeMap" val TARGET_DECLARATIONS = "TargetDecls" - val defaultSchemaSource: TriggerModeType = SHAPEMAP + val values: Set[String] = Set(SHAPEMAP, TARGET_DECLARATIONS) + val default: TriggerModeType = SHAPEMAP } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala index 4780cac3..86caaac6 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala @@ -2,6 +2,7 @@ package es.weso.rdfshape.server.api.routes.schema.logic.trigger import cats.effect.IO import cats.effect.unsafe.implicits.global +import cats.implicits.toBifunctorOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.PrefixMap import es.weso.rdfshape.server.api.routes.data.logic.types.Data @@ -11,18 +12,21 @@ import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMap import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.schema.{ShapeMapTrigger, ValidationTrigger} import es.weso.shapemaps.{ShapeMap => ShapeMapW} +import io.circe._ import io.circe.syntax.EncoderOps -import io.circe.{Decoder, Encoder, HCursor, Json} + +import scala.language.implicitConversions +import scala.util.Try /** Data class representing a validation trigger enabled by a shapemap, * for ShEx validations. * - * @param shapeMap Inner shapemap associated to the [[TriggerShapeMap()]] + * @param shapeMap Inner shapemap associated to the [[TriggerShapeMap]] */ sealed case class TriggerShapeMap( shapeMap: ShapeMap, - override val data: Option[Data], - override val schema: Option[Schema] + override val data: Option[Data] = None, + override val schema: Option[Schema] = None ) extends TriggerMode with LazyLogging { @@ -31,33 +35,82 @@ sealed case class TriggerShapeMap( * @return A ShapeMap instance used by WESO libraries in validation */ lazy val innerShapeMap: Either[String, ShapeMapW] = shapeMap.innerShapeMap + override val _type: TriggerModeType = TriggerModeType.SHAPEMAP - override val triggerModeType: TriggerModeType = TriggerModeType.SHAPEMAP + // Fetched shapeMap successfully + assume( + innerShapeMap.isRight, + innerShapeMap.left.getOrElse("Unknown error creating the TriggerMode") + ) + val shapeMapW: ShapeMapW = innerShapeMap.toOption.get - override def getValidationTrigger: Either[String, ValidationTrigger] = - innerShapeMap.map(ShapeMapTrigger(_)) + override def getValidationTrigger: ValidationTrigger = { + ShapeMapTrigger(shapeMapW) + } } private[api] object TriggerShapeMap extends TriggerModeCompanion[TriggerShapeMap] with LazyLogging { - override implicit val encoder: Encoder[TriggerShapeMap] = + override implicit def decode( + data: Option[Data], + schema: Option[Schema] + ): Decoder[Either[String, TriggerShapeMap]] = + (cursor: HCursor) => { + for { + maybeShapeMap <- cursor + .as[Either[String, ShapeMap]] + + // Get the prefix maps from data and schema, the shapeMap needs them + // as reference + prefixMaps <- Try { + val mapsIo = for { + // Get data prefix map, if possible + dataPrefixMap <- data match { + case Some(data) => + data.toRdf().map(_.use(_.getPrefixMap)).flatten + case None => IO.pure(PrefixMap.empty) + } + // Get schema prefix map, if possible + schemaPrefixMap <- schema match { + case Some(schema) => + schema.getSchema.map( + _.map(_.pm).toOption.getOrElse(PrefixMap.empty) + ) + case None => IO.pure(PrefixMap.empty) + } + } yield (dataPrefixMap, schemaPrefixMap) + mapsIo.unsafeRunSync() + }.toEither.leftMap(ex => + DecodingFailure( + s"Could not process the user data provided:\n${ex.getMessage}", + Nil + ) + ) + } yield maybeShapeMap.flatMap(sm => + /* Finally, try to build the object, catching any exception */ + Try { + val finalShapeMap = sm.copy( + nodesPrefixMap = prefixMaps._1, + shapesPrefixMap = prefixMaps._2 + ) + TriggerShapeMap(finalShapeMap, data, schema) + }.toEither + .leftMap(err => + s"Could not build the shapeMap trigger-mode from user data:\n ${err.getMessage}" + ) + ) + } + + override implicit val encode: Encoder[TriggerShapeMap] = (tsm: TriggerShapeMap) => Json.obj( - ("type", tsm.triggerModeType.asJson), + ("type", tsm._type.asJson), ("shapeMap", tsm.shapeMap.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) - override implicit val decoder: Decoder[TriggerShapeMap] = - (cursor: HCursor) => - for { - shapeMap <- cursor.downField("shapeMap").as[Either[String, ShapeMap]] - data <- cursor.downField("data").as[Option[Data]] - schema <- cursor.downField("schema").as[Option[Schema]] - decoded = TriggerShapeMap(shapeMap.toOption.get, data, schema) - } yield decoded /** Given a request's parameters, try to extract a TriggerMode instance from them * diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala index 636c226d..fe83407e 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala @@ -1,6 +1,7 @@ package es.weso.rdfshape.server.api.routes.schema.logic.trigger import cats.effect.IO +import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.data.logic.types.Data import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerModeType.TriggerModeType @@ -14,36 +15,35 @@ import io.circe.{Decoder, Encoder, HCursor, Json} * for SHACL validations. */ sealed case class TriggerTargetDeclarations private ( - override val data: Option[Data], - override val schema: Option[Schema] + override val data: Option[Data] = None, + override val schema: Option[Schema] = None ) extends TriggerMode with LazyLogging { - override val triggerModeType: TriggerModeType = + override val _type: TriggerModeType = TriggerModeType.TARGET_DECLARATIONS - override def getValidationTrigger: Either[String, ValidationTrigger] = - Right(TargetDeclarations) + override def getValidationTrigger: ValidationTrigger = + TargetDeclarations } private[api] object TriggerTargetDeclarations extends TriggerModeCompanion[TriggerTargetDeclarations] with LazyLogging { - override implicit val encoder: Encoder[TriggerTargetDeclarations] = + override implicit def decode( + data: Option[Data], + schema: Option[Schema] + ): Decoder[Either[String, TriggerTargetDeclarations]] = + (_: HCursor) => TriggerTargetDeclarations(data, schema).asRight.asRight + + override implicit val encode: Encoder[TriggerTargetDeclarations] = (tsm: TriggerTargetDeclarations) => Json.obj( - ("type", tsm.triggerModeType.asJson), + ("type", tsm._type.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) - override implicit val decoder: Decoder[TriggerTargetDeclarations] = - (cursor: HCursor) => - for { - data <- cursor.downField("data").as[Option[Data]] - schema <- cursor.downField("schema").as[Option[Schema]] - decoded = TriggerTargetDeclarations(data, schema) - } yield decoded /** Given a request's parameters, try to extract a TriggerMode instance from them * diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala index e8cfaec7..7205c537 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala @@ -1,40 +1,54 @@ package es.weso.rdfshape.server.api.routes.schema.logic.types import cats.effect.IO +import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.nodes.IRI import es.weso.rdfshape.server.api.definitions.ApiDefinitions import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.SchemaFormat +import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource.SchemaSource +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.SourceParameter import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.schema.{Schema => SchemaW} -import io.circe.{Decoder, Encoder, HCursor} +import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} /** Common trait to all schemas, whichever its nature */ trait Schema { - /** Either the raw schema contents represented as a String, - * or the error occurred when trying to parse the schema - */ - lazy val rawSchema: Either[String, String] = Left("") - /** Default URI obtained from current folder */ lazy val base: Option[IRI] = Some(ApiDefinitions.localBase) - // ApiDefaults.relativeBase + + /** Given the user input for the schema and its source, fetch the Schema contents + * using the input in the way the source needs it + * (e.g.: for URLs, fetch the input with a web request; for files, + * decode the input; for raw data, do nothing) + * + * @return Either the raw schema contents represented as a String, + * or the error occurred when trying to parse the schema + */ + val fetchedContents: Either[String, String] + + /** Raw schema value, i.e.: the text forming the schema + * + * @note It is safely extracted from [[fetchedContents]] after asserting + * the [[source]] and fetched contents are right + */ + val raw: String /** Source where the schema comes from */ - val schemaSource: SchemaSource + val source: SchemaSource /** Format of the schema */ - val format: Option[SchemaFormat] = None + val format: SchemaFormat /** Engine used for operating the schema */ - val engine: Option[SchemaW] = None + val engine: SchemaW /** Get the inner schema entity of type [[SchemaW]], which is used internally for schema operations * @@ -42,16 +56,16 @@ trait Schema { * or an error extracting the model */ def getSchema: IO[Either[String, SchemaW]] + + /** @return A String with the raw contents or the error that made them + * un-parseable + */ + override def toString: String = + fetchedContents.fold(identity, identity) } object Schema extends SchemaCompanion[Schema] { - /** Dummy implementation meant to be overridden - * - * @note Resort by default to [[SchemaSimple]]'s empty representation - */ - override val emptySchema: Schema = SchemaSimple.emptySchema - /** Dummy implementation meant to be overridden. * If called on a general [[Schema]] instance, pattern match among the available data types to * use the correct implementation @@ -66,12 +80,22 @@ object Schema extends SchemaCompanion[Schema] { * * @note Defaults to [[SchemaSimple]]'s implementation of decoding data */ - override implicit val decodeSchema: Decoder[Schema] = (cursor: HCursor) => { - this.getClass match { - case ss if ss == classOf[SchemaSimple] => - SchemaSimple.decodeSchema(cursor) + override implicit val decodeSchema: Decoder[Either[String, Schema]] = + (cursor: HCursor) => { + for { + source <- cursor + .downField(SourceParameter.name) + .as[SchemaSource] + + decoded <- source match { + case _ if SchemaSource.values.contains(source) => + SchemaSimple.decodeSchema(cursor) + case _ => + DecodingFailure(s"Invalid schema source '$source'", Nil).asLeft + } + } yield decoded + } - } /** Build a [[Schema]] from request parameters * @@ -91,17 +115,15 @@ object Schema extends SchemaCompanion[Schema] { */ private[schema] trait SchemaCompanion[S <: Schema] extends LazyLogging { - /** Empty instance of the [[Schema]] representation in use - */ - val emptySchema: S - /** Encoder used to transform [[Schema]] instances to JSON values */ implicit val encodeSchema: Encoder[S] /** Decoder used to extract [[Schema]] instances from JSON values + * The decoder returns either the decoded Schema or the error occurred + * in the decoding process */ - implicit val decodeSchema: Decoder[S] + implicit val decodeSchema: Decoder[Either[String, S]] /** Given a request's parameters, try to extract an instance of [[Schema]] (type [[S]]) from them * diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala index c381aaa7..e25907c3 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala @@ -5,10 +5,7 @@ import cats.implicits.toBifunctorOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.PrefixMap import es.weso.rdfshape.server.api.definitions.ApiDefaults -import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.{ - SchemaFormat, - ShaclFormat -} +import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.SchemaFormat import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource.SchemaSource import es.weso.rdfshape.server.api.routes.schema.logic.aux.SchemaAdapter @@ -20,72 +17,66 @@ import es.weso.schema.{Schemas, Schema => SchemaW} import io.circe.syntax.EncoderOps import io.circe.{Decoder, Encoder, HCursor, Json} +import scala.util.Try + /** Case class representing a single Schema instance with its inner content, format, engine and source * - * @param schemaPre Schema data, as it is received before being processed depending on the [[schemaSource]] - * @param schemaFormat Schema format - * @param schemaEngine Schema engine of type [[SchemaW]], used to know how to internally process schema operations - * @param schemaSource Origin source, used to know how to process the raw data + * @param content Schema data, as it is received before being processed depending on the [[source]] + * @param format Schema format + * @param engine Schema engine of type [[SchemaW]], used to know how to internally process schema operations + * @param source Origin source, used to know how to process the raw data */ sealed case class SchemaSimple( - private val schemaPre: Option[String], - private val schemaFormat: SchemaFormat, - private val schemaEngine: SchemaW, - override val schemaSource: SchemaSource + private val content: String, + override val format: SchemaFormat = SchemaFormat.default, + override val engine: SchemaW, + override val source: SchemaSource = SchemaSource.default ) extends Schema with LazyLogging { - /** Given the user input ([[schemaPre]]) for the schema and its source, fetch the Schema contents using the input in the way the source needs it - * (e.g.: for URLs, fetch the input with a web request; for files, decode the input; for raw data, do nothing) - * - * @return Either an error creating the raw data or a String containing the final schema text - */ - override lazy val rawSchema: Either[String, String] = - schemaPre.map(_.trim) match { - case None | Some("") => Left("Could not build the Schema from empty data") - case Some(userSchema) => - schemaSource match { - case SchemaSource.TEXT | SchemaSource.FILE => Right(userSchema) - case SchemaSource.URL => - getUrlContents(userSchema) - - case other => - val msg = s"Unknown schema source: $other" - logger.warn(msg) - Left(msg) - - } - } - // Override and make publicly available the trait properties - override val format: Option[SchemaFormat] = Option(schemaFormat) - override val engine: Option[SchemaW] = Option(schemaEngine) - - def getPrefixMap: IO[Option[PrefixMap]] = for { + // Non empty content + assume(!content.isBlank, "Could not build the schema from empty data") + // Valid source + assume( + SchemaSource.values.exists(_ equalsIgnoreCase source), + s"Unknown schema source: '$source'" + ) + + override lazy val fetchedContents: Either[String, String] = + if(source equalsIgnoreCase SchemaSource.URL) + getUrlContents(content) + // Text or file + else Right(content) + + // Fetched contents successfully + assume( + fetchedContents.isRight, + fetchedContents.left.getOrElse("Unknown error") + ) + + // Get prefix map when needed + lazy val prefixMap: IO[Option[PrefixMap]] = for { model <- getSchema } yield model.map(_.pm).toOption - override def getSchema: IO[Either[String, SchemaW]] = { - rawSchema match { - case Right(schemaStr) => - for { - schemaW <- Schemas - .fromString( - str = schemaStr, - format = schemaFormat.name, - schemaEngine.name, - base.map(_.str) - ) - .attempt // Catch unexpected exceptions early + override val raw: String = fetchedContents.toOption.get - } yield schemaW.leftMap(err => - Option(err.getMessage).getOrElse( - "Unknown error processing the schema" - ) + override def getSchema: IO[Either[String, SchemaW]] = + for { + schemaW <- Schemas + .fromString( + str = raw, + format = format.name, + engine.name, + base.map(_.str) ) - // No schema data, propagate the error - case Left(err) => IO.pure(Left(err)) - } - } + .attempt // Catch unexpected exceptions early + + } yield schemaW.leftMap(err => + Option(err.getMessage).getOrElse( + "Unknown error processing the schema" + ) + ) } @@ -93,51 +84,53 @@ private[api] object SchemaSimple extends SchemaCompanion[SchemaSimple] with LazyLogging { - /** Empty schema representation, with no inner data and all defaults or None - */ - override lazy val emptySchema: SchemaSimple = - SchemaSimple( - schemaPre = None, - schemaFormat = ApiDefaults.defaultSchemaFormat, - schemaEngine = ApiDefaults.defaultSchemaEngine, - schemaSource = ApiDefaults.defaultSchemaSource - ) override implicit val encodeSchema: Encoder[SchemaSimple] = (schema: SchemaSimple) => { Json.obj( - ("schema", schema.rawSchema.toOption.asJson), - ("format", schema.schemaFormat.asJson), - ("engine", schema.schemaEngine.asJson), - ("source", schema.schemaSource.asJson) + ("content", schema.raw.asJson), + ("format", schema.format.asJson), + ("engine", schema.engine.asJson), + ("source", schema.source.asJson) ) } - override implicit val decodeSchema: Decoder[SchemaSimple] = - (cursor: HCursor) => - for { - schema <- cursor.downField("schema").as[Option[String]] - - schemaFormat <- cursor - .downField("schemaFormat") - .as[ShaclFormat] - - schemaEngine <- + override implicit val decodeSchema: Decoder[Either[String, SchemaSimple]] = + (cursor: HCursor) => { + val schemaData = for { + content <- cursor + .downField(ContentParameter.name) + .as[String] + .map(_.trim) + + maybeFormat <- cursor + .downField(FormatParameter.name) + .as[Either[String, SchemaFormat]] + + maybeEngine <- cursor - .downField("schemaEngine") - .as[SchemaW] + .downField(EngineParameter.name) + .as[Either[String, SchemaW]] - schemaSource <- cursor - .downField("schemaSource") + source <- cursor + .downField(SourceParameter.name) .as[SchemaSource] - .orElse(Right(SchemaSource.default)) - decoded = SchemaSimple.emptySchema.copy( - schemaPre = schema, - schemaFormat, - schemaEngine, - schemaSource - ) - - } yield decoded + } yield (content, maybeFormat, maybeEngine, source) + + schemaData.map { + /* Destructure and try to build the object, catch the exception as error + * message if needed */ + case (content, maybeFormat, maybeEngine, source) => + for { + format <- maybeFormat + engine <- maybeEngine + schema <- Try { + SchemaSimple(content, format, engine, source) + }.toEither.leftMap(err => + s"Could not build the schema from user data:\n ${err.getMessage}" + ) + } yield schema + } + } override def mkSchema(partsMap: PartsMap): IO[Either[String, SchemaSimple]] = for { @@ -164,13 +157,13 @@ private[api] object SchemaSimple // Base for the result schema = SchemaSimple( - schemaPre = paramSchema, - schemaFormat = schemaFormat, - schemaEngine = schemaEngine, - schemaSource = schemaSource + content = "", + format = schemaFormat, + engine = schemaEngine, + source = schemaSource ) - } yield schema.rawSchema.fold( + } yield schema.fetchedContents.fold( err => Left(err), _ => Right(schema) ) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 8c5b0795..77eb8b78 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -4,14 +4,11 @@ import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api -import es.weso.rdfshape.server.api.format.dataFormats.DataFormat import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.{ ShExFormat, ShaclFormat } import es.weso.rdfshape.server.api.routes.ApiService -import es.weso.rdfshape.server.api.routes.data.logic.types.Data -import es.weso.rdfshape.server.api.routes.schema.logic.aux.SchemaAdapter import es.weso.rdfshape.server.api.routes.schema.logic.operations.{ SchemaConvert, SchemaInfo, @@ -21,19 +18,28 @@ import es.weso.rdfshape.server.api.routes.schema.logic.trigger.{ TriggerMode, TriggerShapeMap } -import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema +import es.weso.rdfshape.server.api.routes.schema.service.operations.SchemaConvertInput.decoder +import es.weso.rdfshape.server.api.routes.schema.service.operations.{ + SchemaConvertInput, + SchemaInfoInput, + SchemaValidateInput +} import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMap -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ -import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson -import es.weso.schema.{Schemas, ShExSchema, Result => ValidationResult} +import es.weso.rdfshape.server.implicits.string_parsers.instances.schemaEngineParser +import es.weso.schema.{ + JenaShacl, + Schemas, + ShExSchema, + ShaclTQ, + ShaclexSchema, + Schema => SchemaW +} import io.circe.Json import io.circe.syntax.EncoderOps -import org.http4s._ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl -import org.http4s.multipart.Multipart +import org.http4s.rho.RhoRoutes /** API service to handle schema-related operations * @@ -48,247 +54,115 @@ class SchemaService(client: Client[IO]) /** Describe the API routes handled by this service and the actions performed on each of them */ - val routes: HttpRoutes[IO] = HttpRoutes.of[IO] { + val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Returns a JSON array with the accepted schema engines for ShEx + /** Returns a JSON array with the accepted schema engines a given schema type (ShEx or Shacl) */ - case GET -> Root / `api` / `verb` / "engines" / "shex" => - val shexSchemas = List(Schemas.shEx) + GET / `api` / `verb` / "engines" / pathVar[String] |>> { `type`: String => + val engines = `type`.toLowerCase match { + case "shex" => List(Schemas.shEx) + case "shacl" => + List(Schemas.shaclex, Schemas.jenaShacl, Schemas.shaclTQ) + } val json = Json.fromValues( - shexSchemas.map(_.name).map(str => Json.fromString(str)) + engines.map(_.name).map(str => Json.fromString(str)) ) Ok(json) + } - /** Returns a JSON array with the accepted schema engines for SHACL + /** Returns the default schema engine as a raw string */ - case GET -> Root / `api` / `verb` / "engines" / "shacl" => - val shaclSchemas = - List(Schemas.shaclex, Schemas.jenaShacl, Schemas.shaclTQ) - val json = Json.fromValues( - shaclSchemas.map(_.name).map(str => Json.fromString(str)) - ) + GET / `api` / `verb` / "engines" / "default" |>> { + val json = Json.fromString(Schemas.defaultSchema.name) Ok(json) + } - /** Returns the default schema format as a raw string + /** Returns the default schema format for a given engine as a raw string */ - case GET -> Root / `api` / `verb` / "engines" / "default" => - val schemaEngine = Schemas.defaultSchema - val json = Json.fromString(schemaEngine.name) - Ok(json) + GET / `api` / `verb` / "formats" / "default" / pathVar[SchemaW] |>> { + engine: SchemaW => + val defaultFormat = engine match { + case ShExSchema(_) => ShExFormat.default + case JenaShacl(_) | ShaclTQ(_) | ShaclexSchema(_) => + ShaclFormat.default + } + val json = Json.fromString(defaultFormat.name) + Ok(json) + } /** Returns a JSON array with the accepted schema formats. * Accepts an optional query parameter specifying the schema engine: * - schemaEngine [String]: schema engine for which we are listing the formats */ - case GET -> Root / `api` / `verb` / "formats" :? - SchemaEngineParameter(optSchemaEngine) => - val maybeFormats = for { - schema <- Schemas.lookupSchema( - optSchemaEngine.getOrElse(Schemas.defaultSchemaName) - ) - formats = schema match { - case _: ShExSchema => ShExFormat.availableFormats - case _ => ShaclFormat.availableFormats - } - } yield Json.fromValues( - formats.map(format => Json.fromString(format.name)) - ) - - // Handle errors - maybeFormats - .flatMap(Ok(_)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) + GET / `api` / `verb` / "formats" / pathVar[SchemaW] |>> { engine: SchemaW => + val formats = engine match { + case ShExSchema(_) => ShExFormat.availableFormats + case JenaShacl(_) | ShaclTQ(_) | ShaclexSchema(_) => + ShaclFormat.availableFormats + } + val json = Json.fromValues(formats.map(f => Json.fromString(f.name))) + Ok(json) + } /** Returns a JSON array with the accepted Trigger Modes */ - case GET -> Root / `api` / `verb` / "triggerModes" => + GET / `api` / `verb` / "triggerModes" |>> { val json = Json.fromValues( ApiDefinitions.availableTriggerModes.map( Json.fromString ) ) Ok(json) + } /** Obtain information about an schema. - * Receives a JSON object with the input schema information: - * - schema [String]: Schema data (raw, URL containing the schema or File with the schema) - * - schemaSource [String]: Identifies the source of the schema (raw, URL, file...) - * - schemaFormat [String]: Format of the schema - * - schemaEngine [String]: Engine used to process the schema (ignored for ShEx) - * Returns a JSON object with the operation results. See [[SchemaInfo.encodeSchemaInfoOperation]]. + * Receives a JSON object with the input schema information + * Returns a JSON object with the operation results. See + * [[SchemaInfo.encodeSchemaInfoOperation]]. */ - case req @ POST -> Root / `api` / `verb` / "info" => - req.decode[Multipart[IO]] { m => - { - val partsMap = PartsMap(m.parts) + POST / `api` / `verb` / "info" ^ jsonOf[IO, SchemaInfoInput] |>> { + body: SchemaInfoInput => + SchemaInfo + .schemaInfo(body.schema) + .flatMap(info => Ok(info.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) - for { - // Get the schema from the partsMap - eitherSchema <- Schema.mkSchema(partsMap) - response <- eitherSchema.fold( - // If there was an error parsing the schema, return it - err => errorResponseJson(err, InternalServerError), - // Else, try and compute the schema info - schema => - SchemaInfo - .schemaInfo(schema) - .flatMap(info => Ok(info.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - ) - - } yield response - } - } + } /** Convert a given schema to another accepted format (this includes * graphic formats for visualizations). - * * Receives a JSON object with the input schema information: - * - schema [String]: Schema data (raw, URL containing the schema or File with the schema) - * - schemaSource [String]: Identifies the source of the schema (raw, URL, file...) - * - schemaFormat [String]: Format of the schema - * - schemaEngine [String]: Engine used to process the schema (ignored for ShEx) - * - targetSchemaFormat [String]: Desired format after conversion of the schema - * Returns a JSON object with the operation results. See [[SchemaConvert.encodeSchemaConvertOperation]]. + * Receives a JSON object with the input schema information + * Returns a JSON object with the operation results. See + * [[SchemaConvert.encodeSchemaConvertOperation]]. */ - case req @ POST -> Root / `api` / `verb` / "convert" => - req.decode[Multipart[IO]] { m => - { - val partsMap = PartsMap(m.parts) - for { - // Get the schema from the partsMap - eitherSchema <- Schema.mkSchema(partsMap) - // Get the target schema format - optTargetFormatStr <- partsMap.optPartValue( - TargetSchemaFormatParameter.name - ) - optTargetFormat = for { - targetFormatStr <- optTargetFormatStr - targetFormat <- DataFormat - .fromString(targetFormatStr) - .toOption - } yield targetFormat - - // Get the target engine - optTargetEngineStr <- partsMap.optPartValue( - TargetSchemaEngineParameter.name - ) - optTargetEngine = for { - targetEngineStr <- optTargetEngineStr - targetEngine <- SchemaAdapter.schemaEngineFromString( - targetEngineStr - ) - } yield targetEngine - - // Abort if no valid target format, else continue - response <- optTargetFormat match { - case None => - errorResponseJson( - "Empty or invalid target format for conversion", - BadRequest - ) - case Some(targetFormat) => - eitherSchema match { - case Left(err) => errorResponseJson(err, InternalServerError) - case Right(schema) => - SchemaConvert - .schemaConvert( - schema, - targetFormat, - optTargetEngine - ) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - } - } yield response - } - } + POST / `api` / `verb` / "convert" ^ jsonOf[IO, SchemaConvertInput] |>> { + body: SchemaConvertInput => + SchemaConvert + .schemaConvert( + body.schema, + body.targetFormat, + body.targetEngine + ) + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } /** Validates RDF data against a given schema-shapemap. - * Receives a JSON object with the input data, schema and shapemap information: - * - * - data [String]: RDF data (raw, URL containing the data or File with the data) - * - dataSource [String]: Identifies the source of the data (raw, URL, file...) so that the server knows how to handle it - * - dataFormat [String]: Format of the RDF data - * - inference [String]: Inference to be applied to the data - * - * - schema [String]: Schema data (raw, URL containing the schema or File with the schema) - * - schemaSource [String]: Identifies the source of the schema (raw, URL, file...) - * - schemaFormat [String]: Format of the schema - * - schemaEngine [String]: Engine used to process the schema (ignored for ShEx) - * - * - shapeMap [String]: ShapeMap data (raw, URL containing the shapeMap or File with the shapeMap) - * - shapeMapSource [String]: Identifies the source of the shapeMap (raw, URL, file...) - * - shapeMapFormat [String]: Format of the shapemap - * - * - endpoint [String]: Additional endpoint to serve as a source of data - * - triggerMode [String]: Validation trigger mode - * - * Returns a JSON object with the operation results. See [[SchemaValidate.encodeSchemaValidateOperation]] and [[ValidationResult.toJson()]]. - * + * Receives a JSON object with the input data, schema and shapemap + * information + * Returns a JSON object with the operation results. See + * [[SchemaValidate.encodeSchemaValidateOperation]] * @note When obtaining the trigger mode from the parameters, * if the [[TriggerMode]] is shapeMap, the corresponding [[ShapeMap]] * object will be embedded in the resulting [[TriggerShapeMap]] */ - case req @ POST -> Root / `api` / `verb` / "validate" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - val response = for { - /* Get the data, schema and trigger-mode from the partsMap. - * If the trigger-mode is "shapeMap", the shapemap will be embedded in - * the trigger object */ - - eitherData <- Data.mkData(partsMap) - - eitherSchema <- Schema.mkSchema(partsMap) - - eitherTriggerMode <- TriggerMode - .mkTriggerMode( - partsMap, - eitherData.toOption, - eitherSchema.toOption - ) - - // Contains either the first error encountered or the validation - eitherValidationData = for { - data <- eitherData - schema <- eitherSchema - trigger <- eitherTriggerMode - } yield (data, schema, trigger) - - response <- eitherValidationData match { - case Left(err) => errorResponseJson(err, InternalServerError) - case Right((data, schema, trigger)) => - SchemaValidate - .schemaValidate(data, schema, trigger) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - - } yield response - response.handleErrorWith(err => - err.getMessage match { - case msg: String => - errorResponseJson( - msg, - InternalServerError - ) - case _ => - errorResponseJson( - SchemaServiceError.couldNotValidateData, - InternalServerError - ) - } - ) - } + POST / `api` / `verb` / "validate" ^ jsonOf[IO, SchemaValidateInput] |>> { + body: SchemaValidateInput => + SchemaValidate + .schemaValidate(body.data, body.schema, body.triggerMode) + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaConvertInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaConvertInput.scala new file mode 100644 index 00000000..28155ce3 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaConvertInput.scala @@ -0,0 +1,65 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations + +import cats.implicits.catsSyntaxEitherId +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.format.dataFormats.DataFormat +import es.weso.rdfshape.server.api.routes.schema.logic.aux.SchemaAdapter.decodeEngine +import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + SchemaParameter, + TargetEngineParameter, + TargetFormatParameter +} +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import es.weso.schema.{Schema => SchemaW} +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when querying the server + * for a schema conversion + * + * @param schema Schema to be inspected + * @param targetFormat Desired output format + * @param targetEngine Desired output engine + */ +case class SchemaConvertInput( + schema: Schema, + targetFormat: DataFormat, + targetEngine: SchemaW +) + +object SchemaConvertInput extends ServiceRouteOperation[SchemaConvertInput] { + override implicit val decoder: Decoder[SchemaConvertInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeSchema <- cursor + .downField(SchemaParameter.name) + .as[Either[String, Schema]] + + // Use data format because target formats range + // from SchemaFormats to GraphicFormats, etc. + maybeTargetFormat <- cursor + .downField(TargetFormatParameter.name) + .as[Either[String, DataFormat]] + + maybeTargetEngine <- cursor + .downField(TargetEngineParameter.name) + .as[Either[String, SchemaW]] match { + // Decoding error: the param was not sent. Use input schema engine + case Left(_) => maybeSchema.map(_.engine).asRight + // Keep the result extracted from user input + case other => other + } + + maybeItems = for { + schema <- maybeSchema + targetFormat <- maybeTargetFormat + targetEngine <- maybeTargetEngine + } yield (schema, targetFormat, targetEngine) + + } yield maybeItems.map { case (schema, targetFormat, targetEngine) => + SchemaConvertInput(schema, targetFormat, targetEngine) + } + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaInfoInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaInfoInput.scala new file mode 100644 index 00000000..48292514 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaInfoInput.scala @@ -0,0 +1,27 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.SchemaParameter +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when querying the server + * for a schema information + * + * @param schema Schema to be inspected + */ +case class SchemaInfoInput(schema: Schema) + +object SchemaInfoInput extends ServiceRouteOperation[SchemaInfoInput] { + override implicit val decoder: Decoder[SchemaInfoInput] = (cursor: HCursor) => + { + val decodeResult = for { + maybeSchema <- cursor + .downField(SchemaParameter.name) + .as[Either[String, Schema]] + } yield maybeSchema.map(SchemaInfoInput(_)) + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaValidateInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaValidateInput.scala new file mode 100644 index 00000000..59e6bacf --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaValidateInput.scala @@ -0,0 +1,54 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.data.logic.types.Data +import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerMode +import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when querying the server + * for a schema validation of data + * + * @param data Data to be validated + * @param schema Schema model for the validation + * @param triggerMode Validation trigger, i.e.: how the validation was + * started (shapeMap, target declarations...) + */ +case class SchemaValidateInput( + data: Data, + schema: Schema, + triggerMode: TriggerMode +) + +object SchemaValidateInput extends ServiceRouteOperation[SchemaValidateInput] { + override implicit val decoder: Decoder[SchemaValidateInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeData <- cursor + .downField(DataParameter.name) + .as[Either[String, Data]] + + maybeSchema <- cursor + .downField(SchemaParameter.name) + .as[Either[String, Schema]] + + maybeTriggerMode <- cursor + .downField(TriggerModeParameter.name) + .as[Either[String, TriggerMode]]( + TriggerMode.decode(maybeData.toOption, maybeSchema.toOption) + ) + + maybeItems = for { + data <- maybeData + schema <- maybeSchema + triggerMode <- maybeTriggerMode + } yield (data, schema, triggerMode) + + } yield maybeItems.map { case (data, schema, triggerMode) => + SchemaValidateInput(data, schema, triggerMode) + } + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala index bfad7f92..f1441088 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala @@ -29,56 +29,67 @@ sealed case class ShapeMap private ( private val content: String, private val nodesPrefixMap: PrefixMap = PrefixMap.empty, private val shapesPrefixMap: PrefixMap = PrefixMap.empty, - format: ShapeMapFormat, - source: ShapeMapSource + format: ShapeMapFormat = ShapeMapFormat.default, + source: ShapeMapSource = ShapeMapSource.default ) extends LazyLogging { - // Non empty content + // Non empty content assume(!content.isBlank, "Could not build the shapeMap from empty data") // Valid source - assume(ShapeMapSource.values.exists(_ equalsIgnoreCase source), - s"Unknown shapemap source: \"$source\"") + assume( + ShapeMapSource.values.exists(_ equalsIgnoreCase source), + s"Unknown shapemap source: '$source'" + ) /** Given the (user input) for the shapeMap and its source, fetch the shapeMap contents using the input in the way the source needs it * (e.g.: for URLs, fetch the input with a web request; for files, decode the input; for raw data, do nothing) * * @return Optionally, a String containing the final text of the shapeMap query */ - lazy val fetchedContents: Either[String, String] = - if (source equalsIgnoreCase ShapeMapSource.URL) + lazy val fetchedContents: Either[String, String] = + if(source equalsIgnoreCase ShapeMapSource.URL) getUrlContents(content) - // Text or file + // Text or file else Right(content) - - assume(fetchedContents.isRight, - fetchedContents.left.getOrElse("Unknown error")) - + // Fetched contents successfully + assume( + fetchedContents.isRight, + fetchedContents.left.getOrElse("Unknown error creating the ShapeMap") + ) + /** Inner shapemap structure of the data in this instance * * @return A ShapeMap instance used by WESO libraries in validation */ lazy val innerShapeMap: Either[String, ShapeMapW] = { - if (raw.isBlank) "Cannot extract the ShapeMap from an empty instance".asLeft - else ShapeMapW - .fromString( - raw, - format.name, - base = None, - nodesPrefixMap, - shapesPrefixMap - ) match { - case Left(errorList) => errorList.toList.mkString("\n").asLeft - case Right(shapeMap) => shapeMap.asRight - } + if(raw.isBlank) "Cannot extract the ShapeMap from an empty instance".asLeft + else + ShapeMapW + .fromString( + raw, + format.name, + base = None, + nodesPrefixMap, + shapesPrefixMap + ) match { + case Left(errorList) => errorList.toList.mkString("\n").asLeft + case Right(shapeMap) => shapeMap.asRight + } } - /** - * Raw shapeMap value, i.e.: the text forming the shapeMap - * - * @note It is safely extracted fromm [[fetchedContents]] after asserting - * the contents are right - */ + + /** Raw shapeMap value, i.e.: the text forming the shapeMap + * + * @note It is safely extracted from [[fetchedContents]] after asserting + * the [[shapeMapSource]] and contents are right + */ val raw: String = fetchedContents.toOption.get + + /** @return A String with the raw contents or the error that made them + * un-parseable + */ + override def toString: String = + fetchedContents.fold(identity, identity) } private[api] object ShapeMap extends LazyLogging { @@ -109,7 +120,7 @@ private[api] object ShapeMap extends LazyLogging { format <- cursor .downField(FormatParameter.name) - .as[ShapeMapFormat] + .as[Either[String, ShapeMapFormat]] source <- cursor .downField(SourceParameter.name) @@ -120,19 +131,21 @@ private[api] object ShapeMap extends LazyLogging { shapeMapData.map { /* Destructure and try to build the object, catch the exception as error * message if needed */ - case (content, format, source) => - Try { - ShapeMap( - content, - nodesPrefixMap = PrefixMap.empty, - shapesPrefixMap = PrefixMap.empty, - format, - source + case (content, maybeFormat, source) => + for { + format <- maybeFormat + shapeMap <- Try { + ShapeMap( + content, + nodesPrefixMap = PrefixMap.empty, + shapesPrefixMap = PrefixMap.empty, + format, + source + ) + }.toEither.leftMap(err => + s"Could not build the ShapeMap from user data:\n ${err.getMessage}" ) - }.toEither.leftMap(err => - s"Could not build the ShapeMap from user data:\n ${err.getMessage}" - ) - + } yield shapeMap } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala index 7dc83f03..3723d614 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala @@ -38,10 +38,6 @@ class ShapeMapService(client: Client[IO]) } /** Obtain information about a shapeMap. - * Receives a JSON object with the input shapeMap information: - * - shapeMap [String]: Raw shapemap data - * - shapeMapFormat [String]: Format of the shapeMap - * - shapeMapSource [String]: Identifies the source of the shapeMap (raw, URL, file...) * Returns a JSON object with the query inputs and results (see [[ShapeMapInfo.encodeShapeMapInfoOperation]]). */ POST / `api` / `verb` / "info" ^ jsonOf[IO, ShapeMapInfoInput] |>> { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala index d9883419..f4ca0635 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/operations/ShapeMapInfoInput.scala @@ -6,6 +6,10 @@ import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.Sh import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult import io.circe.{Decoder, HCursor} +/** Data class representing the inputs required when querying the server + * for ShapeMap information + * @param shapeMap ShapeMap to be inspected + */ case class ShapeMapInfoInput(shapeMap: ShapeMap) object ShapeMapInfoInput extends ServiceRouteOperation[ShapeMapInfoInput] { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala index d47cea63..f9f16af8 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala @@ -1,24 +1,26 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.operations import cats.effect.IO -import cats.implicits.catsSyntaxEitherId +import cats.implicits.{catsSyntaxEitherId, toBifunctorOps} import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationFormats.WikibaseQueryFormat import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.implicits.codecs.encodeUri +import es.weso.rdfshape.server.implicits.codecs.{decodeUri, encodeUri} import io.circe.syntax.EncoderOps -import io.circe.{Encoder, Json} +import io.circe.{Decoder, Encoder, HCursor, Json} import org.http4s.Uri -import org.http4s.implicits.http4sLiteralsSyntax + +import scala.util.Try /** Case class representing the data attached to the queries made to wikibase's API * or SPARQL endpoint. Optional parameters may not be required in some operations. * * @param endpoint [[Uri]] to be used to access a resource in a wikibase instance * @param payload Data accompanying the request to the wikibase - * @param searchLanguage Tell the wikibase the language used in a search operation. + * @param searchLanguage Tell the wikibase the language used in a search operation + * as well as the language for the returned results. * @param resultLanguages Filter the languages returned in queries with internationalized results * (empty list returns all available languages). * Each language must be represented by its language code. @@ -36,22 +38,20 @@ case class WikibaseOperationDetails( limit: Option[Int], continue: Option[Int], format: Option[WikibaseQueryFormat] -) +) { + // Non empty content + assume( + !endpoint.renderString.isBlank, + "Could not build the Wikibase for an empty target" + ) + assume( + !payload.isBlank, + "Empty payload for the Wikibase request" + ) +} object WikibaseOperationDetails extends LazyLogging { - /** Dummy empty query to be used when needed - */ - val emptyQuery: WikibaseOperationDetails = WikibaseOperationDetails( - endpoint = uri"", - payload = "", - searchLanguage = None, - resultLanguages = None, - limit = None, - continue = None, - format = None - ) - /** Message to be logged/used when no endpoint was supplied */ val missingEndpointMessage = @@ -80,6 +80,87 @@ object WikibaseOperationDetails extends LazyLogging { ) ) + /** Decoder used to extract [[WikibaseOperationDetails]] instances from JSON values + */ + implicit val decode: Decoder[Either[String, WikibaseOperationDetails]] = + (cursor: HCursor) => { + val operationInfo = for { + // Default to wikidata if empty + endpoint <- cursor + .downField(EndpointParameter.name) + .as[Either[String, Uri]] match { + // Decode error, parameter was missing. Default to Wikidata + case Left(_) => + logger.warn(missingEndpointMessage) + Right(Wikidata.baseUrl).asRight + // Extracted value, leave as is + case other => other + } + + payload <- cursor + .downField(WikibasePayloadParameter.name) + .as[String] + + searchLanguage <- + cursor + .downField(LanguageParameter.name) + .as[Option[String]] + + resultLanguages <- + cursor + .downField(LanguagesParameter.name) + .as[Option[List[String]]] + + limit <- cursor + .downField(LimitParameter.name) + .as[Option[Int]] + + continue <- cursor + .downField(ContinueParameter.name) + .as[Option[Int]] + + format <- cursor + .downField(WikibaseFormatParameter.name) + .as[Option[WikibaseQueryFormat]] + + } yield ( + endpoint, + payload, + searchLanguage, + resultLanguages, + limit, + continue, + format + ) + + operationInfo.map { + case ( + maybeUri, + payload, + optSearchLang, + optResultLanguages, + optLimit, + optContinue, + optFormat + ) => + maybeUri.flatMap(uri => + Try { + WikibaseOperationDetails( + uri, + payload, + optSearchLang, + optResultLanguages, + optLimit, + optContinue, + optFormat + ) + }.toEither.leftMap(err => + s"Could not build the Wikibase operation from user data:\n ${err.getMessage}" + ) + ) + } + } + /** Given a GET request's parameters, try to extract an instance * of [[WikibaseOperationDetails]] from them * diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala index 9a17ef1b..1218e1f7 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala @@ -96,7 +96,7 @@ private[wikibase] case class WikibaseSchemaExtract( result = Json.fromFields( List( ("entity", Json.fromString(entityUri)), - ("result", Json.fromString(shExCStr)) + ("schema", Json.fromString(shExCStr)) ) ) ) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala index cfb51b09..1b20919f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala @@ -79,10 +79,10 @@ private[wikibase] case class WikibaseSchemaValidate( wdEntities .map(entity => DataSingle( - dataPre = Some(entity.contentUri.renderString), - dataFormat = Turtle, + content = entity.contentUri.renderString, + format = Turtle, inference = NONE, - dataSource = DataSource.URL + source = DataSource.URL ) ) .toList diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchEntity.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchEntity.scala index c7c5725b..a2b00246 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchEntity.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchEntity.scala @@ -16,5 +16,5 @@ sealed case class WikibaseSearchEntity private ( ) extends WikibaseSearchOperation( operationData, client, - WikibaseSearchTypes.ITEM + WikibaseSearchTypes.ENTITY ) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala index d376be0a..40dfaadf 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala @@ -47,6 +47,10 @@ private[wikibase] abstract class WikibaseSearchOperation( "language", operationData.searchLanguage.getOrElse(defaultSearchLanguage) ) + .withQueryParam( + "uselang", + operationData.searchLanguage.getOrElse(defaultSearchLanguage) + ) .withQueryParam("limit", operationData.limit.getOrElse(defaultLimit)) .withQueryParam( "continue", diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala index f1556836..202badc4 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala @@ -1,18 +1,22 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.operations.search +import es.weso.rdfshape.server.utils.other.MyEnum + /** Enumeration of the different types of objects that can be requested to * wikibase's API in search operations. * * @see [[https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities]] */ -private[api] object WikibaseSearchTypes extends Enumeration { +private[api] object WikibaseSearchTypes extends MyEnum[String] { type WikibaseSearchTypes = String - val ITEM = "item" + val ENTITY = "item" val PROPERTY = "property" val LEXEME = "lexeme" val FORM = "form" val SENSE = "sense" - val default: WikibaseSearchTypes = ITEM + val values = Set(ENTITY, PROPERTY, LEXEME, FORM, SENSE) + val basicValues = Set(ENTITY, PROPERTY, LEXEME) + val default: WikibaseSearchTypes = ENTITY } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala index c7765e2c..0f55a48f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala @@ -5,7 +5,8 @@ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import es.weso.rdfshape.server.api.routes.schema.logic.operations.SchemaValidate -import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationResult +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationResult._ import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.get.WikibaseGetLabels import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.languages.WikibaseLanguages import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.query.WikibaseQueryOperation @@ -15,25 +16,24 @@ import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.schema.{ WikibaseSchemaValidate, WikibaseSheXerExtract } +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.search.WikibaseSearchTypes.WikibaseSearchTypes import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.search.{ WikibaseSearchEntity, WikibaseSearchLexeme, - WikibaseSearchProperty + WikibaseSearchProperty, + WikibaseSearchTypes } -import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.{ - WikibaseOperationDetails, - WikibaseOperationResult +import es.weso.rdfshape.server.api.routes.wikibase.service.operations.{ + WikibaseOperationInput, + WikibaseValidateInput } -import es.weso.rdfshape.server.api.utils.parameters.PartsMap -import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson import es.weso.shapemaps.{Status => _} import io.circe.syntax.EncoderOps -import org.http4s._ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.client.middleware.FollowRedirect import org.http4s.dsl.Http4sDsl -import org.http4s.multipart.Multipart +import org.http4s.rho.RhoRoutes /** API service to handle wikibase (and mostly wikidata) related operations * Acts as an intermediate proxy between clients and the MediaWiki API @@ -54,7 +54,7 @@ class WikibaseService(client: Client[IO]) /** Describe the API routes handled by this service and the actions performed on each of them */ - def routes: HttpRoutes[IO] = HttpRoutes.of[IO] { + def routes: RhoRoutes[IO] = new RhoRoutes[IO] { /** Search for wikidata objects and return their labels in the given languages. * Receives a JSON object with the input schema information: @@ -64,23 +64,15 @@ class WikibaseService(client: Client[IO]) * codes separated by "|" * Returns a JSON object with the results. See [[WikibaseOperationResult]] */ - case req @ GET -> Root / `api` / `verb` / "entityLabel" => - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(req.params) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val op = WikibaseGetLabels(opData, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response + POST / `api` / `verb` / "entityLabel" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseGetLabels(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } /** Search for wikidata schemas using MediaWiki's API. Search based on lexeme labels. * Receives a JSON object with the input schema information: @@ -88,25 +80,17 @@ class WikibaseService(client: Client[IO]) * - payload [String]: Schema identifier in the wikibase instance * Returns a JSON object with the results. See [[WikibaseOperationResult]] */ - case req @ GET -> Root / `api` / `verb` / "schemaContent" => - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(req.params) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val op = WikibaseSchemaContent(opData, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response - - /** Search for entities in a wikibase using MediaWiki's API. Search based on lexeme labels. + POST / `api` / `verb` / "schemaContent" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseSchemaContent(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } + + /** Search for entities in a wikibase using MediaWiki's API. Search based on entity/property/lexeme labels. * Receives a JSON object with the input property information: * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata's. * - payload [String]: Keywords for the search @@ -117,104 +101,47 @@ class WikibaseService(client: Client[IO]) * * @note see https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities */ - case req @ GET -> Root / `api` / `verb` / "searchEntity" => - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(req.params) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val searchOperation = WikibaseSearchEntity(opData, client) - searchOperation.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } + POST / `api` / `verb` / "search" / pathVar[WikibaseSearchTypes] ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { (searchType: String, body: WikibaseOperationInput) => + // Check for invalid search parameter + if(!WikibaseSearchTypes.basicValues.contains(searchType)) + BadRequest( + s"Invalid search type '$searchType'. Required one of: ${WikibaseSearchTypes.basicValues.mkString(", ")}" ) - } yield response + else { + // Create the corresponding operations and perform it + val searchOperation = searchType match { + case WikibaseSearchTypes.ENTITY => + WikibaseSearchEntity(body.operationDetails, client) + case WikibaseSearchTypes.PROPERTY => + WikibaseSearchProperty(body.operationDetails, client) + case WikibaseSearchTypes.LEXEME => + WikibaseSearchLexeme(body.operationDetails, client) + } + + searchOperation.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } - /** Search for properties in a wikibase using MediaWiki's API. Search based on property labels. - * Receives a JSON object with the input property information: - * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata - * - payload [String]: Keywords for the search - * - language [String]: Language in which the search is conducted - * - limit [Int]: Max number of results - * - continue [Int]: Offset where to continue a search - * Returns a JSON object with the results. See [[WikibaseOperationResult]] - * - * @note see https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities - */ - case req @ GET -> Root / `api` / `verb` / "searchProperty" => - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(req.params) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val searchOperation = WikibaseSearchProperty(opData, client) - searchOperation.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response - - /** Search for lexemes in a wikibase using MediaWiki's API. Search based on lexeme labels. - * Receives a JSON object with the input property information: - * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata's. - * - payload [String]: Keywords for the search - * - language [String]: Language in which the search is conducted - * - limit [Int]: Max number of results - * - continue [Int]: Offset where to continue a search - * Returns a JSON object with the results. See [[WikibaseOperationResult]] - * - * @note see https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities - */ - case req @ GET -> Root / `api` / `verb` / "searchLexeme" => - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(req.params) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val searchOperation = WikibaseSearchLexeme(opData, client) - searchOperation.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response + } /** Search for all the languages used in a wikibase instance. * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata. * Returns a JSON object with the array of languages supported. * See [[WikibaseOperationResult]] */ - case req @ GET -> Root / `api` / `verb` / "languages" => - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(req.params) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val languagesOperation = WikibaseLanguages(opData, client) - languagesOperation.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response + POST / `api` / `verb` / "languages" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseLanguages(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } /** Execute a given SPARQL query to a given SPARQL endpoint of a wikibase instance. * Receives a target endpoint and the query text. @@ -225,54 +152,30 @@ class WikibaseService(client: Client[IO]) * * Query examples in [[https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples]] */ - case req @ POST -> Root / `api` / `verb` / "query" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(partsMap) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val queryOp = WikibaseQueryOperation(opData, client) - queryOp.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response - } + POST / `api` / `verb` / "query" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseQueryOperation(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } /** Attempts to extract an schema (ShEx) from a given entity present in wikidata. - * Receives an entity URI as payload. - * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata. - * - payload [String]: Unique URI of the entity in wikidata + * Receives an entity URI as payload * Returns a JSON object with the extracted schema: * (see [[WikibaseOperationResult]]) */ - case req @ POST -> Root / `api` / `verb` / "extract" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(partsMap) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val queryOp = WikibaseSchemaExtract(opData, redirectClient) - queryOp.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response - } + POST / `api` / `verb` / "extract" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseSchemaExtract(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } // TODO: Needs exhaustive testing. Timeouts. /** Attempts to extract an schema (ShEx) from a given entity present in wikidata @@ -284,74 +187,35 @@ class WikibaseService(client: Client[IO]) * Returns a JSON object with the extracted schema: * (see [[WikibaseOperationResult]]) */ - case req @ POST -> Root / `api` / `verb` / "shexer" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - for { - // Get operation information sent by the user - operationDetails <- WikibaseOperationDetails(partsMap) - // Create response - response <- operationDetails.fold( - err => errorResponseJson(err, BadRequest), - opData => { - val queryOp = WikibaseSheXerExtract(opData, redirectClient) - queryOp.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - ) - } yield response - } + POST / `api` / `verb` / "shexer" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseSheXerExtract(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } // TODO: Needs exhaustive testing and client changes /** Validate entities in wikidata using a given schema. * Receives an entity URI as payload, as well as the parameters to create * the ShEx schema against which to validate. - * - endpoint [String]: Base URL of the target wikibase instance. Should - * be left empty so it defaults to Wikidata. - * - payload [String]: Unique URI of the entity in wikidata - * - schema [String]: Schema data (raw, URL containing the schema or File with the schema) - * - schemaSource [String]: Identifies the source of the schema (raw, URL, file...) - * - schemaEngine [String]: Format of the schema, should be ShEx if using wikidata schemas - * * Returns a JSON object with the validation results: * (see [[WikibaseOperationResult]] and * [[SchemaValidate.encodeSchemaValidateOperation]]) */ - case req @ POST -> Root / `api` / `verb` / "validate" => - req.decode[Multipart[IO]] { m => - val partsMap = PartsMap(m.parts) - for { - // Get operation information sent by the user - eitherDetails <- WikibaseOperationDetails(partsMap) - - // Get the validation schema sent by the user - eitherSchema <- Schema.mkSchema(partsMap) - - operationData: Either[String, (WikibaseOperationDetails, Schema)] = - for { - details <- eitherDetails - schema <- eitherSchema - } yield (details, schema) - - // Create response - response <- operationData.fold( - err => errorResponseJson(err, BadRequest), - { - case (details, schema) => { - val operation = WikibaseSchemaValidate(details, client, schema) - operation.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => - errorResponseJson(err.getMessage, InternalServerError) - ) - } - } - ) - } yield response - } + POST / `api` / `verb` / "validate" ^ jsonOf[ + IO, + WikibaseValidateInput + ] |>> { body: WikibaseValidateInput => + val op = + WikibaseSchemaValidate(body.operationDetails, client, body.schema) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + + } } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseOperationInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseOperationInput.scala new file mode 100644 index 00000000..478c6f2c --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseOperationInput.scala @@ -0,0 +1,28 @@ +package es.weso.rdfshape.server.api.routes.wikibase.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationDetails +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when asking the server + * for most wikibase operations + * + * @param operationDetails Information required to perform the operation + * on the Wikibase + */ +case class WikibaseOperationInput(operationDetails: WikibaseOperationDetails) + +object WikibaseOperationInput + extends ServiceRouteOperation[WikibaseOperationInput] { + override implicit val decoder: Decoder[WikibaseOperationInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeOperationDetails <- cursor + .as[Either[String, WikibaseOperationDetails]] + + } yield maybeOperationDetails.map(WikibaseOperationInput(_)) + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseValidateInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseValidateInput.scala new file mode 100644 index 00000000..fc7a4217 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/operations/WikibaseValidateInput.scala @@ -0,0 +1,46 @@ +package es.weso.rdfshape.server.api.routes.wikibase.service.operations + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationDetails +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.SchemaParameter +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when asking the server + * to validate Wikibase data + * + * @param operationDetails Information required to perform the operation + * on the Wikibase + * @param schema Schema used for validation + */ +case class WikibaseValidateInput( + operationDetails: WikibaseOperationDetails, + schema: Schema +) + +object WikibaseValidateInput + extends ServiceRouteOperation[WikibaseValidateInput] { + + override implicit val decoder: Decoder[WikibaseValidateInput] = + (cursor: HCursor) => { + val decodeResult = for { + maybeOperationDetails <- cursor + .as[Either[String, WikibaseOperationDetails]] + + maybeSchema <- cursor + .downField(SchemaParameter.name) + .as[Either[String, Schema]] + + maybeItems = for { + details <- maybeOperationDetails + schema <- maybeSchema + } yield (details, schema) + + } yield maybeItems.map { case (opDetails, schema) => + WikibaseValidateInput(opDetails, schema) + } + + mapEitherToDecodeResult(decodeResult) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala index f0286df0..7a8f0dac 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala @@ -20,7 +20,7 @@ object IncomingRequestParameters { lazy val schemaEngine = "schemaEngine" lazy val targetSchemaFormat = "schemaTargetFormat" lazy val targetSchemaEngine = "schemaTargetEngine" - lazy val dataInference = "dataInference" + lazy val inference = "inference" lazy val triggerMode = "triggerMode" lazy val shape = "shape" @@ -39,6 +39,13 @@ object IncomingRequestParameters { lazy val format = "format" + lazy val engine = "engine" + + lazy val `type` = "type" + + lazy val targetFormat = "targetFormat" + lazy val targetEngine = "targetEngine" + lazy val source = "source" lazy val dataSource = "dataSource" lazy val schemaSource = "schemaSource" @@ -82,6 +89,30 @@ object IncomingRequestParameters { val name: String = format } + /** Parameter expected to contain the target data format for a certain + * conversion operation + */ + object TargetFormatParameter + extends OptionalQueryParamDecoderMatcher[String](targetFormat) { + val name: String = targetFormat + } + + /** Parameter expected to contain the target schema engine for a certain + * conversion operation + */ + object TargetEngineParameter + extends OptionalQueryParamDecoderMatcher[String](targetEngine) { + val name: String = targetEngine + } + + /** Parameter expected to contain the engine of the schema inputted by the user for a certain + * operation + */ + object EngineParameter + extends OptionalQueryParamDecoderMatcher[String](engine) { + val name: String = engine + } + /** Parameter expected to contain RDF data contents (URL encoded) * * @note These contents may be raw data, a URL with the data or a File with the data. @@ -153,8 +184,8 @@ object IncomingRequestParameters { /** Parameter expected to contain the inference applied in data validations */ object InferenceParameter - extends OptionalQueryParamDecoderMatcher[String](dataInference) { - val name: String = dataInference + extends OptionalQueryParamDecoderMatcher[String](inference) { + val name: String = inference } /** Parameter expected to contain the trigger mode present applied in data validations @@ -333,6 +364,13 @@ object IncomingRequestParameters { val name: String = limit } + /** Flexible parameter expected to contain the type of a given item in a given operation + */ + object TypeParameter + extends OptionalQueryParamDecoderMatcher[String](`type`) { + val name: String = `type` + } + /** Parameter expected to contain a positive numeric value to serve as the offset where to continue a search operation, normally * in wikibase-related operations */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala index 760a4f68..b1672cba 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/codecs/package.scala @@ -1,7 +1,8 @@ package es.weso.rdfshape.server.implicits import cats.implicits.toBifunctorOps -import io.circe.{Decoder, Encoder, HCursor, Json} +import es.weso.rdf.nodes.IRI +import io.circe._ import org.http4s.Uri import java.net.URL @@ -25,4 +26,25 @@ package object codecs { } yield Try { new URL(urlStr) }.toEither.leftMap(_.getMessage) + + /** JSON decoder for [[URL]]. Returns an option since the URL may be malformed + * and thus None is decoded + */ + implicit val decodeUri: Decoder[Either[String, Uri]] = (cursor: HCursor) => { + for { + urlStr <- cursor.value.as[String] + maybeUri = Uri + .fromString(urlStr) + .leftMap(_.getMessage()) + } yield maybeUri + } + + /** JSON decoder for [[IRI]]. Returns an option since the URL may be malformed + * and thus None is decoded + */ + implicit val decodeIri: Decoder[Either[String, IRI]] = (cursor: HCursor) => { + for { + urlStr <- cursor.value.as[String] + } yield IRI.fromString(urlStr) + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala index 00c517dc..aad0cc62 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/query_parsers/package.scala @@ -1,7 +1,9 @@ package es.weso.rdfshape.server.implicits import cats.effect.IO +import cats.effect.unsafe.implicits.global import es.weso.rdfshape.server.utils.json.JsonUtils.errorResponseJson +import es.weso.schema.{Schemas, Schema => SchemaW} import org.http4s.Status._ import org.http4s.rho.bits.QueryParser.Params import org.http4s.rho.bits._ @@ -48,4 +50,30 @@ package object query_parsers { errorResponseJson(s"Missing query param: $name", BadRequest) ) } + + /** Parse the given URL parameter to an instance of [[SchemaW]] + * or return an error response + */ + implicit val schemaEngineQueryParser: QueryParser[IO, SchemaW] = + (name: String, params: Params, _: Option[SchemaW]) => + params.get(name) match { + case Some(Seq(value, _*)) if !value.isBlank => + Try { + Schemas.lookupSchema(value).unsafeRunSync() + } match { + case Failure(exception) => + FailureResponse.pure( + errorResponseJson( + exception.getMessage, + InternalServerError + ) + ) + case Success(schema) => SuccessResponse(schema) + } + + case _ => + FailureResponse.pure( + errorResponseJson(s"Missing query param: $name", BadRequest) + ) + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala new file mode 100644 index 00000000..137cb502 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala @@ -0,0 +1,44 @@ +package es.weso.rdfshape.server.implicits + +import cats.Monad +import cats.effect.IO +import cats.effect.unsafe.implicits.global +import es.weso.rdfshape.server.implicits.string_parsers.parsers.SchemaEngineParser +import es.weso.schema.{Schemas, Schema => SchemaW} +import org.http4s.rho.bits._ + +import scala.reflect.runtime.universe +import scala.util.{Failure, Success, Try} + +/** Custom string parsers used by Rho when parsing path parameters to complex data-types + * @see https://github.com/http4s/rho/blob/main/core/src/main/scala/org/http4s/rho/bits/StringParser.scala + */ +package object string_parsers { + + case object parsers { + + /** Parser capable of extracting a [[SchemaW]] from a URL path + * @tparam F Monad type used + */ + class SchemaEngineParser[F[_]] extends StringParser[F, SchemaW] { + override def parse(s: String)(implicit + F: Monad[F] + ): ResultResponse[F, SchemaW] = Try { + Schemas.lookupSchema(s).unsafeRunSync() + } match { + case Failure(exception) => + FailureResponse.pure[F](BadRequest.pure(exception.getMessage)) + case Success(schema) => SuccessResponse(schema) + } + + override def typeTag: Some[universe.TypeTag[SchemaW]] = Some( + implicitly[universe.TypeTag[SchemaW]] + ) + } + } + + case object instances { + implicit val schemaEngineParser: SchemaEngineParser[IO] = + new SchemaEngineParser[IO] + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala index ac934e05..b75d6995 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala @@ -18,12 +18,9 @@ package object other { def mapEitherToDecodeResult[L, R]( input: Either[DecodingFailure, Either[L, R]] ): Either[DecodingFailure, R] = { - input.fold( - _.asLeft, - { - case Left(err) => DecodingFailure(err.toString, Nil).asLeft - case Right(value) => value.asRight - } - ) + input.map { + case Left(err) => DecodingFailure(err.toString, Nil).asLeft + case Right(value) => value.asRight + }.flatten } } diff --git a/version.sbt b/version.sbt index 8c1e9baa..938ed413 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.1" +ThisBuild / version := "0.2.2" From d7d87c9b50a506e4ca5efd60ddb47088a02d07e0 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Wed, 2 Mar 2022 17:17:27 +0100 Subject: [PATCH 12/50] Using router to mount API routes behind prefix --- .../es/weso/rdfshape/server/Server.scala | 6 +- .../server/api/routes/ApiService.scala | 3 + .../api/routes/api/service/BaseService.scala | 3 +- .../api/routes/data/service/DataService.scala | 27 ++++---- .../endpoint/service/EndpointService.scala | 7 +-- .../routes/fetch/service/FetchService.scala | 3 +- .../permalink/service/PermalinkService.scala | 5 +- .../routes/schema/service/SchemaService.scala | 17 +++-- .../shapemap/service/ShapeMapService.scala | 5 +- .../wikibase/service/WikibaseService.scala | 17 +++-- .../rdfshape/server/api/swagger/package.scala | 62 ++++++++++--------- 11 files changed, 79 insertions(+), 76 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index c7555706..197c8987 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -3,6 +3,7 @@ package es.weso.rdfshape.server import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.Server._ +import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.api.service.BaseService import es.weso.rdfshape.server.api.routes.data.service.DataService import es.weso.rdfshape.server.api.routes.endpoint.service.EndpointService @@ -20,6 +21,7 @@ import org.http4s.blaze.client.BlazeClientBuilder import org.http4s.blaze.server.BlazeServerBuilder import org.http4s.client.Client import org.http4s.implicits.http4sKleisliResponseSyntaxOptionT +import org.http4s.server.Router import org.http4s.server.middleware.{CORS, CORSPolicy, Logger} import org.http4s.{HttpApp, HttpRoutes} @@ -126,9 +128,11 @@ private class Server( * * @param client Http4s' client in charge of the application * @return Http4s' application with the given client and a request-logging middleware + * @note All application services are mounted behind the "api/" prefix */ private def createApp(client: Client[IO]): HttpApp[IO] = { - val app = routesService(client).orNotFound + // Mount all routes behind "api/" + val app = Router(`api` -> routesService(client)).orNotFound // Http4s logger middleware settings Logger.httpApp(logHeaders = true, logBody = false)(app) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala index 9990defb..ec4c168a 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/ApiService.scala @@ -1,6 +1,9 @@ package es.weso.rdfshape.server.api.routes /** Simple interface all API services should comply with + * By convention, all services that are [[ApiService]]s are mounted behind + * the "/api" + * @see [[api]] */ trait ApiService { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala index 8bd4a62b..985d54ec 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala @@ -1,7 +1,6 @@ package es.weso.rdfshape.server.api.routes.api.service import cats.effect._ -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import org.http4s.client.Client import org.http4s.dsl.Http4sDsl @@ -18,7 +17,7 @@ class BaseService(client: Client[IO]) extends Http4sDsl[IO] with ApiService { /** Describe the API routes handled by this service and the actions performed on each of them */ val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - GET / `api` / "health" |>> { () => + GET / "health" |>> { () => Ok("Healthy") } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala index 70b96793..e6cbf60f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala @@ -3,10 +3,7 @@ package es.weso.rdfshape.server.api.routes.data.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefaults.defaultInferenceEngine -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.{ - api, - availableInferenceEngines -} +import es.weso.rdfshape.server.api.definitions.ApiDefinitions.availableInferenceEngines import es.weso.rdfshape.server.api.format.dataFormats._ import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.ShExC import es.weso.rdfshape.server.api.routes.ApiService @@ -50,7 +47,7 @@ class DataService(client: Client[IO]) /** Returns a JSON array with the accepted input RDF data formats */ - GET / `api` / `verb` / "formats" / "input" |>> { + GET / `verb` / "formats" / "input" |>> { val formats = RdfFormat.availableFormats ++ HtmlFormat.availableFormats val formatNames = formats.map(_.name) val json = Json.fromValues(formatNames.map(Json.fromString)) @@ -59,7 +56,7 @@ class DataService(client: Client[IO]) /** Returns a JSON array with the available output RDF data formats */ - GET / `api` / `verb` / "formats" / "output" |>> { + GET / `verb` / "formats" / "output" |>> { val formatNames = RdfFormat.availableFormats.filter(!_.equals(Mixed)).map(_.name) val json = Json.fromValues(formatNames.map(Json.fromString)) @@ -68,7 +65,7 @@ class DataService(client: Client[IO]) /** Returns a JSON array with the available visualization formats */ - GET / `api` / `verb` / "formats" / "visual" |>> { + GET / `verb` / "formats" / "visual" |>> { val formats = GraphicFormat.availableFormats.map(_.name) val json = Json.fromValues(formats.map(Json.fromString)) Ok(json) @@ -76,14 +73,14 @@ class DataService(client: Client[IO]) /** Returns the default RDF format as a raw string */ - GET / `api` / `verb` / "formats" / "default" |>> { + GET / `verb` / "formats" / "default" |>> { val dataFormat = DataFormat.default.name Ok(Json.fromString(dataFormat)) } /** Returns a JSON array with the available inference engines */ - GET / `api` / `verb` / "inferenceEngines" |>> { + GET / `verb` / "inferenceEngines" |>> { val inferenceEngines = availableInferenceEngines val json = Json.fromValues(inferenceEngines.map(e => Json.fromString(e.name))) @@ -92,13 +89,13 @@ class DataService(client: Client[IO]) /** Returns the default inference engine used as a raw string */ - GET / `api` / `verb` / "inferenceEngines" / "default" |>> { + GET / `verb` / "inferenceEngines" / "default" |>> { Ok(Json.fromString(defaultInferenceEngine.name)) } /** Returns a JSON array with the valid data sources that the server will accept when sent via [[DataSourceParameter]] */ - GET / `api` / `verb` / "sources" |>> { + GET / `verb` / "sources" |>> { val json = Json.arr( Json.fromString(DataSource.TEXT), Json.fromString(DataSource.URL), @@ -111,7 +108,7 @@ class DataService(client: Client[IO]) * Receives a JSON object with the input RDF information * Returns a JSON object with the operation results. See [[DataInfo.encodeDataInfoOperation]] */ - POST / `api` / `verb` / "info" ^ jsonOf[IO, DataInfoInput] |>> { + POST / `verb` / "info" ^ jsonOf[IO, DataInfoInput] |>> { body: DataInfoInput => DataInfo .dataInfo(body.data) @@ -133,7 +130,7 @@ class DataService(client: Client[IO]) * since these are just conversions to JSON, DOT, etc. later * interpreted by the web client */ - POST / `api` / `verb` / "convert" ^ jsonOf[IO, DataConvertInput] |>> { + POST / `verb` / "convert" ^ jsonOf[IO, DataConvertInput] |>> { body: DataConvertInput => DataConvert .dataConvert(body.data, body.targetFormat) @@ -151,7 +148,7 @@ class DataService(client: Client[IO]) * Receives a JSON object with the input RDF and query information * Returns a JSON object with the query inputs and results (see [[DataQuery.encodeDataQueryOperation]]). */ - POST / `api` / `verb` / "query" ^ jsonOf[IO, DataQueryInput] |>> { + POST / `verb` / "query" ^ jsonOf[IO, DataQueryInput] |>> { body: DataQueryInput => DataQuery .dataQuery(body.data, body.query) @@ -163,7 +160,7 @@ class DataService(client: Client[IO]) * Receives a JSON object with the input RDF information * Returns a JSON object with the extraction information (see [[DataExtract.encodeDataExtractOperation]] */ - POST / `api` / `verb` / "extract" ^ jsonOf[IO, DataExtractInput] |>> { + POST / `verb` / "extract" ^ jsonOf[IO, DataExtractInput] |>> { body: DataExtractInput => DataExtract .dataExtract( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala index 5f070601..f341bc34 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala @@ -2,7 +2,6 @@ package es.weso.rdfshape.server.api.routes.endpoint.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.{getEndpointAsRDFReader, getEndpointInfo} import es.weso.rdfshape.server.api.routes.endpoint.logic.Outgoing._ @@ -40,7 +39,7 @@ class EndpointService(client: Client[IO]) * - query [String]: User query with content and source * Returns a JSON object with the results (see [[Endpoint.encoder]]). */ - POST / `api` / `verb` / "info" ^ jsonOf[ + POST / `verb` / "info" ^ jsonOf[ IO, EndpointOutgoingInput ] |>> { (body: EndpointOutgoingInput) => @@ -72,7 +71,7 @@ class EndpointService(client: Client[IO]) */ /** */ - GET / `api` / `verb` / "info" +? + GET / `verb` / "info" +? param[URL](EndpointParameter.name) |>> { (endpointUrl: URL) => Ok(getEndpointInfo(endpointUrl).asJson) } @@ -81,7 +80,7 @@ class EndpointService(client: Client[IO]) * Receives a JSON object with the input endpoint, node and limits * Returns a JSON object with the endpoint response (see [[Outgoing.encode]]) */ - GET / `api` / `verb` / "outgoing" +? + GET / `verb` / "outgoing" +? param[URL](EndpointParameter.name) & param[String](NodeParameter.name) & param[Option[Int]](LimitParameter.name) |>> { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala index b5d6ed27..de0df21b 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala @@ -2,7 +2,6 @@ package es.weso.rdfshape.server.api.routes.fetch.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.UrlParameter import es.weso.rdfshape.server.implicits.query_parsers.urlQueryParser @@ -26,7 +25,7 @@ class FetchService() extends Http4sDsl[IO] with ApiService with LazyLogging { * - url [String]: URL to be queried * Returns the URL contents (response body) */ - GET / `api` / `verb` +? param[URL](UrlParameter.name) |>> { (url: URL) => + GET / `verb` +? param[URL](UrlParameter.name) |>> { (url: URL) => getUrlContents(url) match { case Left(err) => InternalServerError(err) case Right(content) => Ok(content) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala index 7f2ac4b1..6d1a80d6 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala @@ -2,7 +2,6 @@ package es.weso.rdfshape.server.api.routes.permalink.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import es.weso.rdfshape.server.api.routes.permalink.logic.Permalink import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ @@ -70,7 +69,7 @@ class PermalinkService(client: Client[IO]) * * @note QueryParser already checks for the validity of the URL */ - GET / `api` / `verb` / "generate" +? param[URL](UrlParameter.name) |>> { + GET / `verb` / "generate" +? param[URL](UrlParameter.name) |>> { (urlObj: URL) => // Extract the relevant info from the URL val urlPath = extractUrlPathAndQuery(urlObj) @@ -103,7 +102,7 @@ class PermalinkService(client: Client[IO]) * - urlCode [Long]: code to be checked * Returns the permalink target (if present in the database) in the response body */ - GET / `api` / `verb` / "get" +? param[Long](UrlCodeParameter.name) |>> { + GET / `verb` / "get" +? param[Long](UrlCodeParameter.name) |>> { urlCode: Long => // Fetch document in database for { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 77eb8b78..01f51f77 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -3,7 +3,6 @@ package es.weso.rdfshape.server.api.routes.schema.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.{ ShExFormat, ShaclFormat @@ -58,7 +57,7 @@ class SchemaService(client: Client[IO]) /** Returns a JSON array with the accepted schema engines a given schema type (ShEx or Shacl) */ - GET / `api` / `verb` / "engines" / pathVar[String] |>> { `type`: String => + GET / `verb` / "engines" / pathVar[String] |>> { `type`: String => val engines = `type`.toLowerCase match { case "shex" => List(Schemas.shEx) case "shacl" => @@ -72,14 +71,14 @@ class SchemaService(client: Client[IO]) /** Returns the default schema engine as a raw string */ - GET / `api` / `verb` / "engines" / "default" |>> { + GET / `verb` / "engines" / "default" |>> { val json = Json.fromString(Schemas.defaultSchema.name) Ok(json) } /** Returns the default schema format for a given engine as a raw string */ - GET / `api` / `verb` / "formats" / "default" / pathVar[SchemaW] |>> { + GET / `verb` / "formats" / "default" / pathVar[SchemaW] |>> { engine: SchemaW => val defaultFormat = engine match { case ShExSchema(_) => ShExFormat.default @@ -94,7 +93,7 @@ class SchemaService(client: Client[IO]) * Accepts an optional query parameter specifying the schema engine: * - schemaEngine [String]: schema engine for which we are listing the formats */ - GET / `api` / `verb` / "formats" / pathVar[SchemaW] |>> { engine: SchemaW => + GET / `verb` / "formats" / pathVar[SchemaW] |>> { engine: SchemaW => val formats = engine match { case ShExSchema(_) => ShExFormat.availableFormats case JenaShacl(_) | ShaclTQ(_) | ShaclexSchema(_) => @@ -106,7 +105,7 @@ class SchemaService(client: Client[IO]) /** Returns a JSON array with the accepted Trigger Modes */ - GET / `api` / `verb` / "triggerModes" |>> { + GET / `verb` / "triggerModes" |>> { val json = Json.fromValues( ApiDefinitions.availableTriggerModes.map( Json.fromString @@ -120,7 +119,7 @@ class SchemaService(client: Client[IO]) * Returns a JSON object with the operation results. See * [[SchemaInfo.encodeSchemaInfoOperation]]. */ - POST / `api` / `verb` / "info" ^ jsonOf[IO, SchemaInfoInput] |>> { + POST / `verb` / "info" ^ jsonOf[IO, SchemaInfoInput] |>> { body: SchemaInfoInput => SchemaInfo .schemaInfo(body.schema) @@ -135,7 +134,7 @@ class SchemaService(client: Client[IO]) * Returns a JSON object with the operation results. See * [[SchemaConvert.encodeSchemaConvertOperation]]. */ - POST / `api` / `verb` / "convert" ^ jsonOf[IO, SchemaConvertInput] |>> { + POST / `verb` / "convert" ^ jsonOf[IO, SchemaConvertInput] |>> { body: SchemaConvertInput => SchemaConvert .schemaConvert( @@ -156,7 +155,7 @@ class SchemaService(client: Client[IO]) * if the [[TriggerMode]] is shapeMap, the corresponding [[ShapeMap]] * object will be embedded in the resulting [[TriggerShapeMap]] */ - POST / `api` / `verb` / "validate" ^ jsonOf[IO, SchemaValidateInput] |>> { + POST / `verb` / "validate" ^ jsonOf[IO, SchemaValidateInput] |>> { body: SchemaValidateInput => SchemaValidate .schemaValidate(body.data, body.schema, body.triggerMode) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala index 3723d614..e5d54f26 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala @@ -3,7 +3,6 @@ package es.weso.rdfshape.server.api.routes.shapemap.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import es.weso.rdfshape.server.api.routes.shapemap.logic.operations.ShapeMapInfo import es.weso.rdfshape.server.api.routes.shapemap.service.operations.ShapeMapInfoInput @@ -31,7 +30,7 @@ class ShapeMapService(client: Client[IO]) /** Returns a JSON array with the accepted shapeMap formats. */ - GET / `api` / `verb` / "formats" |>> { + GET / `verb` / "formats" |>> { val formats = ApiDefinitions.availableShapeMapFormats val json = Json.fromValues(formats.map(f => Json.fromString(f.name))) Ok(json) @@ -40,7 +39,7 @@ class ShapeMapService(client: Client[IO]) /** Obtain information about a shapeMap. * Returns a JSON object with the query inputs and results (see [[ShapeMapInfo.encodeShapeMapInfoOperation]]). */ - POST / `api` / `verb` / "info" ^ jsonOf[IO, ShapeMapInfoInput] |>> { + POST / `verb` / "info" ^ jsonOf[IO, ShapeMapInfoInput] |>> { body: ShapeMapInfoInput => ShapeMapInfo .shapeMapInfo(body.shapeMap) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala index 0f55a48f..2e279de3 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala @@ -2,7 +2,6 @@ package es.weso.rdfshape.server.api.routes.wikibase.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.routes.ApiService import es.weso.rdfshape.server.api.routes.schema.logic.operations.SchemaValidate import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationResult @@ -64,7 +63,7 @@ class WikibaseService(client: Client[IO]) * codes separated by "|" * Returns a JSON object with the results. See [[WikibaseOperationResult]] */ - POST / `api` / `verb` / "entityLabel" ^ jsonOf[ + POST / `verb` / "entityLabel" ^ jsonOf[ IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => @@ -80,7 +79,7 @@ class WikibaseService(client: Client[IO]) * - payload [String]: Schema identifier in the wikibase instance * Returns a JSON object with the results. See [[WikibaseOperationResult]] */ - POST / `api` / `verb` / "schemaContent" ^ jsonOf[ + POST / `verb` / "schemaContent" ^ jsonOf[ IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => @@ -101,7 +100,7 @@ class WikibaseService(client: Client[IO]) * * @note see https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities */ - POST / `api` / `verb` / "search" / pathVar[WikibaseSearchTypes] ^ jsonOf[ + POST / `verb` / "search" / pathVar[WikibaseSearchTypes] ^ jsonOf[ IO, WikibaseOperationInput ] |>> { (searchType: String, body: WikibaseOperationInput) => @@ -133,7 +132,7 @@ class WikibaseService(client: Client[IO]) * Returns a JSON object with the array of languages supported. * See [[WikibaseOperationResult]] */ - POST / `api` / `verb` / "languages" ^ jsonOf[ + POST / `verb` / "languages" ^ jsonOf[ IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => @@ -152,7 +151,7 @@ class WikibaseService(client: Client[IO]) * * Query examples in [[https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples]] */ - POST / `api` / `verb` / "query" ^ jsonOf[ + POST / `verb` / "query" ^ jsonOf[ IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => @@ -167,7 +166,7 @@ class WikibaseService(client: Client[IO]) * Returns a JSON object with the extracted schema: * (see [[WikibaseOperationResult]]) */ - POST / `api` / `verb` / "extract" ^ jsonOf[ + POST / `verb` / "extract" ^ jsonOf[ IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => @@ -187,7 +186,7 @@ class WikibaseService(client: Client[IO]) * Returns a JSON object with the extracted schema: * (see [[WikibaseOperationResult]]) */ - POST / `api` / `verb` / "shexer" ^ jsonOf[ + POST / `verb` / "shexer" ^ jsonOf[ IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => @@ -205,7 +204,7 @@ class WikibaseService(client: Client[IO]) * (see [[WikibaseOperationResult]] and * [[SchemaValidate.encodeSchemaValidateOperation]]) */ - POST / `api` / `verb` / "validate" ^ jsonOf[ + POST / `verb` / "validate" ^ jsonOf[ IO, WikibaseValidateInput ] |>> { body: WikibaseValidateInput => diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala index 36fcca7a..04d12026 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -2,6 +2,7 @@ package es.weso.rdfshape.server.api import cats.effect.IO import cats.implicits.catsSyntaxOptionId +import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api import es.weso.rdfshape.server.api.format.dataFormats.ShapeMapFormat import es.weso.rdfshape.server.api.routes.endpoint.logic.query.{ SparqlQuery, @@ -47,36 +48,12 @@ package object swagger { lazy val swaggerMiddleware: RhoMiddleware[IO] = ioSwagger.createRhoMiddleware( swaggerFormats = allSwaggerFormats, - swaggerMetadata = SwaggerMetadata( - apiInfo = Info( - title = "RDFShape API", - version = - buildinfo.BuildInfo.version, // programmatically get project version - description = - ("RDFShape is web API for semantic data analysis and validation" + - "implemented in Scala using http4s (https://http4s.org/)").some, - contact = Contact( - name = "WESO Research group", - email = "info@weso.es".some, - url = "https://www.weso.es/#contact".some - ).some, - license = License( - name = "Apache 2.0", - url = "https://www.apache.org/licenses/LICENSE-2.0.html" - ).some - ), - host = "api.rdfshape.weso.es".some, - basePath = None, - schemes = List(Scheme.HTTP, Scheme.HTTPS), - consumes = List("multipart/form-data"), - produces = List("text/plain; charset=utf-8", "application/json"), - tags = List(Tag(name = "api", description = "RDFShape REST API".some)) - ) + swaggerMetadata = baseSwaggerMetadata ) /** Merge of both object and field serializer sets as SwaggerFormats */ - lazy val allSwaggerFormats: SwaggerFormats = { + private lazy val allSwaggerFormats: SwaggerFormats = { // Add all object models val objectSerializers = customSwaggerSerializers.foldLeft( DefaultSwaggerFormats @@ -97,16 +74,45 @@ package object swagger { ) } + /** Metadata object with the API properties to be displayed in Swagger + */ + val baseSwaggerMetadata: SwaggerMetadata = SwaggerMetadata( + apiInfo = Info( + title = "RDFShape API", + version = + buildinfo.BuildInfo.version, // programmatically get project version + description = s""" + | RDFShape is web API for semantic data analysis and validation + | implemented in Scala using http4s (https://http4s.org/) and + | documented with Rho (https://github.com/http4s/rho) + |""".stripMargin.some, + contact = Contact( + name = "WESO Research group", + email = "info@weso.es".some, + url = "https://www.weso.es/#contact".some + ).some, + license = License( + name = "Apache 2.0", + url = "https://www.apache.org/licenses/LICENSE-2.0.html" + ).some + ), + host = "api.rdfshape.weso.es".some, + basePath = s"/$api".some, // All routes are prefixed by "/api" + schemes = List(Scheme.HTTPS), + consumes = List("application/json"), + produces = List("text/plain; charset=utf-8", "application/json") + ) + /** Set of all swagger object serializers defined in [[SwaggerModels]] */ - val customSwaggerSerializers = Set( + private val customSwaggerSerializers = Set( (typeOf[ShapeMap], shapeMap), (typeOf[SparqlQuery], sparqlQuery) ) /** Set of all swagger field serializers defined in [[SwaggerModelProperties]] */ - val customSwaggerFieldSerializers = Set( + private val customSwaggerFieldSerializers = Set( (typeOf[URL], url) ) From a49531ff4f08c49a6820c094019e0cf1fb3d3916 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Wed, 2 Mar 2022 21:40:20 +0100 Subject: [PATCH 13/50] Created final Swagger model for complex classes --- .../api/routes/api/service/BaseService.scala | 8 +- .../api/routes/data/logic/types/Data.scala | 29 +- .../routes/data/logic/types/DataSingle.scala | 49 +-- .../logic/types/merged/DataCompound.scala | 22 +- .../api/routes/data/service/DataService.scala | 240 +++++------ .../endpoint/logic/query/SparqlQuery.scala | 51 --- .../endpoint/service/EndpointService.scala | 58 +-- .../routes/fetch/service/FetchService.scala | 18 +- .../permalink/service/PermalinkService.scala | 75 ++-- .../schema/logic/trigger/TriggerMode.scala | 50 +-- .../logic/trigger/TriggerShapeMap.scala | 63 +-- .../trigger/TriggerTargetDeclarations.scala | 14 - .../routes/schema/logic/types/Schema.scala | 19 - .../schema/logic/types/SchemaSimple.scala | 39 -- .../routes/schema/service/SchemaService.scala | 213 +++++----- .../api/routes/shapemap/logic/ShapeMap.scala | 41 -- .../shapemap/service/ShapeMapService.scala | 34 +- .../operations/WikibaseOperationDetails.scala | 145 +------ .../operations/WikibaseOperationFormats.scala | 6 +- .../wikibase/service/WikibaseService.scala | 275 ++++++------- .../rdfshape/server/api/swagger/package.scala | 380 +++++++++++++++--- .../IncomingRequestParameters.scala | 11 +- .../implicits/string_parsers/package.scala | 3 +- .../rdfshape/server/utils/other/package.scala | 3 +- 24 files changed, 773 insertions(+), 1073 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala index 985d54ec..727780db 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/api/service/BaseService.scala @@ -5,6 +5,7 @@ import es.weso.rdfshape.server.api.routes.ApiService import org.http4s.client.Client import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ /** API service to handle multiple general tasks (server status, etc.) * @@ -17,9 +18,10 @@ class BaseService(client: Client[IO]) extends Http4sDsl[IO] with ApiService { /** Describe the API routes handled by this service and the actions performed on each of them */ val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - GET / "health" |>> { () => - Ok("Healthy") - } + "Perform a request to check if the API is up and running" ** + GET / "health" |>> { () => + Ok("Healthy") + } } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala index 8d926bb6..bf60739c 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/Data.scala @@ -8,11 +8,7 @@ import es.weso.rdf.{PrefixMap, RDFReasoner} import es.weso.rdfshape.server.api.format.dataFormats.DataFormat import es.weso.rdfshape.server.api.routes.data.logic.DataSource._ import es.weso.rdfshape.server.api.routes.data.logic.types.merged.DataCompound -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ - CompoundDataParameter, - SourceParameter -} -import es.weso.rdfshape.server.api.utils.parameters.PartsMap +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.SourceParameter import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} /** Common trait to all data, whichever its nature (single, compound, endpoint...) @@ -94,22 +90,6 @@ object Data extends DataCompanion[Data] { case _ => DecodingFailure(s"Invalid data source '$source'", Nil).asLeft } } yield decoded - - /** General implementation delegating on subclasses - */ - override def mkData(partsMap: PartsMap): IO[Either[String, Data]] = for { - // 1. Make some checks on the parameters to distinguish between Data types - compoundData <- partsMap.optPartValue(CompoundDataParameter.name) - - // 2. Delegate on the correct sub-class for creating the Data - maybeData <- { - // 1. Compound data - if(compoundData.isDefined) DataCompound.mkData(partsMap) - // 2. Simple data or unknown - else DataSingle.mkData(partsMap) - } - - } yield maybeData } /** Static utilities to be used with [[Data]] representations @@ -125,11 +105,4 @@ private[data] trait DataCompanion[D <: Data] extends LazyLogging { /** Decoder used to extract [[Data]] instances from JSON values */ implicit val decode: Decoder[Either[String, D]] - - /** Given a request's parameters, try to extract an instance of [[Data]] (type [[D]]) from them - * - * @param partsMap Request's parameters - * @return Either the [[Data]] instance or an error message - */ - def mkData(partsMap: PartsMap): IO[Either[String, D]] } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala index a16c0020..5431cc6a 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/DataSingle.scala @@ -6,13 +6,11 @@ import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.jena._ import es.weso.rdf.nodes.IRI import es.weso.rdf.{InferenceEngine, NONE} -import es.weso.rdfshape.server.api.definitions.ApiDefaults import es.weso.rdfshape.server.api.format.dataFormats.{DataFormat, RdfFormat} import es.weso.rdfshape.server.api.routes.data.logic.DataSource import es.weso.rdfshape.server.api.routes.data.logic.DataSource.DataSource import es.weso.rdfshape.server.api.routes.data.logic.aux.InferenceCodecs._ import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.html2rdf.HtmlToRdf import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import io.circe._ @@ -134,10 +132,11 @@ private[api] object DataSingle .downField(FormatParameter.name) .as[Either[String, RdfFormat]] + // If missing, use none inference <- cursor .downField(InferenceParameter.name) - .as[InferenceEngine] + .as[Option[InferenceEngine]] source <- cursor .downField(SourceParameter.name) @@ -152,53 +151,11 @@ private[api] object DataSingle for { format <- maybeFormat data <- Try { - DataSingle(content, format, inference, source) + DataSingle(content, format, inference.getOrElse(NONE), source) }.toEither.leftMap(err => s"Could not build the schema from user data:\n ${err.getMessage}" ) } yield data } } - - override def mkData(partsMap: PartsMap): IO[Either[String, DataSingle]] = - for { - // Data param as sent by client - paramData <- partsMap - .optPartValue(DataParameter.name) - .map(_.getOrElse("")) - paramFormat <- DataFormat.fromRequestParams( - DataFormatParameter.name, - partsMap - ) - - paramInference <- partsMap.optPartValue(InferenceParameter.name) - - paramDataSource <- partsMap.optPartValue(DataSourceParameter.name) - - // Confirm final format and inference - inference = getInference(paramInference).getOrElse(NONE) - format = paramFormat.getOrElse(ApiDefaults.defaultDataFormat) - - // Check the client's selected source - dataSource = paramDataSource.getOrElse(DataSource.default) - _ = logger.debug(s"RDF Data received - Source: $dataSource") - - // Create the data instance - data = DataSingle( - content = paramData, - format = format, - inference = inference, - source = dataSource - ) - - } yield data.fetchedContents.map(_ => data) - - /** @param inferenceStr String representing the inference value - * @return Optionally, the inference contained in a given data string - */ - private def getInference( - inferenceStr: Option[String] - ): Option[InferenceEngine] = { - inferenceStr.flatMap(InferenceEngine.fromString(_).toOption) - } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala index c891372a..f48e0e4d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/types/merged/DataCompound.scala @@ -14,11 +14,7 @@ import es.weso.rdfshape.server.api.routes.data.logic.types.{ DataCompanion, DataSingle } -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ - CompoundDataParameter, - ContentParameter -} -import es.weso.rdfshape.server.api.utils.parameters.PartsMap +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.ContentParameter import io.circe._ import io.circe.parser._ import io.circe.syntax._ @@ -90,22 +86,6 @@ private[api] object DataCompound extends DataCompanion[DataCompound] with LazyLogging { - override def mkData(partsMap: PartsMap): IO[Either[String, DataCompound]] = { - for { - // Parse params - compoundData <- partsMap.optPartValue(CompoundDataParameter.name) - // Try to create data - maybeData: Either[String, DataCompound] = - if(compoundData.isDefined) { - DataCompound - .fromJsonString(compoundData.get) - .leftMap(err => s"Could not read compound data.\n $err") - } else Left("No compound data provided") - /* Check if the created data is empty, then an error occurred when merging - * the elements */ - } yield maybeData.flatMap(_.fetchedContents.flatMap(_ => maybeData)) - } - /** Encoder used to transform CompoundData instances to JSON values */ override implicit val encode: Encoder[DataCompound] = diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala index e6cbf60f..f7e6a818 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/service/DataService.scala @@ -28,6 +28,7 @@ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ /** API Service to handle RDF data * @@ -45,135 +46,114 @@ class DataService(client: Client[IO]) */ val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Returns a JSON array with the accepted input RDF data formats - */ - GET / `verb` / "formats" / "input" |>> { - val formats = RdfFormat.availableFormats ++ HtmlFormat.availableFormats - val formatNames = formats.map(_.name) - val json = Json.fromValues(formatNames.map(Json.fromString)) - Ok(json) - } - - /** Returns a JSON array with the available output RDF data formats - */ - GET / `verb` / "formats" / "output" |>> { - val formatNames = - RdfFormat.availableFormats.filter(!_.equals(Mixed)).map(_.name) - val json = Json.fromValues(formatNames.map(Json.fromString)) - Ok(json) - } - - /** Returns a JSON array with the available visualization formats - */ - GET / `verb` / "formats" / "visual" |>> { - val formats = GraphicFormat.availableFormats.map(_.name) - val json = Json.fromValues(formats.map(Json.fromString)) - Ok(json) - } - - /** Returns the default RDF format as a raw string - */ - GET / `verb` / "formats" / "default" |>> { - val dataFormat = DataFormat.default.name - Ok(Json.fromString(dataFormat)) - } - - /** Returns a JSON array with the available inference engines - */ - GET / `verb` / "inferenceEngines" |>> { - val inferenceEngines = availableInferenceEngines - val json = - Json.fromValues(inferenceEngines.map(e => Json.fromString(e.name))) - Ok(json) - } - - /** Returns the default inference engine used as a raw string - */ - GET / `verb` / "inferenceEngines" / "default" |>> { - Ok(Json.fromString(defaultInferenceEngine.name)) - } - - /** Returns a JSON array with the valid data sources that the server will accept when sent via [[DataSourceParameter]] - */ - GET / `verb` / "sources" |>> { - val json = Json.arr( - Json.fromString(DataSource.TEXT), - Json.fromString(DataSource.URL), - Json.fromString(DataSource.FILE) - ) - Ok(json) - } - - /** Obtain information about an RDF source. - * Receives a JSON object with the input RDF information - * Returns a JSON object with the operation results. See [[DataInfo.encodeDataInfoOperation]] - */ - POST / `verb` / "info" ^ jsonOf[IO, DataInfoInput] |>> { - body: DataInfoInput => - DataInfo - .dataInfo(body.data) - .flatMap(info => Ok(info.asJson)) - .handleErrorWith(err => { - // Legacy code may return exceptions with "null" messages - val errorMessage = - if(err.getMessage != null) err.getMessage - else DataServiceError.couldNotParseData - InternalServerError(errorMessage) - }) - } - - /** Convert an RDF source into another format/syntax. - * Receives a JSON object with the input RDF information: - * Returns a JSON object with the operation results. See [[DataConvert.encodeDataConversionOperation]]. - * - * @note The "convert" endpoint is invoked for data visualizations too, - * since these are just conversions to JSON, DOT, etc. later - * interpreted by the web client - */ - POST / `verb` / "convert" ^ jsonOf[IO, DataConvertInput] |>> { - body: DataConvertInput => - DataConvert - .dataConvert(body.data, body.targetFormat) - .flatMap(conversion => Ok(conversion.asJson)) - .handleErrorWith(err => { - // Legacy code may return exceptions with "null" messages - val errorMessage = - if(err.getMessage != null) err.getMessage - else DataServiceError.couldNotParseData - InternalServerError(errorMessage) - }) - } - - /** Perform a SPARQL query on RDF data. - * Receives a JSON object with the input RDF and query information - * Returns a JSON object with the query inputs and results (see [[DataQuery.encodeDataQueryOperation]]). - */ - POST / `verb` / "query" ^ jsonOf[IO, DataQueryInput] |>> { - body: DataQueryInput => - DataQuery - .dataQuery(body.data, body.query) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - /** Attempt to extract a schema from an RDF source. - * Receives a JSON object with the input RDF information - * Returns a JSON object with the extraction information (see [[DataExtract.encodeDataExtractOperation]] - */ - POST / `verb` / "extract" ^ jsonOf[IO, DataExtractInput] |>> { - body: DataExtractInput => - DataExtract - .dataExtract( - body.data, - body.nodeSelector, - Option(ShExSchema.empty), - Option(ShExC), - body.label, - relativeBase = None - ) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } + "Get an array with the accepted input RDF data formats" ** + GET / `verb` / "formats" / "input" |>> { + val formats = RdfFormat.availableFormats ++ HtmlFormat.availableFormats + val formatNames = formats.map(_.name) + val json = Json.fromValues(formatNames.map(Json.fromString)) + Ok(json) + } + + "Get an array with the available output RDF data formats" ** + GET / `verb` / "formats" / "output" |>> { + val formatNames = + RdfFormat.availableFormats.filter(!_.equals(Mixed)).map(_.name) + val json = Json.fromValues(formatNames.map(Json.fromString)) + Ok(json) + } + + "Get an array with the available visualization formats" ** + GET / `verb` / "formats" / "visual" |>> { + val formats = GraphicFormat.availableFormats.map(_.name) + val json = Json.fromValues(formats.map(Json.fromString)) + Ok(json) + } + + "Get the default RDF format as raw text" ** + GET / `verb` / "formats" / "default" |>> { + Ok(DataFormat.default.name) + } + + "Get an array with the available inference engines" ** + GET / `verb` / "inferenceEngines" |>> { + val inferenceEngines = availableInferenceEngines + val json = + Json.fromValues(inferenceEngines.map(e => Json.fromString(e.name))) + Ok(json) + } + + "Get the default inference engine used as raw text" ** + GET / `verb` / "inferenceEngines" / "default" |>> { + Ok(defaultInferenceEngine.name) + } + + s"""Get an array with the valid data sources that the server will + | accept when sent via '${SourceParameter.name}' parameter""".stripMargin ** + GET / `verb` / "sources" |>> { + val json = Json.arr( + Json.fromString(DataSource.TEXT), + Json.fromString(DataSource.URL), + Json.fromString(DataSource.FILE) + ) + Ok(json) + } + + s"""Obtain information about an RDF data instance: + | number of statements, prefix map and predicates + |""".stripMargin ** + POST / `verb` / "info" ^ jsonOf[IO, DataInfoInput] |>> { + body: DataInfoInput => + DataInfo + .dataInfo(body.data) + .flatMap(info => Ok(info.asJson)) + .handleErrorWith(err => { + // Legacy code may return exceptions with "null" messages + val errorMessage = + if(err.getMessage != null) err.getMessage + else DataServiceError.couldNotParseData + InternalServerError(errorMessage) + }) + } + + "Convert RDF data into another formats" ** + POST / `verb` / "convert" ^ jsonOf[IO, DataConvertInput] |>> { + body: DataConvertInput => + DataConvert + .dataConvert(body.data, body.targetFormat) + .flatMap(conversion => Ok(conversion.asJson)) + .handleErrorWith(err => { + // Legacy code may return exceptions with "null" messages + val errorMessage = + if(err.getMessage != null) err.getMessage + else DataServiceError.couldNotParseData + InternalServerError(errorMessage) + }) + } + + "Perform a SPARQL query on RDF data" ** + POST / `verb` / "query" ^ jsonOf[IO, DataQueryInput] |>> { + body: DataQueryInput => + DataQuery + .dataQuery(body.data, body.query) + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } + + "Attempt to extract a ShEx schema from an RDF source" ** + POST / `verb` / "extract" ^ jsonOf[IO, DataExtractInput] |>> { + body: DataExtractInput => + DataExtract + .dataExtract( + body.data, + body.nodeSelector, + Option(ShExSchema.empty), + Option(ShExC), + body.label, + relativeBase = None + ) + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } } } @@ -189,6 +169,8 @@ object DataService { new DataService(client) } +/** Compendium of additional text constants used on service errors + */ private object DataServiceError extends Enumeration { type DataServiceError = String val couldNotParseData: DataServiceError = diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala index 086eaf1e..5acfbf84 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/logic/query/SparqlQuery.scala @@ -1,16 +1,12 @@ package es.weso.rdfshape.server.api.routes.endpoint.logic.query -import cats.effect.IO import cats.implicits.toBifunctorOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.endpoint.logic.query.SparqlQuerySource.SparqlQuerySource import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ ContentParameter, - QueryParameter, - QuerySourceParameter, SourceParameter } -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import io.circe._ import io.circe.syntax.EncoderOps @@ -99,51 +95,4 @@ private[api] object SparqlQuery extends LazyLogging { ) } } - - /** Given a request's parameters, try to extract a SPARQL query from them - * - * @param partsMap Request's parameters - * @return Either the SPARQL query or an error message - */ - def mkSparqlQuery( - partsMap: PartsMap - ): IO[Either[String, SparqlQuery]] = - for { - paramQuery <- partsMap.optPartValue(QueryParameter.name) - activeQueryTab <- partsMap.optPartValue(QuerySourceParameter.name) - - _ = logger.debug( - s"Getting SPARQL from params. Query tab: $activeQueryTab" - ) - - maybeQuery <- mkSparqlQuery( - paramQuery, - activeQueryTab - ) - - } yield maybeQuery - - /** Create a SparqlQuery instance, given its source and data - * - * @param queryStr Optionally, the contents of the query not processed by their source - * @param activeQuerySource Optionally, the indicator of the query source (raw, url or file) - * @return - */ - private def mkSparqlQuery( - queryStr: Option[String], - activeQuerySource: Option[SparqlQuerySource] - ): IO[Either[String, SparqlQuery]] = - for { - query <- IO { - SparqlQuery( - content = queryStr.getOrElse(""), - source = activeQuerySource.getOrElse(SparqlQuerySource.default) - ) - } - } yield query.fetchedContents.fold( - // If the query text built is blank, an error occurred - err => Left(err), - _ => Right(query) - ) - } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala index f341bc34..9685ecad 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/endpoint/service/EndpointService.scala @@ -3,18 +3,16 @@ package es.weso.rdfshape.server.api.routes.endpoint.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.ApiService -import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.{getEndpointAsRDFReader, getEndpointInfo} +import es.weso.rdfshape.server.api.routes.endpoint.logic.Endpoint.getEndpointInfo import es.weso.rdfshape.server.api.routes.endpoint.logic.Outgoing._ -import es.weso.rdfshape.server.api.routes.endpoint.logic.{Endpoint, Outgoing} -import es.weso.rdfshape.server.api.routes.endpoint.service.operations.EndpointOutgoingInput import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ import es.weso.rdfshape.server.implicits.query_parsers.urlQueryParser -import es.weso.utils.IOUtils.io2es import io.circe.syntax.EncoderOps import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl._ import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ import java.net.URL @@ -33,54 +31,14 @@ class EndpointService(client: Client[IO]) */ def routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Check the existence of an endpoint and get its response, if any - * Receives a JSON object with the input endpoint: - * - endpoint [URL]: Target endpoint - * - query [String]: User query with content and source - * Returns a JSON object with the results (see [[Endpoint.encoder]]). - */ - POST / `verb` / "info" ^ jsonOf[ - IO, - EndpointOutgoingInput - ] |>> { (body: EndpointOutgoingInput) => - body match { - case EndpointOutgoingInput(endpointUrl, queryObject) => - - val ioResponse = for { - endpoint <- getEndpointAsRDFReader(endpointUrl) - _ = logger.debug(s"Query to \"$endpointUrl\": \"${queryObject.raw}\"") - queryResponse <- io2es(endpoint.queryAsJson(queryObject.raw)) - } yield queryResponse - - ioResponse.value.flatMap { - case Left(err) => InternalServerError(err) - case Right(json) => Ok(json) - } - } - } - - /** Perform a SPARQL query targeted to a specific endpoint. - * Receives a JSON object with the input endpoint query: - * - endpoint [URL]: Query target endpoint - * - query [String]: User query with content and source - * Returns a JSON object with the query results: - * - head [Object]: Query metadata - * - vars: [Array]: Query variables - * - results [Object]: Query results - * - bindings: [Array]: Query results, each item being an object mapping each variable to its value - */ - /** - */ - GET / `verb` / "info" +? + "Check the existence of an endpoint and get its response, if any" ** + GET / `verb` / "info" +? param[URL](EndpointParameter.name) |>> { (endpointUrl: URL) => - Ok(getEndpointInfo(endpointUrl).asJson) - } + Ok(getEndpointInfo(endpointUrl).asJson) + } - /** Attempt to contact a wikibase endpoint and return the data (triplets) about a node in it. - * Receives a JSON object with the input endpoint, node and limits - * Returns a JSON object with the endpoint response (see [[Outgoing.encode]]) - */ - GET / `verb` / "outgoing" +? + "Attempt to contact a wikibase endpoint and return the data (triplets) about a node in it" ** + GET / `verb` / "outgoing" +? param[URL](EndpointParameter.name) & param[String](NodeParameter.name) & param[Option[Int]](LimitParameter.name) |>> { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala index de0df21b..12b377a0 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/fetch/service/FetchService.scala @@ -9,6 +9,7 @@ import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import org.http4s.client.Client import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ import java.net.URL @@ -19,18 +20,13 @@ class FetchService() extends Http4sDsl[IO] with ApiService with LazyLogging { /** Describe the API routes handled by this service and the actions performed on each of them */ val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - - /** Query a given URL and return the response. - * Receives the URL to be queried: - * - url [String]: URL to be queried - * Returns the URL contents (response body) - */ - GET / `verb` +? param[URL](UrlParameter.name) |>> { (url: URL) => - getUrlContents(url) match { - case Left(err) => InternalServerError(err) - case Right(content) => Ok(content) + "Query a given URL and return the response, acting as a proxy" ** + GET / `verb` +? param[URL](UrlParameter.name) |>> { (url: URL) => + getUrlContents(url) match { + case Left(err) => InternalServerError(err) + case Right(content) => Ok(content) + } } - } } case class RequestData(domain: String, url: String) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala index 6d1a80d6..a56d9a7d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/permalink/service/PermalinkService.scala @@ -15,6 +15,7 @@ import mongo4cats.collection.operations.{Filter, Update} import org.http4s.client.Client import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ import java.net.URL @@ -62,15 +63,10 @@ class PermalinkService(client: Client[IO]) */ val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Create a permalink to another resource. - * Receives the URL to be linked: - * - url [String]: URL to be linked - * Returns the permalink unique code in the response body - * - * @note QueryParser already checks for the validity of the URL - */ - GET / `verb` / "generate" +? param[URL](UrlParameter.name) |>> { - (urlObj: URL) => + "Get a permalink to a resource" ** + GET / `verb` / "generate" +? param[URL]( + PermalinkServiceDescriptions.Url.name + ) |>> { (urlObj: URL) => // Extract the relevant info from the URL val urlPath = extractUrlPathAndQuery(urlObj) for { @@ -95,33 +91,29 @@ class PermalinkService(client: Client[IO]) } } } yield response - } - - /** Retrieve a URL to a resource given its permalink code. - * Receives the permalink code to be checked: - * - urlCode [Long]: code to be checked - * Returns the permalink target (if present in the database) in the response body - */ - GET / `verb` / "get" +? param[Long](UrlCodeParameter.name) |>> { - urlCode: Long => - // Fetch document in database - for { - optExistingPermalink <- getPermalinkByCode(urlCode) - response <- optExistingPermalink match { - // Exists, return its code - case Some(pm) => - logger.info( - s"Retrieved original url: ${pm.urlCode} => ${pm.longUrl}" - ) - Ok(pm.longUrl) - // Does not exist, return error - case None => - val msg = s"Could not find the permalink with code: $urlCode" - logger.warn(msg) - NotFound(msg) - } - } yield response - } + } + + "Retrieve a resource given its permalink code" ** + GET / `verb` / "get" +? param[Long](UrlCodeParameter.name) |>> { + urlCode: Long => + // Fetch document in database + for { + optExistingPermalink <- getPermalinkByCode(urlCode) + response <- optExistingPermalink match { + // Exists, return its code + case Some(pm) => + logger.info( + s"Retrieved original url: ${pm.urlCode} => ${pm.longUrl}" + ) + Ok(pm.longUrl) + // Does not exist, return error + case None => + val msg = s"Could not find the permalink with code: $urlCode" + logger.warn(msg) + NotFound(msg) + } + } yield response + } } /** @param url URL object used as input @@ -243,3 +235,14 @@ object PermalinkService { */ def apply(client: Client[IO]): PermalinkService = new PermalinkService(client) } + +/** Compendium of additional text constants used to describe inline parameters + * (query and path parameters) in Swagger + */ +private object PermalinkServiceDescriptions { + case object Url { + val name: String = UrlParameter.name + val description = + s"Valid URL to be shortened into a permalink." + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 07e676f9..640f895f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -1,16 +1,11 @@ package es.weso.rdfshape.server.api.routes.schema.logic.trigger -import cats.effect.IO import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.data.logic.types.Data import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerModeType._ import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ - TriggerModeParameter, - TypeParameter -} -import es.weso.rdfshape.server.api.utils.parameters.PartsMap +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.TypeParameter import es.weso.schema.ValidationTrigger import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} @@ -77,36 +72,6 @@ object TriggerMode extends TriggerModeCompanion[TriggerMode] { case ttd: TriggerTargetDeclarations => TriggerTargetDeclarations.encode(ttd) } - - /** General implementation delegating on subclasses - */ - override def mkTriggerMode( - partsMap: PartsMap, - data: Option[Data] = None, - schema: Option[Schema] = None - ): IO[Either[String, TriggerMode]] = - for { - /* 1. Make some checks on the parameters to distinguish between - * TriggerMode types */ - triggerModeType <- partsMap.optPartValue(TriggerModeParameter.name) - // 2. Delegate on the correct sub-class for creating the Schema - maybeTriggerMode <- triggerModeType match { - // A triggerMode was sent, pattern match to all possibilities - case Some(triggerModeStr) => - triggerModeStr match { - // ShapeMap: ShEx validation - case SHAPEMAP => - TriggerShapeMap.mkTriggerMode(partsMap, data, schema) - // TargetDecls: SHACL validation - case TARGET_DECLARATIONS => - TriggerTargetDeclarations.mkTriggerMode(partsMap, data, schema) - // Invalid value received for trigger mode - case _ => IO.pure(Left("Invalid value received for trigger mode")) - } - // No trigger mode was sent, error - case None => IO.pure(Left("Could not find a trigger mode")) - } - } yield maybeTriggerMode } /** Static utilities to be used with [[TriggerMode]] representations @@ -128,17 +93,4 @@ private[schema] trait TriggerModeCompanion[T <: TriggerMode] /** Encoder used to transform [[TriggerMode]] instances to JSON values */ implicit val encode: Encoder[T] - - /** Given a request's parameters, try to extract an instance of [[TriggerMode]] (type [[T]]) from them - * - * @param partsMap Request's parameters - * @param data Optionally, the [[Data]] being validated in the validation using this trigger - * @param schema Optionally, the [[Schema]] being used in the validation using this trigger - * @return Either the [[TriggerMode]] instance or an error message - */ - def mkTriggerMode( - partsMap: PartsMap, - data: Option[Data], - schema: Option[Schema] - ): IO[Either[String, T]] } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala index 86caaac6..2ae7e45c 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala @@ -9,7 +9,7 @@ import es.weso.rdfshape.server.api.routes.data.logic.types.Data import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerModeType.TriggerModeType import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMap -import es.weso.rdfshape.server.api.utils.parameters.PartsMap +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.ShapeMapParameter import es.weso.schema.{ShapeMapTrigger, ValidationTrigger} import es.weso.shapemaps.{ShapeMap => ShapeMapW} import io.circe._ @@ -60,6 +60,7 @@ private[api] object TriggerShapeMap (cursor: HCursor) => { for { maybeShapeMap <- cursor + .downField(ShapeMapParameter.name) .as[Either[String, ShapeMap]] // Get the prefix maps from data and schema, the shapeMap needs them @@ -111,64 +112,4 @@ private[api] object TriggerShapeMap ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) - - /** Given a request's parameters, try to extract a TriggerMode instance from them - * - * @param partsMap Request's parameters - * @return Either the trigger mode or an error message - */ - def mkTriggerMode( - partsMap: PartsMap, - data: Option[Data], - schema: Option[Schema] - ): IO[Either[String, TriggerShapeMap]] = { - // Get data prefix map, if possible - val dataPrefixMap: Option[PrefixMap] = data - .map(data => - for { - rdf <- data.toRdf() - pm <- rdf.use(_.getPrefixMap) - } yield pm - ) - .map( - _.handleErrorWith(_ => - IO.raiseError( - new RuntimeException("Could not process the data provided") - ) - ) - .unsafeRunSync() - ) - - // Get schema prefix map, if possible - val schemaPrefixMap: Option[PrefixMap] = schema - .map(schema => - for { - schemaModel <- schema.getSchema - pm = schemaModel.map(_.pm).toOption - } yield pm - ) - .flatMap( - _.handleErrorWith(_ => - IO.raiseError( - new RuntimeException("Could not process the schema provided") - ) - ).unsafeRunSync() - ) - - // Form the shapemap and complete the trigger instance - for { - // Get companion shapemap from params - maybeShapeMap <- ShapeMap.mkShapeMap( - partsMap, - nodesPrefixMap = dataPrefixMap, - shapesPrefixMap = schemaPrefixMap - ) - - // Create TriggerMode instance - maybeTriggerMode = maybeShapeMap.map(shapeMap => - TriggerShapeMap(shapeMap, data, schema) - ) - - } yield maybeTriggerMode - } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala index fe83407e..208a0f99 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala @@ -1,12 +1,10 @@ package es.weso.rdfshape.server.api.routes.schema.logic.trigger -import cats.effect.IO import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.data.logic.types.Data import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerModeType.TriggerModeType import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.schema.{TargetDeclarations, ValidationTrigger} import io.circe.syntax.EncoderOps import io.circe.{Decoder, Encoder, HCursor, Json} @@ -44,16 +42,4 @@ private[api] object TriggerTargetDeclarations ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) - - /** Given a request's parameters, try to extract a TriggerMode instance from them - * - * @param partsMap Request's parameters - * @return Either the trigger mode or an error message - */ - def mkTriggerMode( - partsMap: PartsMap, - data: Option[Data], - schema: Option[Schema] - ): IO[Either[String, TriggerTargetDeclarations]] = - IO.pure(Right(TriggerTargetDeclarations(data, schema))) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala index 7205c537..5e3c7e03 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala @@ -9,7 +9,6 @@ import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.SchemaFormat import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource.SchemaSource import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.SourceParameter -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.schema.{Schema => SchemaW} import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} @@ -96,17 +95,6 @@ object Schema extends SchemaCompanion[Schema] { } yield decoded } - - /** Build a [[Schema]] from request parameters - * - * @param partsMap Request parameters - * @note General implementation delegating on subclasses - */ - override def mkSchema(partsMap: PartsMap): IO[Either[String, Schema]] = for { - // 1. Make some checks on the parameters to distinguish between Schema types - // 2. Delegate on the correct sub-class for creating the Schema - maybeSchema <- SchemaSimple.mkSchema(partsMap) - } yield maybeSchema } /** Static utilities to be used with [[Schema]] representations @@ -124,11 +112,4 @@ private[schema] trait SchemaCompanion[S <: Schema] extends LazyLogging { * in the decoding process */ implicit val decodeSchema: Decoder[Either[String, S]] - - /** Given a request's parameters, try to extract an instance of [[Schema]] (type [[S]]) from them - * - * @param partsMap Request's parameters - * @return Either the [[Schema]] instance or an error message - */ - def mkSchema(partsMap: PartsMap): IO[Either[String, S]] } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala index e25907c3..bf5a20f0 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/SchemaSimple.scala @@ -4,14 +4,11 @@ import cats.effect._ import cats.implicits.toBifunctorOps import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.PrefixMap -import es.weso.rdfshape.server.api.definitions.ApiDefaults import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.SchemaFormat import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource.SchemaSource -import es.weso.rdfshape.server.api.routes.schema.logic.aux.SchemaAdapter import es.weso.rdfshape.server.api.routes.schema.logic.aux.SchemaAdapter._ import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import es.weso.schema.{Schemas, Schema => SchemaW} import io.circe.syntax.EncoderOps @@ -131,40 +128,4 @@ private[api] object SchemaSimple } yield schema } } - - override def mkSchema(partsMap: PartsMap): IO[Either[String, SchemaSimple]] = - for { - // Schema param as sent by client - paramSchema <- partsMap.optPartValue(SchemaParameter.name) - paramFormat <- SchemaFormat.fromRequestParams( - SchemaFormatParameter.name, - partsMap - ) - paramEngine <- partsMap.optPartValue(SchemaEngineParameter.name) - paramSource <- partsMap.optPartValue(SchemaSourceParameter.name) - _ = Schemas.availableSchemaNames - // Confirm format and engine or resort to defaults - schemaFormat = paramFormat.getOrElse(ApiDefaults.defaultSchemaFormat) - schemaEngine = paramEngine - .flatMap(SchemaAdapter.schemaEngineFromString) - .getOrElse(ApiDefaults.defaultSchemaEngine) - - // Check the client's selected source - schemaSource = paramSource.getOrElse(SchemaSource.default) - _ = logger.debug( - s"Schema received ($schemaFormat) - Source: $schemaSource" - ) - - // Base for the result - schema = SchemaSimple( - content = "", - format = schemaFormat, - engine = schemaEngine, - source = schemaSource - ) - - } yield schema.fetchedContents.fold( - err => Left(err), - _ => Right(schema) - ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 01f51f77..443f3fa5 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -13,17 +13,13 @@ import es.weso.rdfshape.server.api.routes.schema.logic.operations.{ SchemaInfo, SchemaValidate } -import es.weso.rdfshape.server.api.routes.schema.logic.trigger.{ - TriggerMode, - TriggerShapeMap -} import es.weso.rdfshape.server.api.routes.schema.service.operations.SchemaConvertInput.decoder import es.weso.rdfshape.server.api.routes.schema.service.operations.{ SchemaConvertInput, SchemaInfoInput, SchemaValidateInput } -import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMap +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.SchemaEngineParameter import es.weso.rdfshape.server.implicits.string_parsers.instances.schemaEngineParser import es.weso.schema.{ JenaShacl, @@ -39,6 +35,7 @@ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ /** API service to handle schema-related operations * @@ -55,113 +52,98 @@ class SchemaService(client: Client[IO]) */ val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Returns a JSON array with the accepted schema engines a given schema type (ShEx or Shacl) - */ - GET / `verb` / "engines" / pathVar[String] |>> { `type`: String => - val engines = `type`.toLowerCase match { - case "shex" => List(Schemas.shEx) - case "shacl" => - List(Schemas.shaclex, Schemas.jenaShacl, Schemas.shaclTQ) + s"""Get an array with the accepted schema engines + | given an schema type (${SchemaServiceDescriptions.SchemaType.schemaTypes + .mkString(" or ")})""".stripMargin ** + GET / `verb` / "engines" / pathVar[String]( + SchemaServiceDescriptions.SchemaType.name, + SchemaServiceDescriptions.SchemaType.description + ) |>> { `type`: String => + val engines = `type`.toLowerCase match { + case "shex" => List(Schemas.shEx) + case "shacl" => + List(Schemas.shaclex, Schemas.jenaShacl, Schemas.shaclTQ) + } + val json = Json.fromValues( + engines.map(_.name).map(str => Json.fromString(str)) + ) + Ok(json) + } + + "Get the default schema engine as a raw string" ** + GET / `verb` / "engines" / "default" |>> { + val json = Json.fromString(Schemas.defaultSchema.name) + Ok(Schemas.defaultSchema.name) } - val json = Json.fromValues( - engines.map(_.name).map(str => Json.fromString(str)) - ) - Ok(json) - } - - /** Returns the default schema engine as a raw string - */ - GET / `verb` / "engines" / "default" |>> { - val json = Json.fromString(Schemas.defaultSchema.name) - Ok(json) - } - - /** Returns the default schema format for a given engine as a raw string - */ - GET / `verb` / "formats" / "default" / pathVar[SchemaW] |>> { - engine: SchemaW => + + "Get the default schema format for a given schema engine as a raw string" ** + GET / `verb` / "formats" / "default" / pathVar[SchemaW]( + SchemaServiceDescriptions.SchemaEngine.name, + SchemaServiceDescriptions.SchemaEngine.description + ) |>> { engine: SchemaW => val defaultFormat = engine match { case ShExSchema(_) => ShExFormat.default case JenaShacl(_) | ShaclTQ(_) | ShaclexSchema(_) => ShaclFormat.default } - val json = Json.fromString(defaultFormat.name) + Ok(defaultFormat.name) + } + + "Get an array with the accepted schema formats for a given schema engine" ** + GET / `verb` / "formats" / pathVar[SchemaW]( + SchemaServiceDescriptions.SchemaEngine.name, + SchemaServiceDescriptions.SchemaEngine.description + ) |>> { engine: SchemaW => + val formats = engine match { + case ShExSchema(_) => ShExFormat.availableFormats + case JenaShacl(_) | ShaclTQ(_) | ShaclexSchema(_) => + ShaclFormat.availableFormats + } + val json = Json.fromValues(formats.map(f => Json.fromString(f.name))) Ok(json) - } - - /** Returns a JSON array with the accepted schema formats. - * Accepts an optional query parameter specifying the schema engine: - * - schemaEngine [String]: schema engine for which we are listing the formats - */ - GET / `verb` / "formats" / pathVar[SchemaW] |>> { engine: SchemaW => - val formats = engine match { - case ShExSchema(_) => ShExFormat.availableFormats - case JenaShacl(_) | ShaclTQ(_) | ShaclexSchema(_) => - ShaclFormat.availableFormats } - val json = Json.fromValues(formats.map(f => Json.fromString(f.name))) - Ok(json) - } - - /** Returns a JSON array with the accepted Trigger Modes - */ - GET / `verb` / "triggerModes" |>> { - val json = Json.fromValues( - ApiDefinitions.availableTriggerModes.map( - Json.fromString - ) - ) - Ok(json) - } - - /** Obtain information about an schema. - * Receives a JSON object with the input schema information - * Returns a JSON object with the operation results. See - * [[SchemaInfo.encodeSchemaInfoOperation]]. - */ - POST / `verb` / "info" ^ jsonOf[IO, SchemaInfoInput] |>> { - body: SchemaInfoInput => - SchemaInfo - .schemaInfo(body.schema) - .flatMap(info => Ok(info.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - - } - - /** Convert a given schema to another accepted format (this includes - * graphic formats for visualizations). - * Receives a JSON object with the input schema information - * Returns a JSON object with the operation results. See - * [[SchemaConvert.encodeSchemaConvertOperation]]. - */ - POST / `verb` / "convert" ^ jsonOf[IO, SchemaConvertInput] |>> { - body: SchemaConvertInput => - SchemaConvert - .schemaConvert( - body.schema, - body.targetFormat, - body.targetEngine + + "Get an array with the accepted Trigger Modes for validations" ** + GET / `verb` / "triggerModes" |>> { + val json = Json.fromValues( + ApiDefinitions.availableTriggerModes.map( + Json.fromString ) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - /** Validates RDF data against a given schema-shapemap. - * Receives a JSON object with the input data, schema and shapemap - * information - * Returns a JSON object with the operation results. See - * [[SchemaValidate.encodeSchemaValidateOperation]] - * @note When obtaining the trigger mode from the parameters, - * if the [[TriggerMode]] is shapeMap, the corresponding [[ShapeMap]] - * object will be embedded in the resulting [[TriggerShapeMap]] - */ - POST / `verb` / "validate" ^ jsonOf[IO, SchemaValidateInput] |>> { - body: SchemaValidateInput => - SchemaValidate - .schemaValidate(body.data, body.schema, body.triggerMode) - .flatMap(result => Ok(result.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } + ) + Ok(json) + } + + "Obtain information about an schema: list of shapes and prefix map" ** + POST / `verb` / "info" ^ jsonOf[IO, SchemaInfoInput] |>> { + body: SchemaInfoInput => + SchemaInfo + .schemaInfo(body.schema) + .flatMap(info => Ok(info.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + + } + + "Convert a given schema to another format (this includes graphic formats for visualizations)" ** + POST / `verb` / "convert" ^ jsonOf[IO, SchemaConvertInput] |>> { + body: SchemaConvertInput => + SchemaConvert + .schemaConvert( + body.schema, + body.targetFormat, + body.targetEngine + ) + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } + + "Validates RDF data against a given schema" ** + POST / `verb` / "validate" ^ jsonOf[IO, SchemaValidateInput] |>> { + body: SchemaValidateInput => + SchemaValidate + .schemaValidate(body.data, body.schema, body.triggerMode) + .flatMap(result => Ok(result.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } } } @@ -177,8 +159,27 @@ object SchemaService { new SchemaService(client) } -private object SchemaServiceError extends Enumeration { - type SchemaServiceError = String - val couldNotValidateData: SchemaServiceError = +/** Compendium of additional text constants used on service errors + */ +private object SchemaServiceError { + val couldNotValidateData = "Unknown error validating the data provided. Check the inputs." } + +/** Compendium of additional text constants used to describe inline parameters + * (query and path parameters) in Swagger + */ +private object SchemaServiceDescriptions { + case object SchemaEngine { + val name: String = SchemaEngineParameter.name + val description = + s"Engine in which the validation schema is redacted. One of: ${ApiDefinitions.availableSchemaEngines.map(_.name).mkString(", ")}" + } + + case object SchemaType { + val schemaTypes = List("ShEx", "SHACL") + val name = "SchemaType" + val description = + s"Type of the validation schema. One of: ${schemaTypes.mkString(", ")}" + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala index f1441088..35b39b61 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala @@ -1,14 +1,11 @@ package es.weso.rdfshape.server.api.routes.shapemap.logic -import cats.effect.IO import cats.implicits.{catsSyntaxEitherId, toBifunctorOps} import com.typesafe.scalalogging.LazyLogging import es.weso.rdf.PrefixMap -import es.weso.rdfshape.server.api.definitions.ApiDefaults import es.weso.rdfshape.server.api.format.dataFormats.ShapeMapFormat import es.weso.rdfshape.server.api.routes.shapemap.logic.ShapeMapSource.ShapeMapSource import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.utils.networking.NetworkingUtils.getUrlContents import es.weso.shapemaps.{ShapeMap => ShapeMapW} import io.circe.syntax.EncoderOps @@ -148,42 +145,4 @@ private[api] object ShapeMap extends LazyLogging { } yield shapeMap } } - - /** Given a request's parameters, try to extract a shapemap from them - * - * @param partsMap Request's parameters - * @return Either the shapemap or an error message - */ - def mkShapeMap( - partsMap: PartsMap, - nodesPrefixMap: Option[PrefixMap] = None, - shapesPrefixMap: Option[PrefixMap] = None - ): IO[Either[String, ShapeMap]] = { - for { - // Get data sent in que query - paramShapeMap <- partsMap.optPartValue(ShapeMapParameter.name) - - paramFormat <- ShapeMapFormat.fromRequestParams( - ShapeMapFormatParameter.name, - partsMap - ) - - paramSource <- partsMap.optPartValue( - ShapemapSourceParameter.name - ) - - _ = logger.debug( - s"Getting ShapeMap from params. ShapeMap tab: $paramSource" - ) - - // Create the shapemap instance - shapeMap = ShapeMap( - content = paramShapeMap.getOrElse(""), - nodesPrefixMap = nodesPrefixMap.getOrElse(PrefixMap.empty), - shapesPrefixMap = shapesPrefixMap.getOrElse(PrefixMap.empty), - format = paramFormat.getOrElse(ApiDefaults.defaultShapeMapFormat), - source = paramSource.getOrElse(ShapeMapSource.default) - ) - } yield shapeMap.innerShapeMap.map(_ => shapeMap) - } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala index e5d54f26..1d260e82 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/service/ShapeMapService.scala @@ -12,6 +12,7 @@ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ /** API service to handle shapemap-related operations * @@ -28,24 +29,21 @@ class ShapeMapService(client: Client[IO]) */ val routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Returns a JSON array with the accepted shapeMap formats. - */ - GET / `verb` / "formats" |>> { - val formats = ApiDefinitions.availableShapeMapFormats - val json = Json.fromValues(formats.map(f => Json.fromString(f.name))) - Ok(json) - } - - /** Obtain information about a shapeMap. - * Returns a JSON object with the query inputs and results (see [[ShapeMapInfo.encodeShapeMapInfoOperation]]). - */ - POST / `verb` / "info" ^ jsonOf[IO, ShapeMapInfoInput] |>> { - body: ShapeMapInfoInput => - ShapeMapInfo - .shapeMapInfo(body.shapeMap) - .flatMap(info => Ok(info.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } + "GET an array with the accepted ShapeMap formats" ** + GET / `verb` / "formats" |>> { + val formats = ApiDefinitions.availableShapeMapFormats + val json = Json.fromValues(formats.map(f => Json.fromString(f.name))) + Ok(json) + } + + "Obtain information about a ShapeMap: number of associations, prefixes, model" ** + POST / `verb` / "info" ^ jsonOf[IO, ShapeMapInfoInput] |>> { + body: ShapeMapInfoInput => + ShapeMapInfo + .shapeMapInfo(body.shapeMap) + .flatMap(info => Ok(info.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala index f9f16af8..077e16e8 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala @@ -1,12 +1,10 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.operations -import cats.effect.IO import cats.implicits.{catsSyntaxEitherId, toBifunctorOps} import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationFormats.WikibaseQueryFormat +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationFormats.WikibaseOperationFormats import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ -import es.weso.rdfshape.server.api.utils.parameters.PartsMap import es.weso.rdfshape.server.implicits.codecs.{decodeUri, encodeUri} import io.circe.syntax.EncoderOps import io.circe.{Decoder, Encoder, HCursor, Json} @@ -17,13 +15,13 @@ import scala.util.Try /** Case class representing the data attached to the queries made to wikibase's API * or SPARQL endpoint. Optional parameters may not be required in some operations. * - * @param endpoint [[Uri]] to be used to access a resource in a wikibase instance + * @param endpoint [[Uri]] pointing to the wikibase instance root or SPARQL query endpoint * @param payload Data accompanying the request to the wikibase - * @param searchLanguage Tell the wikibase the language used in a search operation - * as well as the language for the returned results. - * @param resultLanguages Filter the languages returned in queries with internationalized results - * (empty list returns all available languages). - * Each language must be represented by its language code. + * @param searchLanguage Language to be used in a wikibase search operation + * as well as the language for the returned results + * @param resultLanguages Filter the languages returned in GET queries with internationalized results + * (empty list returns all available languages) + * Each language must be represented by its language code * @param limit Maximum amount of results queried in search operations * In SPARQL queries, the limit is embedded in the query text * @param continue Offset where to continue a search operation @@ -37,7 +35,7 @@ case class WikibaseOperationDetails( resultLanguages: Option[List[String]], limit: Option[Int], continue: Option[Int], - format: Option[WikibaseQueryFormat] + format: Option[WikibaseOperationFormats] ) { // Non empty content assume( @@ -98,7 +96,7 @@ object WikibaseOperationDetails extends LazyLogging { } payload <- cursor - .downField(WikibasePayloadParameter.name) + .downField(PayloadParameter.name) .as[String] searchLanguage <- @@ -120,8 +118,8 @@ object WikibaseOperationDetails extends LazyLogging { .as[Option[Int]] format <- cursor - .downField(WikibaseFormatParameter.name) - .as[Option[WikibaseQueryFormat]] + .downField(FormatParameter.name) + .as[Option[WikibaseOperationFormats]] } yield ( endpoint, @@ -160,125 +158,4 @@ object WikibaseOperationDetails extends LazyLogging { ) } } - - /** Given a GET request's parameters, try to extract an instance - * of [[WikibaseOperationDetails]] from them - * - * @param params Request's parameters - * @return Either the [[WikibaseOperationDetails]] instance or an error message - */ - def apply( - params: Map[String, String] - ): IO[Either[String, WikibaseOperationDetails]] = { - // 1. Check for the existence of basic parameters: endpoint - val wikibaseEndpoint = params.get(EndpointParameter.name) - val payload = params.get(WikibasePayloadParameter.name).map(_.strip()) - val queryMainData = (wikibaseEndpoint, payload.getOrElse("")) - - // 2. Fill in with the rest of data, optionally absent - val language = params.get(LanguageParameter.name).map(_.strip()) - val languages = params - .get(LanguagesParameter.name) - .map( - _.strip().split('|').toList - ) // "|" is the separating char for wikibase - val limit = params.get(LimitParameter.name).map(_.toInt) - val continue = params.get(ContinueParameter.name).map(_.toInt) - val format = params.get(WikibaseFormatParameter.name).map(_.strip()) - - IO { - queryMainData match { - case (Some(endpoint), payload) => - val endpointUri = Uri.fromString(endpoint.strip()) - endpointUri match { - case Left(parseErr) => - parseErr.details.asLeft[WikibaseOperationDetails] - case Right(uri) => - WikibaseOperationDetails( - endpoint = uri, - payload = payload, - searchLanguage = language, - resultLanguages = languages, - limit = limit, - continue = continue, - format = format - ).asRight[String] - } - - case (None, payload) => - logger.warn(missingEndpointMessage) - WikibaseOperationDetails( - endpoint = Wikidata.baseUrl, - payload = payload, - searchLanguage = language, - resultLanguages = languages, - limit = limit, - continue = continue, - format = format - ).asRight[String] - case _ => - logger.error(unprocessableParamsMessage) - Left(unprocessableParamsMessage) - } - } - } - - /** Given a POST request's parameters, try to extract an instance - * of [[WikibaseOperationDetails]] from them - * - * @param params Request's parameters - * @return Either the [[WikibaseOperationDetails]] instance or an error message - */ - def apply( - params: PartsMap - ): IO[Either[String, WikibaseOperationDetails]] = for { - // 1. Check for the existence of endpoint and payload - wikibaseEndpoint <- params.optPartValue(EndpointParameter.name) - payload <- params.optPartValue(WikibasePayloadParameter.name) - queryMainData = (wikibaseEndpoint, payload.getOrElse("")) - - // 2. Fill in with the rest of data, optionally absent - language <- params.optPartValue(LanguageParameter.name) - languages <- params.optPartValue(LanguagesParameter.name) - limit <- params.optPartValue(LimitParameter.name) - continue <- params.optPartValue(ContinueParameter.name) - format <- params.optPartValue(WikibaseFormatParameter.name) - - } yield queryMainData match { - case (Some(endpoint), payload) => - val endpointUri = Uri.fromString(endpoint.strip()) - endpointUri match { - case Left(parseErr) => - parseErr.details.asLeft[WikibaseOperationDetails] - case Right(uri) => - WikibaseOperationDetails( - endpoint = uri, - payload = payload.strip(), - searchLanguage = language.map(_.strip()), - resultLanguages = languages.map( - _.split('|').toList - ), - limit = limit.map(_.toInt), - continue = continue.map(_.toInt), - format = format.map(_.strip()) - ).asRight[String] - } - - case (None, payload) => - logger.warn(missingEndpointMessage) - WikibaseOperationDetails( - endpoint = Wikidata.baseUrl, - payload = payload.strip(), - searchLanguage = language.map(_.strip()), - resultLanguages = languages.map( - _.split('|').toList - ), - limit = limit.map(_.toInt), - continue = continue.map(_.toInt), - format = format.map(_.strip()) - ).asRight[String] - case _ => - logger.error(unprocessableParamsMessage) - Left(unprocessableParamsMessage) - } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala index b0098108..4a7f6cb2 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationFormats.scala @@ -8,13 +8,13 @@ import es.weso.rdfshape.server.utils.other.MyEnum * @see [[https://www.mediawiki.org/wiki/Wikibase/API#Request_Format]] */ private[api] object WikibaseOperationFormats extends MyEnum[String] { - type WikibaseQueryFormat = String + type WikibaseOperationFormats = String val JSON = "json" val JSON_FM = "jsonfm" val XML = "xml" val XML_FM = "xmlfm" - val values = Set(JSON, JSON_FM, XML, XML_FM) - val default: WikibaseQueryFormat = JSON + val values = Set(JSON, JSON_FM, XML, XML_FM) + val default: WikibaseOperationFormats = JSON } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala index 2e279de3..6b71a422 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala @@ -3,8 +3,6 @@ package es.weso.rdfshape.server.api.routes.wikibase.service import cats.effect._ import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.ApiService -import es.weso.rdfshape.server.api.routes.schema.logic.operations.SchemaValidate -import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationResult import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationResult._ import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.get.WikibaseGetLabels import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.languages.WikibaseLanguages @@ -26,6 +24,7 @@ import es.weso.rdfshape.server.api.routes.wikibase.service.operations.{ WikibaseOperationInput, WikibaseValidateInput } +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.TypeParameter import es.weso.shapemaps.{Status => _} import io.circe.syntax.EncoderOps import org.http4s.circe._ @@ -33,6 +32,7 @@ import org.http4s.client.Client import org.http4s.client.middleware.FollowRedirect import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes +import org.http4s.rho.swagger.syntax.io._ /** API service to handle wikibase (and mostly wikidata) related operations * Acts as an intermediate proxy between clients and the MediaWiki API @@ -55,166 +55,122 @@ class WikibaseService(client: Client[IO]) */ def routes: RhoRoutes[IO] = new RhoRoutes[IO] { - /** Search for wikidata objects and return their labels in the given languages. - * Receives a JSON object with the input schema information: - * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata's. - * - payload [String]: Entity identifier in the wikibase instance - * - languages [String]: Optionally, the languages of the results. Language - * codes separated by "|" - * Returns a JSON object with the results. See [[WikibaseOperationResult]] - */ - POST / `verb` / "entityLabel" ^ jsonOf[ - IO, - WikibaseOperationInput - ] |>> { body: WikibaseOperationInput => - val op = WikibaseGetLabels(body.operationDetails, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - /** Search for wikidata schemas using MediaWiki's API. Search based on lexeme labels. - * Receives a JSON object with the input schema information: - * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata's. - * - payload [String]: Schema identifier in the wikibase instance - * Returns a JSON object with the results. See [[WikibaseOperationResult]] - */ - POST / `verb` / "schemaContent" ^ jsonOf[ - IO, - WikibaseOperationInput - ] |>> { body: WikibaseOperationInput => - val op = WikibaseSchemaContent(body.operationDetails, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - /** Search for entities in a wikibase using MediaWiki's API. Search based on entity/property/lexeme labels. - * Receives a JSON object with the input property information: - * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata's. - * - payload [String]: Keywords for the search - * - language [String]: Language in which the search is conducted - * - limit [Int]: Max number of results - * - continue [Int]: Offset where to continue a search - * Returns a JSON object with the results. See [[WikibaseOperationResult]] - * - * @note see https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities + "Search for wikidata objects and return their labels in the given languages" ** + POST / `verb` / "entityLabel" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseGetLabels(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } + + "Search for wikidata schemas using MediaWiki's API. Search based on lexeme labels" ** + POST / `verb` / "schemaContent" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseSchemaContent(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } + + /** @note see https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities */ - POST / `verb` / "search" / pathVar[WikibaseSearchTypes] ^ jsonOf[ - IO, - WikibaseOperationInput - ] |>> { (searchType: String, body: WikibaseOperationInput) => - // Check for invalid search parameter - if(!WikibaseSearchTypes.basicValues.contains(searchType)) - BadRequest( - s"Invalid search type '$searchType'. Required one of: ${WikibaseSearchTypes.basicValues.mkString(", ")}" - ) - else { - // Create the corresponding operations and perform it - val searchOperation = searchType match { - case WikibaseSearchTypes.ENTITY => - WikibaseSearchEntity(body.operationDetails, client) - case WikibaseSearchTypes.PROPERTY => - WikibaseSearchProperty(body.operationDetails, client) - case WikibaseSearchTypes.LEXEME => - WikibaseSearchLexeme(body.operationDetails, client) + s"""Search for entities in a wikibase using MediaWiki's API. + | Search based on ${WikibaseSearchTypes.basicValues.mkString( + "/" + )} labels""".stripMargin ** + POST / `verb` / "search" / pathVar[WikibaseSearchTypes]( + WikibaseServiceDescriptions.WikibaseSearchType.name, + WikibaseServiceDescriptions.WikibaseSearchType.description + ) ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { (searchType: String, body: WikibaseOperationInput) => + // Check for invalid search parameter + if(!WikibaseSearchTypes.basicValues.contains(searchType)) + BadRequest( + s"Invalid search type '$searchType'. Required one of: ${WikibaseSearchTypes.basicValues.mkString(", ")}" + ) + else { + // Create the corresponding operations and perform it + val searchOperation = searchType match { + case WikibaseSearchTypes.ENTITY => + WikibaseSearchEntity(body.operationDetails, client) + case WikibaseSearchTypes.PROPERTY => + WikibaseSearchProperty(body.operationDetails, client) + case WikibaseSearchTypes.LEXEME => + WikibaseSearchLexeme(body.operationDetails, client) + } + + searchOperation.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) } - searchOperation.performOperation + } + + "Search for all the languages used in a wikibase instance" ** + POST / `verb` / "languages" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseLanguages(body.operationDetails, client) + op.performOperation .flatMap(results => Ok(results.asJson)) .handleErrorWith(err => InternalServerError(err.getMessage)) } - } + "Execute a given SPARQL query against a given SPARQL endpoint of a wikibase instance" ** + POST / `verb` / "query" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseQueryOperation(body.operationDetails, client) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } - /** Search for all the languages used in a wikibase instance. - * - endpoint [String]: Base URL of the target wikibase instance. Defaults to Wikidata. - * Returns a JSON object with the array of languages supported. - * See [[WikibaseOperationResult]] - */ - POST / `verb` / "languages" ^ jsonOf[ - IO, - WikibaseOperationInput - ] |>> { body: WikibaseOperationInput => - val op = WikibaseLanguages(body.operationDetails, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - /** Execute a given SPARQL query to a given SPARQL endpoint of a wikibase instance. - * Receives a target endpoint and the query text. - * - endpoint [String]: SPARQL query endpoint of the target wikibase instance. Defaults to Wikidata - * - payload [String]: SPARQL query to be run - * Returns a JSON object with the query results: - * (see [[WikibaseOperationResult]]) - * - * Query examples in [[https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples]] - */ - POST / `verb` / "query" ^ jsonOf[ - IO, - WikibaseOperationInput - ] |>> { body: WikibaseOperationInput => - val op = WikibaseQueryOperation(body.operationDetails, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - /** Attempts to extract an schema (ShEx) from a given entity present in wikidata. - * Receives an entity URI as payload - * Returns a JSON object with the extracted schema: - * (see [[WikibaseOperationResult]]) - */ - POST / `verb` / "extract" ^ jsonOf[ - IO, - WikibaseOperationInput - ] |>> { body: WikibaseOperationInput => - val op = WikibaseSchemaExtract(body.operationDetails, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - // TODO: Needs exhaustive testing. Timeouts. - /** Attempts to extract an schema (ShEx) from a given entity present in wikidata - * using SheXer. See [[https://github.com/DaniFdezAlvarez/shexer]]. - * Receives an entity URI as payload. - * - endpoint [String]: Base URL of the target wikibase instance. Should - * be left empty so it defaults to Wikidata. - * - payload [String]: Unique URI of the entity in wikidata - * Returns a JSON object with the extracted schema: - * (see [[WikibaseOperationResult]]) - */ - POST / `verb` / "shexer" ^ jsonOf[ - IO, - WikibaseOperationInput - ] |>> { body: WikibaseOperationInput => - val op = WikibaseSheXerExtract(body.operationDetails, client) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - } - - // TODO: Needs exhaustive testing and client changes - /** Validate entities in wikidata using a given schema. - * Receives an entity URI as payload, as well as the parameters to create - * the ShEx schema against which to validate. - * Returns a JSON object with the validation results: - * (see [[WikibaseOperationResult]] and - * [[SchemaValidate.encodeSchemaValidateOperation]]) - */ - POST / `verb` / "validate" ^ jsonOf[ - IO, - WikibaseValidateInput - ] |>> { body: WikibaseValidateInput => - val op = - WikibaseSchemaValidate(body.operationDetails, client, body.schema) - op.performOperation - .flatMap(results => Ok(results.asJson)) - .handleErrorWith(err => InternalServerError(err.getMessage)) - - } + "Attempt to extract an schema (ShEx) from a given entity present in wikidata" ** + POST / `verb` / "extract" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseSchemaExtract(body.operationDetails, redirectClient) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } + + // TODO: Timeouts. Point to the correct SheXer instance when known. + """Attempt to extract an schema (ShEx) from a given entity present + |in wikidata using SheXer (https://github.com/DaniFdezAlvarez/shexer)""".stripMargin ** + POST / `verb` / "shexer" ^ jsonOf[ + IO, + WikibaseOperationInput + ] |>> { body: WikibaseOperationInput => + val op = WikibaseSheXerExtract(body.operationDetails, redirectClient) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + } + + "Validate entities in wikidata using a given schema" ** + POST / `verb` / "validate" ^ jsonOf[ + IO, + WikibaseValidateInput + ] |>> { body: WikibaseValidateInput => + val op = + WikibaseSchemaValidate(body.operationDetails, client, body.schema) + op.performOperation + .flatMap(results => Ok(results.asJson)) + .handleErrorWith(err => InternalServerError(err.getMessage)) + + } } } @@ -229,3 +185,14 @@ object WikibaseService { def apply(client: Client[IO]): WikibaseService = new WikibaseService(client) } + +/** Compendium of additional text constants used to describe inline parameters + * (query and path parameters) in Swagger + */ +private object WikibaseServiceDescriptions { + case object WikibaseSearchType { + val name: String = TypeParameter.name + val description = + s"Type of search being made in Wikibase. One of: ${WikibaseSearchTypes.basicValues.mkString(", ")}" + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala index 04d12026..8d984086 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -2,22 +2,39 @@ package es.weso.rdfshape.server.api import cats.effect.IO import cats.implicits.catsSyntaxOptionId -import es.weso.rdfshape.server.api.definitions.ApiDefinitions.api -import es.weso.rdfshape.server.api.format.dataFormats.ShapeMapFormat +import es.weso.rdfshape.server.api.definitions.ApiDefinitions.{api, wikidataUrl} +import es.weso.rdfshape.server.api.definitions.{ApiDefaults, ApiDefinitions} +import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.SchemaFormat +import es.weso.rdfshape.server.api.format.dataFormats.{ + DataFormat, + RdfFormat, + ShapeMapFormat +} +import es.weso.rdfshape.server.api.format.{Format, FormatCompanion} +import es.weso.rdfshape.server.api.routes.data.logic.DataSource +import es.weso.rdfshape.server.api.routes.data.logic.types.Data import es.weso.rdfshape.server.api.routes.endpoint.logic.query.{ SparqlQuery, SparqlQuerySource } +import es.weso.rdfshape.server.api.routes.schema.logic.SchemaSource +import es.weso.rdfshape.server.api.routes.schema.logic.trigger.{ + TriggerMode, + TriggerModeType +} +import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema import es.weso.rdfshape.server.api.routes.shapemap.logic.{ ShapeMap, ShapeMapSource } -import es.weso.rdfshape.server.api.swagger.SwaggerModelProperties.url -import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ - ContentParameter, - FormatParameter, - SourceParameter +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.{ + WikibaseOperationDetails, + WikibaseOperationFormats } +import es.weso.rdfshape.server.api.swagger.SwaggerModelProperties._ +import es.weso.rdfshape.server.api.swagger.SwaggerModels._ +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ +import es.weso.schema.{Schema => SchemaW} import org.http4s.rho.RhoMiddleware import org.http4s.rho.swagger.models._ import org.http4s.rho.swagger.syntax.{io => ioSwagger} @@ -28,13 +45,12 @@ import org.http4s.rho.swagger.{ } import java.net.URL +import scala.reflect.runtime.universe import scala.reflect.runtime.universe.typeOf package object swagger { // Import all models - import es.weso.rdfshape.server.api.swagger.SwaggerModels._ - /** Swagger middleware to transform RhoServices into HttpServices * with an attached Swagger definition * Includes the base API spec @@ -76,16 +92,16 @@ package object swagger { /** Metadata object with the API properties to be displayed in Swagger */ - val baseSwaggerMetadata: SwaggerMetadata = SwaggerMetadata( + private val baseSwaggerMetadata: SwaggerMetadata = SwaggerMetadata( apiInfo = Info( title = "RDFShape API", version = buildinfo.BuildInfo.version, // programmatically get project version description = s""" - | RDFShape is web API for semantic data analysis and validation - | implemented in Scala using http4s (https://http4s.org/) and - | documented with Rho (https://github.com/http4s/rho) - |""".stripMargin.some, + | RDFShape is web API for semantic data analysis and validation + | implemented in Scala using http4s (https://http4s.org/) and + | documented with Rho (https://github.com/http4s/rho) + |""".stripMargin.some, contact = Contact( name = "WESO Research group", email = "info@weso.es".some, @@ -105,22 +121,169 @@ package object swagger { /** Set of all swagger object serializers defined in [[SwaggerModels]] */ - private val customSwaggerSerializers = Set( - (typeOf[ShapeMap], shapeMap), - (typeOf[SparqlQuery], sparqlQuery) - ) + private val customSwaggerSerializers: Set[(universe.Type, Set[Model])] = + Set( + (typeOf[Data], dataModel), + (typeOf[Schema], schemaModel), + (typeOf[ShapeMap], shapeMapModel), + (typeOf[TriggerMode], triggerModeModel), + (typeOf[WikibaseOperationDetails], wikibaseOperationDetailsModel), + (typeOf[SparqlQuery], sparqlQueryModel), + (typeOf[URL], urlModel) + ) /** Set of all swagger field serializers defined in [[SwaggerModelProperties]] */ private val customSwaggerFieldSerializers = Set( - (typeOf[URL], url) + (typeOf[Data], dataProperty), + (typeOf[Schema], schemaProperty), + (typeOf[ShapeMap], shapeMapProperty), + (typeOf[TriggerMode], triggerModeProperty), + (typeOf[SparqlQuery], sparqlQueryProperty), + (typeOf[WikibaseOperationDetails], wikibaseOperationDetailsProperty), + (typeOf[URL], urlProperty), + (typeOf[DataFormat], dataFormatProperty), + (typeOf[RdfFormat], rdfFormatProperty), + (typeOf[SchemaFormat], schemaFormatProperty), + (typeOf[ShapeMapFormat], shapeMapFormatProperty), + (typeOf[SchemaW], schemaEngineProperty) ) /** Models used by Rho to create swagger definitions for complex objects * in the domain */ + //noinspection HttpUrlsUsage object SwaggerModels { - val shapeMap: Set[Model] = Set( + + val urlModel: Set[Model] = Set( + ModelImpl( + id = classOf[URL].getSimpleName, + id2 = classOf[URL].getSimpleName, + `type` = "string".some, + name = "URL".some, + description = + "Representation of a valid URL (including protocol, host, port... as needed)".some, + isSimple = true, + example = wikidataUrl.some, + externalDocs = ExternalDocs( + "RFC 1738 - Uniform Resource Locators (URL)", + "https://datatracker.ietf.org/doc/html/rfc1738" + ).some + ) + ) + val dataModel: Set[Model] = Set( + ModelImpl( + id = classOf[Data].getSimpleName, + id2 = classOf[Data].getSimpleName, + `type` = "object".some, + description = "RDF data instance to be processed by the API".some, + name = "Data".some, + properties = Map( + ContentParameter.name -> StringProperty( + required = true, + title = "Contents".some, + description = "RDF data contents, as inputted by the user".some, + enums = Set(), + default = Defaults.rdfDataContent.some + ), + FormatParameter.name -> rdfFormatProperty, + InferenceParameter.name -> StringProperty( + required = false, + title = "Inference".some, + description = "Inference to be applied on the data".some, + enums = ApiDefinitions.availableInferenceEngines.map(_.name).toSet, + default = ApiDefaults.defaultInferenceEngine.name.some + ), + SourceParameter.name -> StringProperty( + required = true, + title = "Source".some, + description = + "Source of the RDF data, used to know how to access it".some, + enums = DataSource.values, + default = DataSource.default.some + ) + ), + externalDocs = ExternalDocs( + "W3C - Resource Description Framework (RDF)", + "https://www.w3.org/RDF/" + ).some + ) + ) + val schemaModel: Set[Model] = Set( + ModelImpl( + id = classOf[Schema].getSimpleName, + id2 = classOf[Schema].getSimpleName, + `type` = "object".some, + description = + "Schema instance to be processed by the API (Shape Expressions or SHACL)".some, + name = "Schema".some, + properties = Map( + ContentParameter.name -> StringProperty( + required = true, + title = "Contents".some, + description = "Schema contents, as inputted by the user".some, + enums = Set(), + default = Defaults.schemaContent.some + ), + FormatParameter.name -> schemaFormatProperty, + EngineParameter.name -> schemaEngineProperty, + SourceParameter.name -> StringProperty( + required = true, + title = "Source".some, + description = + "Source of the schema, used to know how to access it".some, + enums = SchemaSource.values, + default = SchemaSource.default.some + ) + ), + externalDocs = ExternalDocs( + "Validating RDF Data - Comparing ShEx and SHACL", + "https://book.validatingrdf.com/bookHtml013.html" + ).some + ) + ) + val triggerModeModel: Set[Model] = Set( + ModelImpl( + id = classOf[TriggerMode].getSimpleName, + id2 = classOf[TriggerMode].getSimpleName, + `type` = "object".some, + description = + "Trigger mode used in data validations, might contain a shapeMap for ShEx validations".some, + name = "ShapeMap".some, + properties = Map( + TypeParameter.name -> StringProperty( + required = true, + title = "Type".some, + description = + "Type of the trigger, used to know how to process the validation".some, + enums = TriggerModeType.values, + default = TriggerModeType.default.some + ), + DataParameter.name -> RefProperty( + required = false, + title = "Data".some, + description = + "The data being processed in the validation where this trigger mode appears. If the data was already sent in the request, it is not necessary to embed it here".some, + ref = classOf[Data].getSimpleName + ), + SchemaParameter.name -> RefProperty( + required = false, + title = "Schema".some, + description = + "The schema being used in the validation where this trigger mode appears. If the schema was already sent in the request, it is not necessary to embed it here".some, + ref = classOf[Schema].getSimpleName + ), + ShapeMapParameter.name -> RefProperty( + required = false, + title = "ShapeMap".some, + description = + "The schema being used in the validation where this trigger mode appears. Only required in ShEx validations".some, + ref = classOf[ShapeMap].getSimpleName + ) + ) + ) + ) + val shapeMapModel: Set[Model] = Set( ModelImpl( id = classOf[ShapeMap].getSimpleName, id2 = classOf[ShapeMap].getSimpleName, @@ -130,34 +293,29 @@ package object swagger { properties = Map( ContentParameter.name -> StringProperty( required = true, - description = "ShapeMap contents".some, + title = "Contents".some, + description = "ShapeMap contents, as inputted by the user".some, enums = Set(), - pattern = "(@)+".some - ), - FormatParameter.name -> StringProperty( - required = true, - description = "ShapeMap format".some, - enums = ShapeMapFormat.availableFormats.map(_.name).toSet + pattern = "(@)+".some, + default = Defaults.shapeMapContent.some ), + FormatParameter.name -> shapeMapFormatProperty, SourceParameter.name -> StringProperty( required = true, + title = "Source".some, description = "Source of the shapeMap content, used to know how to access it".some, - enums = SparqlQuerySource.values + enums = ShapeMapSource.values, + default = ShapeMapSource.default.some ) ), externalDocs = ExternalDocs( "W3C Draft - ShapeMap Structure and Language", "https://shex.io/shape-map/" - ).some, - example = s"""{ - | "content": "@", - | "source": "${ShapeMapSource.TEXT}" - |}""".stripMargin.some + ).some ) ) - - val sparqlQuery: Set[Model] = Set( + val sparqlQueryModel: Set[Model] = Set( ModelImpl( id = classOf[SparqlQuery].getSimpleName, id2 = classOf[SparqlQuery].getSimpleName, @@ -167,39 +325,165 @@ package object swagger { properties = Map( ContentParameter.name -> StringProperty( required = true, - description = "Query contents".some, - enums = Set() + title = "Contents".some, + description = "Query contents, as inputted by the user".some, + enums = Set(), + default = Defaults.sparqlQueryContent.some ), SourceParameter.name -> StringProperty( required = true, + title = "Source".some, description = - "Source of the query content, used to know how to access it".some, - enums = SparqlQuerySource.values + "Source of the query contents, used to know how to access it".some, + enums = SparqlQuerySource.values, + default = SparqlQuerySource.default.some ) ), externalDocs = ExternalDocs( "W3C - SPARQL query language for RDF", "https://www.w3.org/TR/rdf-sparql-query/" - ).some, - example = s"""{ - | "content": "SELECT ?a ?b ?c WHERE { ?a ?b ?c } LIMIT 1", - | "source": "${SparqlQuerySource.TEXT}" - |}""".stripMargin.some + ).some + ) + ) + val wikibaseOperationDetailsModel: Set[Model] = Set( + ModelImpl( + id = classOf[WikibaseOperationDetails].getSimpleName, + id2 = classOf[WikibaseOperationDetails].getSimpleName, + `type` = "object".some, + description = + "Set of parameters required to perform operations on a Wikibase instance".some, + name = "Wikibase Operation details".some, + properties = Map( + EndpointParameter.name -> RefProperty( + ref = classOf[URL].getSimpleName, + required = false, + title = "Endpoint".some, + description = + "URL pointing to the wikibase instance root or SPARQL query endpoint. Defaults to Wikidata.".some + ), + PayloadParameter.name -> StringProperty( + required = true, + title = "Payload".some, + description = "Data accompanying the request to the wikibase".some, + enums = Set() + ), + FormatParameter.name -> StringProperty( + required = false, + title = "Format".some, + description = "Format in which results are requested".some, + enums = WikibaseOperationFormats.values + ), + LimitParameter.name -> StringProperty( + required = false, + title = "Limit".some, + description = + "Maximum amount of results queried in search operations".some, + enums = Set(), + pattern = "Number >= 0".some + ), + ContinueParameter.name -> StringProperty( + required = false, + title = "Continue".some, + description = "Offset where to continue a search operation".some, + enums = Set(), + pattern = "Number >= 0".some + ), + LanguageParameter.name -> StringProperty( + required = false, + title = "Search language".some, + description = + "Language to be used in a wikibase search operation, as well as the language for the returned results".some, + enums = Set(), + default = "en".some + ), + LanguagesParameter.name -> ArrayProperty( + required = false, + title = "Result language".some, + description = + "Filter the languages returned in GET queries with internationalized results (empty list returns all available languages)".some, + items = StringProperty( + enums = Set(), + default = "en".some + ) + ) + ) ) ) + + /** Default values used in custom Swagger property definitions + */ + //noinspection HttpUrlsUsage + private[api] object Defaults { + val rdfDataContent: String = + "@prefix : . :alice a :item ." + val schemaContent = + "PREFIX : PREFIX schema: PREFIX xsd: :User { schema:name xsd:string }" + val sparqlQueryContent = "SELECT ?a ?b ?c WHERE { ?a ?b ?c } LIMIT 1" + val shapeMapContent = + "@" + } } /** Properties used by Rho to create swagger definitions for special objects * in the domain */ + //noinspection HttpUrlsUsage object SwaggerModelProperties { - val url: StringProperty = StringProperty( + + // Force properties to reference the correct model defined above + val urlProperty: RefProperty = RefProperty(classOf[URL].getSimpleName) + val dataProperty: RefProperty = RefProperty(classOf[Data].getSimpleName) + val schemaProperty: RefProperty = RefProperty(classOf[Schema].getSimpleName) + val shapeMapProperty: RefProperty = RefProperty( + classOf[ShapeMap].getSimpleName + ) + val triggerModeProperty: RefProperty = RefProperty( + classOf[TriggerMode].getSimpleName + ) + val sparqlQueryProperty: RefProperty = RefProperty( + classOf[SparqlQuery].getSimpleName + ) + val wikibaseOperationDetailsProperty: RefProperty = RefProperty( + classOf[WikibaseOperationDetails].getSimpleName + ) + + val rdfFormatProperty: StringProperty = mkFormatProperty(RdfFormat) + val dataFormatProperty: StringProperty = mkFormatProperty(DataFormat) + val schemaFormatProperty: StringProperty = mkFormatProperty(SchemaFormat) + val shapeMapFormatProperty: StringProperty = mkFormatProperty( + ShapeMapFormat + ) + + val schemaEngineProperty: StringProperty = StringProperty( required = true, + title = "Engine".some, description = - "Representation of a valid URL (including protocol, host, port... as needed)".some, - enums = Set(), - default = "https://...".some + "Engine in which the schema is redacted (ShEx or any other SHACL engine)".some, + enums = ApiDefinitions.availableSchemaEngines.map(_.name).toSet, + default = ApiDefaults.defaultSchemaEngine.name.some ) + /** Automated algorithm for creating SwaggerProperty definitions for any + * [[Format]] sub-type + * + * @param companion Companion object of the Format + * @tparam F Format sub-type + * @return A [[StringProperty]] defining the format in Swagger + */ + private def mkFormatProperty[F <: Format]( + companion: FormatCompanion[F] + ) = { + val propertyName = companion.getClass.getSimpleName.stripSuffix("$") + + StringProperty( + required = true, + title = propertyName.some, + description = s"$propertyName in which the input is redacted".some, + enums = companion.availableFormats.map(_.name).toSet, + default = companion.default.name.some + ) + } + } + } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala index 7a8f0dac..88931e30 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala @@ -298,8 +298,7 @@ object IncomingRequestParameters { /** Parameter expected to contain a payload for later use querying wikibase's API */ - object WikibasePayloadParameter - extends QueryParamDecoderMatcher[String](payload) { + object PayloadParameter extends QueryParamDecoderMatcher[String](payload) { val name: String = payload } @@ -379,12 +378,4 @@ object IncomingRequestParameters { val name: String = continue } - /** Parameter expected to contain the format requested to wikibase when - * searching for data - */ - object WikibaseFormatParameter - extends OptionalQueryParamDecoderMatcher[String](wbFormat) { - val name: String = wbFormat - } - } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala index 137cb502..05df5542 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/implicits/string_parsers/package.scala @@ -31,7 +31,8 @@ package object string_parsers { case Success(schema) => SuccessResponse(schema) } - override def typeTag: Some[universe.TypeTag[SchemaW]] = Some( + // Use String type tag + override def typeTag: Option[universe.TypeTag[SchemaW]] = Some( implicitly[universe.TypeTag[SchemaW]] ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala index b75d6995..233224d9 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala @@ -7,8 +7,9 @@ package object other { /** Given a decoding operation whose result may contain an error, map the * erroring result to a [[DecodingFailure]] containing it as message - * If a native decoding failure occurred, leave it as is, else if an error + * If a native decoding failure occurred, leave it as is, else if an error * occurred return it as a decoding failure , else return the value + * * @param input Either resulting of a Circe decode operation * @tparam L Left type of input either * @tparam R Right type of input Either From cf51dd78f0d7749de7d7e7fe2211c93a9e3500f3 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 3 Mar 2022 12:51:24 +0100 Subject: [PATCH 14/50] Updated project website --- build.sbt | 3 +- docs/api-usage/usage_cli.md | 8 +- docs/api-usage/usage_examples.md | 30 ----- docs/api-usage/usage_tutorial.md | 53 --------- website/docusaurus.config.js | 131 ++++++++------------- website/sidebars.js | 123 ++++++++----------- website/src/components/HomepageFeatures.js | 98 +++++++-------- 7 files changed, 142 insertions(+), 304 deletions(-) delete mode 100644 docs/api-usage/usage_examples.md delete mode 100644 docs/api-usage/usage_tutorial.md diff --git a/build.sbt b/build.sbt index 7d666f57..d9fdb82a 100644 --- a/build.sbt +++ b/build.sbt @@ -101,7 +101,8 @@ lazy val mdocSettings = Seq( "CLIENT_NAME" -> "RDFShape Client", "CLIENT_REPO" -> "https://github.com/weso/rdfshape-client/", "CLIENT_URL" -> "https://rdfshape.weso.es/", - "WESOLOCAL_URL" -> "https://github.com/weso/wesolocal/wiki/RDFShape" + "WESOLOCAL_URL" -> "https://github.com/weso/wesolocal/wiki/RDFShape", + "API-DOCS_URL" -> "https://app.swaggerhub.com/apis-docs/weso/RDFShape" ), mdocExtraArguments := Seq("--no-link-hygiene"), /* When creating/publishing the docusaurus site, update the dynamic mdoc and diff --git a/docs/api-usage/usage_cli.md b/docs/api-usage/usage_cli.md index a7a4bd26..df7ba089 100644 --- a/docs/api-usage/usage_cli.md +++ b/docs/api-usage/usage_cli.md @@ -9,10 +9,10 @@ title: Command Line Interface @APP_NAME@'s CLI currently supports the following launch-arguments: -- `--https` Attempt to serve the API via HTTPS (defaults to false), searching for certificates as specified in the - current environment. -- `-p, --port` Port in which the API will listen for requests. Values must be in range 1-65535 (defaults to 8080). -- `-v, --verbose` Show additional logging information (use cumulative times for additional info, like: `-vvv`) +- `--https` Attempt to serve the API via HTTPS (default is false), searching for certificates as specified in the current environment. +- `-p, --port` Port in which the API will listen for requests. Values must be in range 1-65535 (default is 8080). +- `-s, --silent` Enable silent mode in order not to log any output to console (default is false) +- `-v, --verbose` Show additional logging information (use cumulative times for additional info, like: `-vvv`) - `--version` Print the version of the program - `--help` Print the help menu diff --git a/docs/api-usage/usage_examples.md b/docs/api-usage/usage_examples.md deleted file mode 100644 index 04ebafb8..00000000 --- a/docs/api-usage/usage_examples.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -id: usage_examples -title: Example API Requests ---- - -# Example API requests - -## Data info - -``` -curl -i -X POST -H "Content-type:multipart/form-data" \ -'https://api.rdfshape.weso.es/api/data/info' \ ---form-string 'data=@prefix : . @prefix foaf: . :alice a foaf:Person .' \ ---form-string 'dataSource=byText' \ ---form-string 'dataFormat=turtle' \ ---form-string 'dataInference=None' -``` - -
- -#### Pending examples - -## Validation - -## Wikidata - -## Convert RDF data to JSON representation - -The JSON representation follows the format used by -the [Cytoscape component](https://github.com/plotly/react-cytoscapejs). diff --git a/docs/api-usage/usage_tutorial.md b/docs/api-usage/usage_tutorial.md deleted file mode 100644 index dbcf0166..00000000 --- a/docs/api-usage/usage_tutorial.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -id: usage_tutorial -title: API Tutorial ---- - -# API Tutorial - -@APP_NAME@ is a public API that can be used as a playground for RDF, Shape Expressions, SHACL, etc. - -## ShEx - -Validate RDF data with ShEx. Example from the [Validating RDF book](https://book.validatingrdf.com/): - -- [Example](https://rdfshape.weso.es/shExValidate?activeSchemaTab=%23schemaTextArea&activeTab=%23dataTextArea&data=PREFIX%20%3A%20%20%20%20%20%20%20%3Chttp%3A%2F%2Fexample.org%2F%3E%0APREFIX%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%0APREFIX%20xsd%3A%20%20%20%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0APREFIX%20foaf%3A%20%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%0A%3Aalice%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Alice%22%20%3B%20%20%20%20%20%20%20%20%20%20%20%20%23%20%25%2A%20%5CPasses%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20schema%3AFemale%20%3B%0A%20%20%20%20%20%20%20schema%3Aknows%20%20%20%20%20%20%20%20%20%20%3Abob%20.%0A%0A%3Abob%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20schema%3AMale%20%3B%20%20%20%20%20%20%20%20%23%20%25%2A%20%5CPasses%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Robert%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20schema%3AbirthDate%20%20%20%20%20%20%221980-03-10%22%5E%5Exsd%3Adate%20.%0A%0A%3Acarol%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Carol%22%20%3B%20%20%20%20%20%20%20%20%20%20%20%20%23%20%25%2A%20%5CPasses%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20%22unspecified%22%20%3B%20%20%0A%20%20%20%20%20%20%20foaf%3Aname%20%20%20%20%20%20%20%20%20%20%20%20%20%22Carol%22%20.%0A%0A%3Adave%20%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Dave%22%3B%20%20%20%20%20%20%20%20%20%23%20%25%2A%20%5CFails%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20%22XYY%22%3B%20%20%20%20%20%20%20%20%20%20%23%0A%20%20%20%20%20%20%20schema%3AbirthDate%20%20%20%20%20%201980%20.%20%20%20%20%20%20%20%20%20%20%23%20%25%2A%201980%20is%20not%20an%20xsd%3Adate%20%2A%29%0A%0A%3Aemily%20schema%3Aname%20%22Emily%22%2C%20%22Emilee%22%20%3B%20%20%20%20%20%20%20%23%20%25%2A%20%5CFails%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20schema%3AFemale%20.%20%23%20%25%2A%20too%20many%20schema%3Anames%20%2A%29%0A%0A%3Afrank%20foaf%3Aname%20%20%20%20%20%20%20%20%20%20%20%20%20%22Frank%22%20%3B%20%20%20%20%20%20%20%23%20%25%2A%20%5CFails%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20schema%3Agender%3A%20%20%20%20%20%20%20%20schema%3AMale%20.%20%20%20%23%20%25%2A%20missing%20schema%3Aname%20%2A%29%0A%0A%3Agrace%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Grace%22%20%3B%20%20%20%20%20%20%20%23%20%25%2A%20%5CFails%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20schema%3AMale%20%3B%20%20%20%23%20%0A%20%20%20%20%20%20%20schema%3Aknows%20%20%20%20%20%20%20%20%20%20_%3Ax%20.%20%20%20%20%20%20%20%20%20%20%20%23%20%25%2A%20%5C_%3Ax%20is%20not%20an%20IRI%20%2A%29%0A%0A%3Aharold%20schema%3Aname%20%20%20%20%20%20%20%20%20%22Harold%22%20%3B%20%20%20%20%23%20%25%2A%20%5CFails%7B%3AUser%7D%20%2A%29%0A%20%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20schema%3AMale%20%3B%20%0A%20%20%20%20%20%20%20%20schema%3Aknows%20%20%20%20%20%20%20%20%3Agrace%20.%20%20%20%20%20%20%23%20%25%2A%20%3Agrace%20does%20not%20conform%20to%20%3AUser%20%2A%29&dataFormat=TURTLE&dataFormatTextArea=TURTLE&endpoint=&inference=None&schema=PREFIX%20%3A%20%20%20%20%20%20%20%3Chttp%3A%2F%2Fexample.org%2F%3E%0APREFIX%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%0APREFIX%20xsd%3A%20%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0A%0A%3AUser%20%7B%0A%20%20schema%3Aname%20%20%20%20%20%20%20%20%20%20xsd%3Astring%20%20%3B%0A%20%20schema%3AbirthDate%20%20%20%20%20xsd%3Adate%3F%20%20%3B%0A%20%20schema%3Agender%20%20%20%20%20%20%20%20%5B%20schema%3AMale%20schema%3AFemale%20%5D%20OR%20xsd%3Astring%20%3B%0A%20%20schema%3Aknows%20%20%20%20%20%20%20%20%20IRI%20%40%3AUser%2A%0A%7D&schemaEngine=ShEx&schemaFormat=ShExC&shapeMap=%3Aalice%40%3AUser%2C%3Abob%40%3AUser%2C%3Acarol%40%3AUser%2C%3Aemily%40%3AUser%2C%3Afrank%40%3AUser%2C%3Agrace%40%3AUser%2C%3Aharold%40%3AUser&shapeMapActiveTab=%23shapeMapTextArea&shapeMapFormat=Compact&triggerMode=shapeMap) - -## SHACL - -Validate RDF data with SHACL. Example from the Validating RDF book: - -- [Example](https://rdfshape.weso.es/shaclValidate?activeSchemaTab=%23schemaTextArea&activeTab=%23dataTextArea&data=%40prefix%20%3A%20%20%20%20%20%20%20%3Chttp%3A%2F%2Fexample.org%2F%3E%20.%0A%40prefix%20sh%3A%20%20%20%20%20%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23%3E%20.%0A%40prefix%20xsd%3A%20%20%20%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%20.%0A%40prefix%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%20.%0A%40prefix%20foaf%3A%20%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%20.%0A%40prefix%20rdfs%3A%20%20%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%20.%0A%20%20%20%20%20%20%20%20%0A%0A%3Aalice%20a%20%3AUser%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%25%2A%5CPasses%7B%3AUserShape%7D%20%2A%29%20%20%20%20%20%0A%20%20%20%20%20%20%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Alice%22%20%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20schema%3AFemale%20%3B%0A%20%20%20%20%20%20%20schema%3Aknows%20%20%20%20%20%20%20%20%20%20%3Abob%20.%0A%0A%3Abob%20%20%20a%20%3AUser%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%25%2A%5CPasses%7B%3AUserShape%7D%20%2A%29%20%20%20%20%20%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20schema%3AMale%20%3B%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Robert%22%3B%0A%20%20%20%20%20%20%20schema%3AbirthDate%20%20%20%20%20%20%221980-03-10%22%5E%5Exsd%3Adate%20.%0A%0A%3Acarol%20a%20%3AUser%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%25%2A%5CPasses%7B%3AUserShape%7D%20%2A%29%20%20%20%20%20%0A%20%20%20%20%20%20%20schema%3Aname%20%20%20%20%20%20%20%20%20%20%20%22Carol%22%20%3B%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20schema%3Agender%20%20%20%20%20%20%20%20%20schema%3AFemale%20%3B%20%20%0A%20%20%20%20%20%20%20foaf%3Aname%20%20%20%20%20%20%20%20%20%20%20%20%20%22Carol%22%20.&dataFormat=TURTLE&dataFormatTextArea=TURTLE&endpoint=&inference=None&schema=%40prefix%20%3A%20%20%20%20%20%20%20%3Chttp%3A%2F%2Fexample.org%2F%3E%20.%0A%40prefix%20sh%3A%20%20%20%20%20%3Chttp%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23%3E%20.%0A%40prefix%20xsd%3A%20%20%20%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%20.%0A%40prefix%20schema%3A%20%3Chttp%3A%2F%2Fschema.org%2F%3E%20.%0A%40prefix%20foaf%3A%20%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%20.%0A%40prefix%20rdfs%3A%20%20%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%20.%0A%20%20%20%20%20%20%20%20%0A%3AUserShape%20a%20sh%3ANodeShape%3B%0A%20%20%20sh%3AtargetClass%20%3AUser%20%3B%0A%20%20%20sh%3Aproperty%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Blank%20node%201%0A%20%20%20%20sh%3Apath%20%20%20%20%20schema%3Aname%20%3B%20%0A%20%20%20%20sh%3AminCount%201%3B%20%0A%20%20%20%20sh%3AmaxCount%201%3B%0A%20%20%20%20sh%3Adatatype%20xsd%3Astring%20%3B%0A%20%20%5D%20%3B%0A%20%20sh%3Aproperty%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Blank%20node%202%0A%20%20%20sh%3Apath%20schema%3Agender%20%3B%0A%20%20%20sh%3AminCount%201%3B%0A%20%20%20sh%3AmaxCount%201%3B%0A%20%20%20sh%3Aor%20%28%0A%20%20%20%20%5B%20sh%3Ain%20%28schema%3AMale%20schema%3AFemale%29%20%5D%0A%20%20%20%20%5B%20sh%3Adatatype%20xsd%3Astring%5D%0A%20%20%20%29%0A%20%20%5D%20%3B%0A%20%20sh%3Aproperty%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Blank%20node%203%20%20%0A%20%20%20sh%3Apath%20%20%20%20%20schema%3AbirthDate%20%3B%20%0A%20%20%20sh%3AmaxCount%201%3B%20%0A%20%20%20sh%3Adatatype%20xsd%3Adate%20%3B%0A%20%20%5D%20%3B%0A%20%20sh%3Aproperty%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20Blank%20node%204%20%0A%20%20%20sh%3Apath%20%20%20%20%20schema%3Aknows%20%3B%20%0A%20%20%20sh%3AnodeKind%20sh%3AIRI%20%3B%0A%20%20%20sh%3Aclass%20%20%20%20%3AUser%20%3B%0A%20%20%5D%20.&schemaEngine=JenaSHACL&schemaFormat=TURTLE&schemaInference=none&triggerMode=targetDecls) - -## Data + Schema - -- If the _Schema_ option is selected, then @APP_NAME@ validates both the syntax and the shape of RDF graphs. -- The Schema can be entered by URI, by file or by text input. -- Once the validation has finished, the system can generate a shareable permalink with the result. -- For visualizations, the system can also generate a link for embedding the visualizations. - -## Data + Schema + Node - -- In this option, the system asks for a node in the RDF Graph that will act as the pointed node in the graph to start - the validation process - -## Data Conversions - -- This option allows to convert between different RDF formats. -- The available formats are: - * Turtle - * RDF/XML - * RDF/JSON - * N-Triples - -## Schema Conversions - -- This option can be used to convert different representations of schema data. -- The available formats are: - * ShExC (Shape expression compact syntax) - * The RDF formats: Turtle, RDF/XML, RDF/JSON, N-TRIPLES, etc. - -## Further info - -@APP_NAME@ is based on [SHaclEX](http://github.com/weso/shaclex/), a Shape Expressions processor which can also be used as -a command line tool. \ No newline at end of file diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 9de88762..fb3619bf 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -1,6 +1,7 @@ const deployUrl = "https://weso.github.io" const baseUrl = "/rdfshape-api/" -const docsUrl = `${deployUrl}${baseUrl}api/es/weso/rdfshape/` +const scalaDocUrl = `${deployUrl}${baseUrl}api/es/weso/rdfshape/` +const apiDocsUrl = "https://app.swaggerhub.com/apis-docs/weso/RDFShape/" /** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = { @@ -15,12 +16,10 @@ module.exports = { favicon: "favicon.ico", trailingSlash: true, customFields: { - docsUrl, + scalaDocUrl, apiDocsUrl }, themeConfig: { - image: "img/preview.png", - hideableSidebar: false, - colorMode: { + image: "img/preview.png", hideableSidebar: false, colorMode: { defaultMode: "light", disableSwitch: false, respectPrefersColorScheme: true, @@ -30,99 +29,61 @@ module.exports = { darkIconStyle: {marginLeft: "2px"}, lightIconStyle: {marginLeft: "1px"}, }, - }, - navbar: { - title: "RDFShape API", - logo: { - alt: "RDFShape API - WESO", - src: "img/logo-weso.png", - }, - items: [ - // Web docs + }, navbar: { + title: "RDFShape API", logo: { + alt: "RDFShape API - WESO", src: "img/logo-weso.png", + }, items: [// Web docs + { + to: "/docs", label: "Web docs", position: "left", + }, // Scaladoc { - to: "/docs", - label: "Web docs", - position: "left", - }, - // Scaladoc + to: scalaDocUrl, label: "Scaladoc", position: "left", + }, // API Docs in SwaggerHub { - to: docsUrl, - label: "Scaladoc", - position: "left", - }, - // Link to repo + href: "https://github.com/weso/rdfshape-api", + label: "SwaggerHub", + position: "right", + }, // Link to repo { href: "https://github.com/weso/rdfshape-api", label: "GitHub", position: "right", - }, - ], - }, - footer: { + },], + }, footer: { style: "light", logo: { alt: "RDFShape API - WESO", src: "img/logo-weso-footer.png", href: "https://www.weso.es/", }, - links: [ - { - title: "About us", - items: [ - { - label: "WESO Research Group", - to: "https://www.weso.es/", - }, - { - label: "University of Oviedo", - to: "https://www.uniovi.es/", - }, - ], - }, - { - title: "Community", - items: [ - { - label: "GitHub", - to: "https://github.com/weso", - }, - { - label: "Twitter", - to: "https://twitter.com/wesoviedo", - }, - ], - }, - { - title: "Further work", - items: [ - { - label: "RDFShape project", - to: "https://github.com/weso/rdfshape", - }, - { - label: "More software by WESO", - to: "https://www.weso.es/#software", - }, - ], - }, - ], + links: [{ + title: "About us", items: [{ + label: "WESO Research Group", to: "https://www.weso.es/", + }, { + label: "University of Oviedo", to: "https://www.uniovi.es/", + },], + }, { + title: "Community", items: [{ + label: "GitHub", to: "https://github.com/weso", + }, { + label: "Twitter", to: "https://twitter.com/wesoviedo", + },], + }, { + title: "Further work", items: [{ + label: "RDFShape project", to: "https://github.com/weso/rdfshape", + }, { + label: "More software by WESO", to: "https://www.weso.es/#software", + },], + },], copyright: `Copyright © ${new Date().getFullYear()} WESO Research Group`, }, }, - presets: [ - [ - "@docusaurus/preset-classic", - { - docs: { - path: "../rdfshape-docs/target/mdoc", - sidebarPath: require.resolve("./sidebars.js"), - }, - blog: false, - theme: { - customCss: require.resolve("./src/css/custom.css"), - }, - sitemap: {}, - }, - ], - ], + presets: [["@docusaurus/preset-classic", { + docs: { + path: "../rdfshape-docs/target/mdoc", + sidebarPath: require.resolve("./sidebars.js"), + }, blog: false, theme: { + customCss: require.resolve("./src/css/custom.css"), + }, sitemap: {}, + },],], }; diff --git a/website/sidebars.js b/website/sidebars.js index 928c46cb..755461d4 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -1,80 +1,53 @@ -const docsUrl = "https://www.weso.es/rdfshape-api/api/es/weso/rdfshape/" -const apiDocsUrl = "https://app.swaggerhub.com/apis/weso/RDFShape" +import {customFields} from "./docusaurus.config" +const {scalaDocUrl, apiDocsUrl} = customFields module.exports = { - // Generate a sidebar from the docs folder structure - // sidebar: [{type: "autogenerated", dirName: "."}], - - // Create a sidebar manually - docsSidebar: [ - /* Home */ - { - type: "doc", - id: "home", - label: "Welcome", - }, - - /* Category: deployment */ - { - type: "category", - label: "API Deployment", - items: [ - "api-deployment/deployment_overview", - "api-deployment/deployment_manual", - "api-deployment/deployment_docker" - ], - collapsed: false - }, - - /* Category: usage */ - { - type: "category", - label: "API Usage", - items: [ - "api-usage/usage_cli", - "api-usage/usage_tutorial", - "api-usage/usage_examples" - ], - collapsed: false - }, - - /* Category: testing */ - { - type: "category", - label: "API Testing and Auditing", - items: [ - "api-testing-auditing/testing-auditing_munit", - "api-testing-auditing/testing-auditing_integration", - "api-testing-auditing/testing-auditing_logs" - ], - collapsed: true - }, - - /* Category: documentation */ - { - type: "category", - label: "Additional documentation", - items: [ - { - type: "link", - label: "Scaladoc", - href: docsUrl - }, { - type: "link", - label: "API Docs (Swagger Hub)", - href: apiDocsUrl - } - ], - collapsed: false - }, - - /* Webpage information */ - { - type: "doc", - id: "webpage/webpage_info", - label: "About this webpage", - }, - ], + // Generate a sidebar from the docs folder structure + // sidebar: [{type: "autogenerated", dirName: "."}], + + // Create a sidebar manually + docsSidebar: [/* Home */ + { + type: "doc", id: "home", label: "Welcome", + }, + + /* Category: deployment */ + { + type: "category", + label: "API Deployment", + items: ["api-deployment/deployment_overview", "api-deployment/deployment_manual", "api-deployment/deployment_docker"], + collapsed: false + }, + + /* Category: usage */ + { + type: "category", + label: "API Usage", + items: ["api-usage/usage_cli"], + collapsed: false + }, + + /* Category: testing */ + { + type: "category", + label: "API Testing and Auditing", + items: ["api-testing-auditing/testing-auditing_munit", "api-testing-auditing/testing-auditing_integration", "api-testing-auditing/testing-auditing_logs"], + collapsed: true + }, + + /* Category: documentation */ + { + type: "category", label: "Additional documentation", items: [{ + type: "link", label: "Scaladoc", href: scalaDocUrl + }, { + type: "link", label: "API Docs (Swagger Hub)", href: apiDocsUrl + }], collapsed: false + }, + + /* Webpage information */ + { + type: "doc", id: "webpage/webpage_info", label: "About this webpage", + },], }; diff --git a/website/src/components/HomepageFeatures.js b/website/src/components/HomepageFeatures.js index c45c7c3f..a0cce469 100644 --- a/website/src/components/HomepageFeatures.js +++ b/website/src/components/HomepageFeatures.js @@ -4,68 +4,54 @@ import styles from "./HomepageFeatures.module.css"; import Link from "@docusaurus/core/lib/client/exports/Link"; import {customFields} from "../../docusaurus.config" -const docsUrl = customFields.docsUrl -const apiDocsUrl = "https://app.swaggerhub.com/apis/weso/RDFShape" +const {scalaDocUrl, apiDocsUrl} = customFields -const FeatureList = [ - { - title: "Scaladoc", - Svg: require("../../static/img/scala-icon.svg").default, - description: ( - <> - Check out the automatically generated Scaladoc, up to date with our latest stable - build - - ), - link: docsUrl - }, - { - title: "Web documentation", - Svg: require("../../static/img/webdocs.svg").default, - description: ( - <> - Friendly guides and short articles related to the project and the usage of the API - - ), - link: "/docs" - }, - { - title: "API Docs", - Svg: require("../../static/img/rocket.svg").default, - description: ( - <> - Browse the API Docs and test the API directly in Swagger Hub without having to learn about the - underlying infrastructure - - ), - link: apiDocsUrl - }, -]; +const FeatureList = [{ + title: "Scaladoc", + Svg: require("../../static/img/scala-icon.svg").default, + description: (<> + Check out the automatically generated Scaladoc, up to date with our + latest stable + build + ), + link: scalaDocUrl +}, { + title: "Web documentation", + Svg: require("../../static/img/webdocs.svg").default, + description: (<> + Friendly guides and short articles related to the project and the usage + of the API + ), + link: "/docs" +}, { + title: "API Docs", + Svg: require("../../static/img/rocket.svg").default, + description: (<> + Browse the API Docs and test the API directly in Swagger Hub without + having to learn about the + underlying infrastructure + ), + link: apiDocsUrl +},]; function Feature({Svg, title, description, link}) { - return ( -
-
- -
-
-

{title}

-

{description}

-
+ return (
+
+
- ); +
+

{title}

+

{description}

+
+
); } export default function HomepageFeatures() { - return ( -
-
-
- {FeatureList.map((props, idx) => ( - - ))} -
+ return (
+
+
+ {FeatureList.map((props, idx) => ())}
-
- ); +
+
); } From 8178ede4da7835374c4be882fcaa0b859b17d10b Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 3 Mar 2022 14:16:25 +0100 Subject: [PATCH 15/50] Minor changes --- .../api/routes/schema/logic/operations/SchemaValidate.scala | 2 +- .../server/api/routes/schema/logic/trigger/TriggerMode.scala | 2 +- .../api/routes/schema/logic/trigger/TriggerShapeMap.scala | 4 ++-- .../schema/logic/trigger/TriggerTargetDeclarations.scala | 4 ++-- .../scala/es/weso/rdfshape/server/api/swagger/package.scala | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala index 7981c1d7..bee63f4f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala @@ -111,7 +111,7 @@ private[api] object SchemaValidate extends LazyLogging { case other => IO.raiseError( new RuntimeException( - s"Unexpected validation trigger (${other._type})" + s"Unexpected validation trigger (${other.`type`})" ) ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 640f895f..31b28966 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -17,7 +17,7 @@ trait TriggerMode { /** Corresponding type of this adapter inside [[ValidationTrigger]] */ - val _type: TriggerModeType + val `type`: TriggerModeType /** Optionally, the [[Data]] being validated in the validation using this trigger */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala index 2ae7e45c..f8aeca51 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala @@ -35,7 +35,7 @@ sealed case class TriggerShapeMap( * @return A ShapeMap instance used by WESO libraries in validation */ lazy val innerShapeMap: Either[String, ShapeMapW] = shapeMap.innerShapeMap - override val _type: TriggerModeType = TriggerModeType.SHAPEMAP + override val `type`: TriggerModeType = TriggerModeType.SHAPEMAP // Fetched shapeMap successfully assume( @@ -107,7 +107,7 @@ private[api] object TriggerShapeMap override implicit val encode: Encoder[TriggerShapeMap] = (tsm: TriggerShapeMap) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("shapeMap", tsm.shapeMap.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala index 208a0f99..eb1cd142 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala @@ -18,7 +18,7 @@ sealed case class TriggerTargetDeclarations private ( ) extends TriggerMode with LazyLogging { - override val _type: TriggerModeType = + override val `type`: TriggerModeType = TriggerModeType.TARGET_DECLARATIONS override def getValidationTrigger: ValidationTrigger = @@ -38,7 +38,7 @@ private[api] object TriggerTargetDeclarations override implicit val encode: Encoder[TriggerTargetDeclarations] = (tsm: TriggerTargetDeclarations) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala index 8d984086..73237859 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -114,7 +114,7 @@ package object swagger { ), host = "api.rdfshape.weso.es".some, basePath = s"/$api".some, // All routes are prefixed by "/api" - schemes = List(Scheme.HTTPS), + schemes = List(Scheme.HTTP, Scheme.HTTPS), consumes = List("application/json"), produces = List("text/plain; charset=utf-8", "application/json") ) From 55a9ada714474ba06fdc112009d9d6afe1a1d287 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 3 Mar 2022 14:16:25 +0100 Subject: [PATCH 16/50] Minor changes --- .../api/routes/schema/logic/operations/SchemaValidate.scala | 2 +- .../server/api/routes/schema/logic/trigger/TriggerMode.scala | 2 +- .../api/routes/schema/logic/trigger/TriggerShapeMap.scala | 4 ++-- .../schema/logic/trigger/TriggerTargetDeclarations.scala | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala index 7981c1d7..bee63f4f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala @@ -111,7 +111,7 @@ private[api] object SchemaValidate extends LazyLogging { case other => IO.raiseError( new RuntimeException( - s"Unexpected validation trigger (${other._type})" + s"Unexpected validation trigger (${other.`type`})" ) ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 640f895f..31b28966 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -17,7 +17,7 @@ trait TriggerMode { /** Corresponding type of this adapter inside [[ValidationTrigger]] */ - val _type: TriggerModeType + val `type`: TriggerModeType /** Optionally, the [[Data]] being validated in the validation using this trigger */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala index 2ae7e45c..f8aeca51 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala @@ -35,7 +35,7 @@ sealed case class TriggerShapeMap( * @return A ShapeMap instance used by WESO libraries in validation */ lazy val innerShapeMap: Either[String, ShapeMapW] = shapeMap.innerShapeMap - override val _type: TriggerModeType = TriggerModeType.SHAPEMAP + override val `type`: TriggerModeType = TriggerModeType.SHAPEMAP // Fetched shapeMap successfully assume( @@ -107,7 +107,7 @@ private[api] object TriggerShapeMap override implicit val encode: Encoder[TriggerShapeMap] = (tsm: TriggerShapeMap) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("shapeMap", tsm.shapeMap.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala index 208a0f99..eb1cd142 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala @@ -18,7 +18,7 @@ sealed case class TriggerTargetDeclarations private ( ) extends TriggerMode with LazyLogging { - override val _type: TriggerModeType = + override val `type`: TriggerModeType = TriggerModeType.TARGET_DECLARATIONS override def getValidationTrigger: ValidationTrigger = @@ -38,7 +38,7 @@ private[api] object TriggerTargetDeclarations override implicit val encode: Encoder[TriggerTargetDeclarations] = (tsm: TriggerTargetDeclarations) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) From 176cd3a7ea8ac0f929ad11caf49e61c71740045e Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 3 Mar 2022 14:16:25 +0100 Subject: [PATCH 17/50] Minor changes --- .../api/routes/schema/logic/operations/SchemaValidate.scala | 2 +- .../api/routes/schema/logic/trigger/TriggerMode.scala | 2 +- .../api/routes/schema/logic/trigger/TriggerShapeMap.scala | 4 ++-- .../schema/logic/trigger/TriggerTargetDeclarations.scala | 4 ++-- website/sidebars.js | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala index 7981c1d7..bee63f4f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaValidate.scala @@ -111,7 +111,7 @@ private[api] object SchemaValidate extends LazyLogging { case other => IO.raiseError( new RuntimeException( - s"Unexpected validation trigger (${other._type})" + s"Unexpected validation trigger (${other.`type`})" ) ) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 640f895f..31b28966 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -17,7 +17,7 @@ trait TriggerMode { /** Corresponding type of this adapter inside [[ValidationTrigger]] */ - val _type: TriggerModeType + val `type`: TriggerModeType /** Optionally, the [[Data]] being validated in the validation using this trigger */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala index 2ae7e45c..f8aeca51 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerShapeMap.scala @@ -35,7 +35,7 @@ sealed case class TriggerShapeMap( * @return A ShapeMap instance used by WESO libraries in validation */ lazy val innerShapeMap: Either[String, ShapeMapW] = shapeMap.innerShapeMap - override val _type: TriggerModeType = TriggerModeType.SHAPEMAP + override val `type`: TriggerModeType = TriggerModeType.SHAPEMAP // Fetched shapeMap successfully assume( @@ -107,7 +107,7 @@ private[api] object TriggerShapeMap override implicit val encode: Encoder[TriggerShapeMap] = (tsm: TriggerShapeMap) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("shapeMap", tsm.shapeMap.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala index 208a0f99..eb1cd142 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerTargetDeclarations.scala @@ -18,7 +18,7 @@ sealed case class TriggerTargetDeclarations private ( ) extends TriggerMode with LazyLogging { - override val _type: TriggerModeType = + override val `type`: TriggerModeType = TriggerModeType.TARGET_DECLARATIONS override def getValidationTrigger: ValidationTrigger = @@ -38,7 +38,7 @@ private[api] object TriggerTargetDeclarations override implicit val encode: Encoder[TriggerTargetDeclarations] = (tsm: TriggerTargetDeclarations) => Json.obj( - ("type", tsm._type.asJson), + ("type", tsm.`type`.asJson), ("data", tsm.data.asJson), ("schema", tsm.schema.asJson) ) diff --git a/website/sidebars.js b/website/sidebars.js index 755461d4..c36aab12 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -1,6 +1,6 @@ -import {customFields} from "./docusaurus.config" - -const {scalaDocUrl, apiDocsUrl} = customFields +// Cannot be imported outside of module +const scalaDocUrl = "https://www.weso.es/rdfshape-api/api/es/weso/rdfshape/" +const apiDocsUrl = "https://app.swaggerhub.com/apis-docs/weso/RDFShape/" module.exports = { // Generate a sidebar from the docs folder structure From b88ff5856ecacf5a886153eb0a229fb2d82de486 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 3 Mar 2022 15:36:24 +0100 Subject: [PATCH 18/50] 0.2.3 --- build.sbt | 42 +++++++++++++++++++++--------------------- version.sbt | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build.sbt b/build.sbt index d9fdb82a..3256621e 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,4 @@ +import java.net.URL import scala.language.postfixOps // Centralized control of the application's core settings // See version in version.sbt @@ -162,27 +163,26 @@ lazy val publishSettings = Seq( "scm:git:git@github.com:weso/rdfshape-api.git" ) ), - pomExtra := - - WESO - WESO Research Group - https://github.com/weso - - - labra - Jose Emilio Labra Gayo - http://www.example.com/jdoe - WESO - https://github.com/weso - - - ulitol - Eduardo Ulibarri Toledo - http://www.example.com/jdoe - WESO - https://github.com/weso - - , + developers := List( + Developer( + "WESO", + "WESO Research Group", + "info@weso.es", + new URL("https://github.com/weso") + ), + Developer( + "labra", + "Jose Emilio Labra Gayo", + "labra@uniovi.es", + new URL("https://labra.weso.es/") + ), + Developer( + "ulitol", + "Eduardo Ulibarri Toledo", + "eduulitol@protonmail.com", + new URL("https://github.com/ulitol97") + ) + ), publishMavenStyle := true // generate POM, not ivy ) // Aggregate resolver settings passed down to modules to resolve dependencies diff --git a/version.sbt b/version.sbt index 938ed413..e4f2c882 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.2" +ThisBuild / version := "0.2.3" From 5d6b7faa8d17c4abf80254c236ae293224636104 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 3 Mar 2022 17:51:19 +0100 Subject: [PATCH 19/50] Updated dependencies and fixed schema conversion issue --- .github/workflows/ci.yml | 10 +++++----- build.sbt | 17 +++++++++++------ .../schema/logic/operations/SchemaConvert.scala | 2 +- version.sbt | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5302db6..9a97a02f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.6] + scala: [2.13.8] java: [adopt@1.11] runs-on: ${{ matrix.os }} steps: @@ -70,7 +70,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.6] + scala: [2.13.8] java: [adopt@1.11] runs-on: ${{ matrix.os }} steps: @@ -96,12 +96,12 @@ jobs: ~/Library/Caches/Coursier/v1 key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Download target directories (2.13.6) + - name: Download target directories (2.13.8) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }} + name: target-${{ matrix.os }}-2.13.8-${{ matrix.java }} - - name: Inflate target directories (2.13.6) + - name: Inflate target directories (2.13.8) run: | tar xf targets.tar rm targets.tar diff --git a/build.sbt b/build.sbt index 3256621e..d8328b64 100644 --- a/build.sbt +++ b/build.sbt @@ -8,8 +8,8 @@ Global / cancelable := true Global / apiURL := Some(url("https://github.com/weso/rdfshape-api")) Global / scalaVersion := scala213 -lazy val scala212 = "2.12.13" -lazy val scala213 = "2.13.6" +lazy val scala212 = "2.12.15" +lazy val scala213 = "2.13.8" lazy val supportedScalaVersions = List(scala213) // Lint-excluded keys @@ -239,6 +239,11 @@ lazy val rdfshape = project libraryDependencies ++= Seq( logbackClassic, scalaLogging + ), + excludeDependencies ++= Seq( + // Exclude slf4j backend if present in other dependencies to avoid + // warnings/conflicts with logback + ExclusionRule("org.slf4j", "slf4j-simple") ) ) // Server project in /modules: server @@ -283,7 +288,7 @@ lazy val server = project // "sbt-github-actions" plugin settings lazy val JavaCIVersion = "adopt@1.11" -lazy val ScalaCIVersion = "2.13.6" +lazy val ScalaCIVersion = scala213 ThisBuild / githubWorkflowJavaVersions := Seq(JavaCIVersion) ThisBuild / githubWorkflowScalaVersions := Seq(ScalaCIVersion) @@ -320,10 +325,10 @@ lazy val munitEffectVersion = "1.0.7" lazy val plantumlVersion = "1.2021.14" lazy val scalajVersion = "2.4.2" // WESO dependencies -lazy val shaclexVersion = "0.1.103-ult_0" -lazy val shexsVersion = "0.1.108-ult_0" +lazy val shaclexVersion = "0.2.0" +lazy val shexsVersion = "0.2.0" lazy val umlShaclexVersion = "0.0.82" -lazy val wesoUtilsVersion = "0.2.2" +lazy val wesoUtilsVersion = "0.2.4" // Dependency modules lazy val http4sDsl = "org.http4s" %% "http4s-dsl" % http4sVersion lazy val http4sBlazeServer = diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala index ed95dab7..7035083d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/SchemaConvert.scala @@ -150,7 +150,7 @@ private[api] object SchemaConvert extends LazyLogging { content = rawOutputSchema.trim, format = targetFormat, engine = schemaOut, - source = inputSchema.source + source = SchemaSource.TEXT ) } yield SchemaConvert( inputSchema = inputSchema, diff --git a/version.sbt b/version.sbt index e4f2c882..fad06c04 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.3" +ThisBuild / version := "0.2.4" From 8a416e1b66c9d9672b12ef8395785d234c359565 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Wed, 16 Mar 2022 20:14:47 +0100 Subject: [PATCH 20/50] Enhanced support for non-Wikidata wikibases. HTTP client now follows redirects --- .../logic/model/wikibase/Wikibase.scala | 12 ++ .../wikibase/objects/WikibaseObject.scala | 10 -- .../objects/wikibase/WikibaseEntity.scala | 18 +++ .../objects/wikibase/WikibaseObject.scala | 37 +++++ .../objects/wikibase/WikibaseProperty.scala | 18 +++ .../objects/wikibase/WikibaseSchema.scala | 18 +++ .../objects/wikidata/WikidataEntity.scala | 11 +- .../objects/wikidata/WikidataObject.scala | 24 +-- .../objects/wikidata/WikidataProperty.scala | 12 +- .../objects/wikidata/WikidataSchema.scala | 12 +- .../logic/operations/WikibaseOperation.scala | 2 +- .../operations/get/WikibaseGetOperation.scala | 2 +- .../languages/WikibaseLanguages.scala | 2 +- .../query/WikibaseQueryOperation.scala | 2 +- .../schema/WikibaseSchemaContent.scala | 2 +- .../schema/WikibaseSchemaExtract.scala | 107 ++++++------ .../schema/WikibaseSchemaValidate.scala | 153 +++++++++--------- .../schema/WikibaseSheXerExtract.scala | 94 ++++++----- .../search/WikibaseSearchOperation.scala | 2 +- .../wikibase/service/WikibaseService.scala | 24 +-- .../server/api/utils/OptEitherF.scala | 3 +- .../exceptions/WikibaseServiceException.scala | 9 +- .../utils/networking/NetworkingUtils.scala | 33 +++- 23 files changed, 359 insertions(+), 248 deletions(-) delete mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/WikibaseObject.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseEntity.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseObject.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseProperty.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseSchema.scala diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala index 1c8f9a40..48acd167 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala @@ -33,6 +33,18 @@ private[api] case class Wikibase( */ def schemaEntityUri(schema: String): Uri = baseUrl / "wiki" / "Special:EntitySchemaText" / schema + + /** Return whether if tow wikibase instances are the same or not + * + * @param other Other item being compared + * @return True if the wikibase instances share a base URL, false otherwise + */ + override def equals(other: Any): Boolean = { + other match { + case wb: Wikibase => baseUrl == wb.baseUrl + case _ => false + } + } } object Wikibase { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/WikibaseObject.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/WikibaseObject.scala deleted file mode 100644 index 31a0529d..00000000 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/WikibaseObject.scala +++ /dev/null @@ -1,10 +0,0 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects - -import org.http4s.Uri - -/** General class representing any object (entity, schema...) living in a - * wikibase instance - * - * @param entityUri URL where the object data can be found - */ -private[api] class WikibaseObject(val entityUri: Uri) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseEntity.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseEntity.scala new file mode 100644 index 00000000..4c75f882 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseEntity.scala @@ -0,0 +1,18 @@ +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase + +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import org.http4s.Uri + +/** Data class representing a Wikidata entity + */ +class WikibaseEntity( + override val wikibase: Wikibase, + override val entityUri: Uri +) extends WikibaseObject(wikibase, entityUri) { + + override val localName: String = + entityUri.renderString.split("/").last.stripSuffix("#") + + override val contentUri: Uri = + wikibase.baseUrl / "wiki" / "Special:EntityData" / (localName + ".ttl") +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseObject.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseObject.scala new file mode 100644 index 00000000..45d2274f --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseObject.scala @@ -0,0 +1,37 @@ +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase + +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataObject +import es.weso.rdfshape.server.utils.networking.NetworkingUtils +import org.http4s.Uri + +/** General class representing any object (entity, schema...) living in a + * wikibase instance. + * Unlike [[WikidataObject]], where Wikidata is the target wikibase, + * here a wikibase must be provided for context + * + * @param wikibase Wikibase where the object resides + * @param entityUri URL where the object data can be found + * + * @note Currently limited to Entities/properties + */ +abstract private[api] class WikibaseObject( + val wikibase: Wikibase, + val entityUri: Uri +) { + + /** Either the raw contents of this object or the error + * occurred while retrieving them + */ + lazy val contents: Either[String, String] = + NetworkingUtils.getUrlContents(contentUri.renderString) + + /** Short name or identifier of the entity, e.g.: Q123, + * normally this is the last part of [[entityUri]] + */ + val localName: String + + /** URL where the entity data can be found in raw form + */ + val contentUri: Uri +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseProperty.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseProperty.scala new file mode 100644 index 00000000..e45fba72 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseProperty.scala @@ -0,0 +1,18 @@ +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase + +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import org.http4s.Uri + +/** Data class representing a Wikidata entity + */ +class WikibaseProperty( + override val wikibase: Wikibase, + override val entityUri: Uri +) extends WikibaseObject(wikibase, entityUri) { + + override val localName: String = + entityUri.renderString.split(":").last.stripSuffix("#") + + override val contentUri: Uri = + wikibase.baseUrl / "wiki" / "Special:EntityData" / (localName + ".ttl") +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseSchema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseSchema.scala new file mode 100644 index 00000000..f24fd06a --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseSchema.scala @@ -0,0 +1,18 @@ +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase + +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import org.http4s.Uri + +/** Data class representing a Wikidata entity + */ +class WikibaseSchema( + override val wikibase: Wikibase, + override val entityUri: Uri +) extends WikibaseObject(wikibase, entityUri) { + + override val localName: String = + entityUri.renderString.split(":").last.stripSuffix("#") + + override val contentUri: Uri = + wikibase.baseUrl / "wiki" / "Special:EntitySchemaText" / localName +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataEntity.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataEntity.scala index 595b26fa..b4304627 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataEntity.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataEntity.scala @@ -1,7 +1,8 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity import org.http4s.Uri -import org.http4s.implicits.http4sLiteralsSyntax import scala.util.matching.Regex @@ -9,16 +10,12 @@ import scala.util.matching.Regex */ case class WikidataEntity( override val entityUri: Uri -) extends WikidataObject(entityUri) { +) extends WikibaseEntity(Wikidata, entityUri) + with WikidataObject { override val wikidataRegex: Regex = "(http(s)?://www.wikidata.org/entity/(.+))|(http(s)?://www.wikidata.org/wiki/(.+))".r checkUri() - override val localName: String = - entityUri.renderString.split("/").last.stripSuffix("#") - - override val contentUri: Uri = - uri"https://www.wikidata.org" / "wiki" / "Special:EntityData" / (localName + ".ttl") } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataObject.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataObject.scala index 36a0b900..d2d664d0 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataObject.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataObject.scala @@ -1,34 +1,25 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.WikibaseObject -import es.weso.rdfshape.server.utils.networking.NetworkingUtils import org.http4s.Uri import scala.util.matching.Regex -/** Abstract class representing any object (entity, schema...) living in - * Wikidata +/** Trait defining several utilities and guidelines for wikibase items + * residing in Wikidata */ -abstract class WikidataObject( - override val entityUri: Uri -) extends WikibaseObject(entityUri) { +trait WikidataObject { - /** Either the raw contents of this object or the error - * occurred while retrieving them + /** Uri unique to the wikidata object being identified */ - lazy val contents: Either[String, String] = - NetworkingUtils.getUrlContents(contentUri.renderString) - - /** Short name or identifier of the entity, e.g.: Q123, - * normally this is the last part of [[entityUri]] - */ - val localName: String + val entityUri: Uri /** URL where the entity data can be found in raw form */ val contentUri: Uri /** Regular expression used to recognize wikidata objects of the required type + * When using Wikidata, we know the format of the URIs we expect, so we can + * define a regex to notice if the input URI is a valid Wikidata item or not */ val wikidataRegex: Regex @@ -39,4 +30,5 @@ abstract class WikidataObject( wikidataRegex.matches(entityUri.renderString), s"Uri '${entityUri.renderString}' does not comply with '${wikidataRegex.regex}'" ) + } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataProperty.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataProperty.scala index 7f01b4d9..eaf87aec 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataProperty.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataProperty.scala @@ -1,7 +1,8 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseProperty import org.http4s.Uri -import org.http4s.implicits.http4sLiteralsSyntax import scala.util.matching.Regex @@ -9,16 +10,11 @@ import scala.util.matching.Regex */ case class WikidataProperty( override val entityUri: Uri -) extends WikidataObject(entityUri) { +) extends WikibaseProperty(Wikidata, entityUri) + with WikidataObject { override val wikidataRegex: Regex = "http(s)?://www.wikidata.org/wiki/Property:(.+)".r checkUri() - - override val localName: String = - entityUri.renderString.split(":").last.stripSuffix("#") - - override val contentUri: Uri = - uri"https://www.wikidata.org" / "wiki" / "Special:EntityData" / (localName + ".ttl") } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataSchema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataSchema.scala index 7acb6ea8..a3d9a61b 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataSchema.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataSchema.scala @@ -1,7 +1,8 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseSchema import org.http4s.Uri -import org.http4s.implicits.http4sLiteralsSyntax import scala.util.matching.Regex @@ -9,16 +10,11 @@ import scala.util.matching.Regex */ case class WikidataSchema( override val entityUri: Uri -) extends WikidataObject(entityUri) { +) extends WikibaseSchema(Wikidata, entityUri) + with WikidataObject { override val wikidataRegex: Regex = "http(s)?://www.wikidata.org/wiki/EntitySchema:(.+)".r checkUri() - - override val localName: String = - entityUri.renderString.split(":").last.stripSuffix("#") - - override val contentUri: Uri = - uri"https://www.wikidata.org" / "wiki" / "Special:EntitySchemaText" / localName } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala index 17a48ca5..0e069bb6 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala @@ -121,7 +121,7 @@ private[operations] object WikibaseOperation { * of any wikibase instance */ val wikidataOnlyMessage = - "Cannot extract schemas from wikibase instances other than Wikidata" + "Cannot perform this operation on wikibase instances other than Wikidata" /** Dummy success message */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/get/WikibaseGetOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/get/WikibaseGetOperation.scala index da816d68..b7098a14 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/get/WikibaseGetOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/get/WikibaseGetOperation.scala @@ -63,7 +63,7 @@ private[wikibase] class WikibaseGetOperation( for { eitherResponse <- super.performRequest[Json]() result <- eitherResponse match { - case Left(err) => IO.raiseError(WikibaseServiceException(err)) + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) case Right(jsonResults) => IO { WikibaseOperationResult( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/languages/WikibaseLanguages.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/languages/WikibaseLanguages.scala index 461620de..b0e669a8 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/languages/WikibaseLanguages.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/languages/WikibaseLanguages.scala @@ -50,7 +50,7 @@ private[wikibase] case class WikibaseLanguages( for { eitherResponse <- super.performRequest[Json]() result <- eitherResponse.flatMap(convertLanguages) match { - case Left(err) => IO.raiseError(WikibaseServiceException(err)) + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) case Right(jsonResults) => IO { WikibaseOperationResult( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/query/WikibaseQueryOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/query/WikibaseQueryOperation.scala index 1863bbaf..b7e5a7fd 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/query/WikibaseQueryOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/query/WikibaseQueryOperation.scala @@ -49,7 +49,7 @@ private[wikibase] case class WikibaseQueryOperation( for { eitherResponse <- super.performRequest[Json]() result <- eitherResponse match { - case Left(err) => IO.raiseError(WikibaseServiceException(err)) + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) case Right(jsonResults) => IO { WikibaseOperationResult( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaContent.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaContent.scala index ea99377f..eb9ca857 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaContent.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaContent.scala @@ -41,7 +41,7 @@ private[wikibase] case class WikibaseSchemaContent( eitherResponse <- super .performRequest[String]() result <- eitherResponse match { - case Left(err) => IO.raiseError(WikibaseServiceException(err)) + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) case Right(jsonResults) => IO { WikibaseOperationResult( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala index 1218e1f7..1295e19f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala @@ -7,8 +7,8 @@ import es.weso.rdf.nodes.IRI import es.weso.rdfshape.server.api.format.dataFormats.Turtle import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.ShExC import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataEntity -import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperation.wikidataOnlyMessage import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.{ WikibaseOperation, WikibaseOperationDetails, @@ -50,69 +50,68 @@ private[wikibase] case class WikibaseSchemaExtract( override def performOperation: IO[WikibaseOperationResult] = { val entityUri = operationData.payload - // Raise error if target is not Wikidata - if(targetWikibase != Wikidata) - IO.raiseError(WikibaseServiceException(wikidataOnlyMessage)) - else { - val tryResult = for { - // Get the Wikidata item info from the URI submitted as payload - wdEntity <- Try { - WikidataEntity(Uri.unsafeFromString(entityUri)) - } - eitherResult = - for { - - // Raw RDF of the Wikidata entity as String - strRdf <- io2es(client.expect[String](wdEntity.contentUri)) + // Try to extract even from wikibase instances different from wikidata. + val tryResult = for { + // Get the Wikidata item info from the URI submitted as payload + wdEntity <- Try { + val schemaUri = Uri.unsafeFromString(entityUri) + // Build the target wikibase, as sent by the user + if(targetWikibase == Wikidata) WikidataEntity(schemaUri) + else new WikibaseEntity(targetWikibase, schemaUri) + } + eitherResult = + for { + // Raw RDF of the Wikidata entity as String + strRdf <- io2es(client.expect[String](wdEntity.contentUri)) - // Infer schema magic - eitherInferred <- io2es( - RDFAsJenaModel - .fromString(strRdf, Turtle.name) - .flatMap( - _.use(rdf => - SchemaInfer.runInferSchema( - rdf, - RDFNodeSelector(IRI(entityUri)), - Schemas.shEx.name, - IRI(s"http://example.org/Shape_${wdEntity.localName}"), - InferOptions.defaultOptions.copy(maxFollowOn = 3) - ) + // Infer schema magic + eitherInferred <- io2es( + RDFAsJenaModel + .fromString(strRdf, Turtle.name) + .flatMap( + _.use(rdf => + SchemaInfer.runInferSchema( + rdf, + RDFNodeSelector(IRI(entityUri)), + Schemas.shEx.name, + IRI(s"http://example.org/Shape_${wdEntity.localName}"), + InferOptions.defaultOptions.copy(maxFollowOn = 3) ) ) - ) - // Tuple with the infer results - pair <- either2es[(SchemaW, ResultShapeMap)](eitherInferred) + ) + ) + // Tuple with the infer results + pair <- either2es[(SchemaW, ResultShapeMap)](eitherInferred) - // Form the schema in "ShExC format that will be part of the result - shExCStr <- io2es({ - val (schema, _) = pair - schema.serialize(ShExC.name.toUpperCase) - }) + // Form the schema in "ShExC format that will be part of the result + shExCStr <- io2es({ + val (schema, _) = pair + schema.serialize(ShExC.name.toUpperCase) + }) - } yield WikibaseOperationResult( - operationData = operationData, - wikibase = targetWikibase, - result = Json.fromFields( - List( - ("entity", Json.fromString(entityUri)), - ("schema", Json.fromString(shExCStr)) - ) + } yield WikibaseOperationResult( + operationData = operationData, + wikibase = targetWikibase, + result = Json.fromFields( + List( + ("entity", Json.fromString(entityUri)), + ("schema", Json.fromString(shExCStr)) ) ) + ) - } yield eitherResult.value.flatMap { - case Left(err) => IO.raiseError(WikibaseServiceException(err)) - case Right(value) => IO.pure(value) - } + } yield eitherResult.value.flatMap { + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) + case Right(value) => IO.pure(value) + } - // Return an error or the contained value - tryResult match { - case Failure(exception) => - IO.raiseError(WikibaseServiceException(exception.getMessage)) - case Success(value) => value - } + // Return an error or the contained value + tryResult match { + case Failure(exception) => + IO.raiseError(new WikibaseServiceException(exception)) + case Success(value) => value } + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala index 1b20919f..a597e055 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala @@ -17,8 +17,8 @@ import es.weso.rdfshape.server.api.routes.shapemap.logic.{ ShapeMapSource } import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataEntity -import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperation.wikidataOnlyMessage import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.{ WikibaseOperation, WikibaseOperationDetails, @@ -61,92 +61,93 @@ private[wikibase] case class WikibaseSchemaValidate( val entityUris = operationData.payload.split(entitiesSeparator) - // Raise error if target is not Wikidata - if(targetWikibase != Wikidata) - IO.raiseError(WikibaseServiceException(wikidataOnlyMessage)) - else { - val tryResult = for { - // Get the Wikidata items info from the URI submitted as payload - wdEntities <- Try { + // Attempt the validation even if the target is not Wikidata + + val tryResult = for { + // Get the Wikidata items info from the URI submitted as payload + wdEntities <- Try { + if(targetWikibase == Wikidata) entityUris.map(it => WikidataEntity(Uri.unsafeFromString(it))) - } - // Create the data to be validated, using Wikidata to get the URL - // to the Turtle contents - /* Data will be a compound of several simple data fetched from each - * entity */ + else + entityUris.map(it => + new WikibaseEntity(targetWikibase, Uri.unsafeFromString(it)) + ) + } + // Create the data to be validated, using Wikidata to get the URL + // to the Turtle contents + /* Data will be a compound of several simple data fetched from each entity */ - inputData = DataCompound( - wdEntities - .map(entity => - DataSingle( - content = entity.contentUri.renderString, - format = Turtle, - inference = NONE, - source = DataSource.URL - ) + inputData = DataCompound( + wdEntities + .map(entity => + DataSingle( + content = entity.contentUri.renderString, + format = Turtle, + inference = NONE, + source = DataSource.URL ) - .toList - ) + ) + .toList + ) - /* Get the schema model needed for validation: already passed to the - * class */ + /* Get the schema model needed for validation: already passed to the class */ - // Perform validation - eitherValidationResults = for { - // Create your trigger mode: ShEx with basic Shapemap - // For each entity, add a start point - shapeMapModel <- wdEntities.foldLeft(ShapeMapW.empty.asRight[String])( - (sm, entity) => { - val entityUri = IRI(entity.entityUri.renderString) - sm.flatMap(_.add(entityUri, Start)) - } - ) - shapeMapFinalModel <- shapeMapModel.serialize(Compact.name) - trigger = TriggerShapeMap( - shapeMap = ShapeMap( - content = shapeMapFinalModel, - nodesPrefixMap = shapeMapModel.nodesPrefixMap.addPrefixMap( - Wikidata.wikidataPrefixMap - ), - shapesPrefixMap = shapeMapModel.shapesPrefixMap.addPrefixMap( - Wikidata.wikidataPrefixMap - ), - format = Compact, - source = ShapeMapSource.TEXT + // Perform validation + eitherValidationResults = for { + // Create your trigger mode: ShEx with basic Shapemap + // For each entity, add a start point + shapeMapModel <- wdEntities.foldLeft(ShapeMapW.empty.asRight[String])( + (sm, entity) => { + val entityUri = IRI(entity.entityUri.renderString) + sm.flatMap(_.add(entityUri, Start)) + } + ) + shapeMapFinalModel <- shapeMapModel.serialize(Compact.name) + trigger = TriggerShapeMap( + shapeMap = ShapeMap( + content = shapeMapFinalModel, + nodesPrefixMap = shapeMapModel.nodesPrefixMap.addPrefixMap( + Wikidata.wikidataPrefixMap ), - data = Some(inputData), - schema = Some(schema) - ) - result = SchemaValidate.schemaValidate( - inputData, - schema, - trigger - ) - } yield result - } yield eitherValidationResults match { - case Left(err) => IO.raiseError(WikibaseServiceException(err)) - case Right(value) => value - } + shapesPrefixMap = shapeMapModel.shapesPrefixMap.addPrefixMap( + Wikidata.wikidataPrefixMap + ), + format = Compact, + source = ShapeMapSource.TEXT + ), + data = Some(inputData), + schema = Some(schema) + ) + result = SchemaValidate.schemaValidate( + inputData, + schema, + trigger + ) + } yield result + } yield eitherValidationResults match { + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) + case Right(value) => value + } - // Return an error or the contained value wrapped into a Result object - tryResult match { - case Failure(exception) => - IO.raiseError(WikibaseServiceException(exception.getMessage)) - case Success(value) => - value.map(validationResults => - WikibaseOperationResult( - operationData = operationData, - wikibase = targetWikibase, - result = Json.fromFields( - List( - ("entity", entityUris.asJson), - ("result", validationResults.asJson) - ) + // Return an error or the contained value wrapped into a Result object + tryResult match { + case Failure(exception) => + IO.raiseError(new WikibaseServiceException(exception)) + case Success(value) => + value.map(validationResults => + WikibaseOperationResult( + operationData = operationData, + wikibase = targetWikibase, + result = Json.fromFields( + List( + ("entity", entityUris.asJson), + ("result", validationResults.asJson) ) ) ) - } + ) } + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala index 15f34577..eedc3342 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala @@ -7,6 +7,7 @@ import es.weso.rdfshape.server.api.format.dataFormats.{DataFormat, Turtle} import es.weso.rdfshape.server.api.routes.data.logic.DataSource import es.weso.rdfshape.server.api.routes.data.logic.DataSource.DataSource import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataEntity import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.schema.WikibaseSheXerExtract.ShexerParams.{ wikidataNamespaceQualifiers, @@ -32,6 +33,8 @@ import org.http4s.client.Client import org.http4s.headers.{`Content-Type` => ContentType} import org.http4s.implicits.http4sLiteralsSyntax +import scala.util.{Failure, Success, Try} + /** Given an input [[WikibaseOperationDetails]], attempt to extract an schema (ShEx) * from a given entity using SheXer. * @@ -56,18 +59,20 @@ private[wikibase] case class WikibaseSheXerExtract( override lazy val targetUri: Uri = uri"" // unused override def performOperation: IO[WikibaseOperationResult] = { - // Raise error if target is not Wikidata - if(targetWikibase != Wikidata) - IO.raiseError( - WikibaseServiceException( - "Cannot extract schemas from wikibase instances other tha Wikidata" - ) - ) - else { + val entityUri = operationData.payload + + val tryResult = for { + // Try to extract even from wikibase instances different from wikidata + // Get the Wikibase item info from the URI submitted as payload + wdEntity <- Try { + val schemaUri = Uri.unsafeFromString(entityUri) + // Build the target wikibase, as sent by the user + if(targetWikibase == Wikidata) WikidataEntity(schemaUri) + else new WikibaseEntity(targetWikibase, schemaUri) + } - // Make the SheXer params by scanning the data sent by the client - val wdEntity = WikidataEntity(Uri.unsafeFromString(operationData.payload)) - val shexerParams = ShexerParams( + // Make the SheXer params by scanning the entity sent by the client + shexerParams = ShexerParams( graph = wdEntity.contentUri.renderString, graphSource = DataSource.URL, endpointGraph = targetWikibase.queryUrl, @@ -75,22 +80,26 @@ private[wikibase] case class WikibaseSheXerExtract( ) // Make the request to SheXer - val finalRequest = request.withEntity[Json](shexerParams.asJson) - val eitherResponse: IO[Either[String, Json]] = for { - response <- performRequest[Json](finalRequest) - } yield response + shexerRequest = request.withEntity[Json](shexerParams.asJson) + shexerResponse = performRequest[Json](shexerRequest) - eitherResponse.flatMap({ - case Left(err) => IO.raiseError(WikibaseServiceException(err)) - case Right(shexerResponse) => - IO { - WikibaseOperationResult( - operationData = operationData, - wikibase = targetWikibase, - result = shexerResponse - ) - } - }) + } yield shexerResponse + + // Pattern match errors + tryResult match { + case Failure(err) => IO.raiseError(new WikibaseServiceException(err)) + case Success(eitherResult) => + eitherResult.flatMap { + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) + case Right(shexerResponse) => + IO { + WikibaseOperationResult( + operationData = operationData, + wikibase = targetWikibase, + result = shexerResponse + ) + } + } } } @@ -121,7 +130,7 @@ private[wikibase] object WikibaseSheXerExtract { * @return */ def mkShexerShapemap( - entity: WikidataEntity, + entity: WikibaseEntity, varName: String = "userEntity" ): String = s"SPARQL 'SELECT DISTINCT ?$varName WHERE { VALUES ?$varName { wd:${entity.localName} } }'@<$varName> " @@ -218,22 +227,6 @@ private[wikibase] object WikibaseSheXerExtract { //noinspection HttpUrlsUsage object ShexerParams { - /** [[Uri]] representing the property "rdf:type" - */ - private val rdfTypeProp = - uri"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" - - /** [[Uri]] representing Wikidata's "instance of" property - * - * @see [[https://www.wikidata.org/wiki/Property:P31]] - */ - private val wikidataProp31: Uri = - uri"http://www.wikidata.org/prop/direct/P31" - - private val wikidataNamespaceQualifiers = List( - uri"http://www.wikidata.org/prop/" - ) - /** Encoder to transform [[ShexerParams]] instances to JSON to be sent * in requests */ @@ -321,5 +314,20 @@ private[wikibase] object WikibaseSheXerExtract { Json.fromFields(baseParams).deepDropNullValues } + /** [[Uri]] representing the property "rdf:type" + */ + private val rdfTypeProp = + uri"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" + + /** [[Uri]] representing Wikidata's "instance of" property + * + * @see [[https://www.wikidata.org/wiki/Property:P31]] + */ + private val wikidataProp31: Uri = + uri"http://www.wikidata.org/prop/direct/P31" + private val wikidataNamespaceQualifiers = List( + uri"http://www.wikidata.org/prop/" + ) + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala index 40dfaadf..885bbf55 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchOperation.scala @@ -68,7 +68,7 @@ private[wikibase] abstract class WikibaseSearchOperation( for { eitherResponse <- super.performRequest[Json]() result <- eitherResponse.flatMap(convertEntities) match { - case Left(err) => IO.raiseError(WikibaseServiceException(err)) + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) case Right(jsonResults) => IO { WikibaseOperationResult( diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala index 6b71a422..e1cad108 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala @@ -60,7 +60,7 @@ class WikibaseService(client: Client[IO]) IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => - val op = WikibaseGetLabels(body.operationDetails, client) + val op = WikibaseGetLabels(body.operationDetails, redirectClient) op.performOperation .flatMap(results => Ok(results.asJson)) .handleErrorWith(err => InternalServerError(err.getMessage)) @@ -71,7 +71,7 @@ class WikibaseService(client: Client[IO]) IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => - val op = WikibaseSchemaContent(body.operationDetails, client) + val op = WikibaseSchemaContent(body.operationDetails, redirectClient) op.performOperation .flatMap(results => Ok(results.asJson)) .handleErrorWith(err => InternalServerError(err.getMessage)) @@ -89,21 +89,21 @@ class WikibaseService(client: Client[IO]) ) ^ jsonOf[ IO, WikibaseOperationInput - ] |>> { (searchType: String, body: WikibaseOperationInput) => + ] |>> { (searchType: WikibaseSearchTypes, body: WikibaseOperationInput) => // Check for invalid search parameter if(!WikibaseSearchTypes.basicValues.contains(searchType)) BadRequest( s"Invalid search type '$searchType'. Required one of: ${WikibaseSearchTypes.basicValues.mkString(", ")}" ) else { - // Create the corresponding operations and perform it + // Create the corresponding operation and perform it val searchOperation = searchType match { case WikibaseSearchTypes.ENTITY => - WikibaseSearchEntity(body.operationDetails, client) + WikibaseSearchEntity(body.operationDetails, redirectClient) case WikibaseSearchTypes.PROPERTY => - WikibaseSearchProperty(body.operationDetails, client) + WikibaseSearchProperty(body.operationDetails, redirectClient) case WikibaseSearchTypes.LEXEME => - WikibaseSearchLexeme(body.operationDetails, client) + WikibaseSearchLexeme(body.operationDetails, redirectClient) } searchOperation.performOperation @@ -118,7 +118,7 @@ class WikibaseService(client: Client[IO]) IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => - val op = WikibaseLanguages(body.operationDetails, client) + val op = WikibaseLanguages(body.operationDetails, redirectClient) op.performOperation .flatMap(results => Ok(results.asJson)) .handleErrorWith(err => InternalServerError(err.getMessage)) @@ -129,7 +129,7 @@ class WikibaseService(client: Client[IO]) IO, WikibaseOperationInput ] |>> { body: WikibaseOperationInput => - val op = WikibaseQueryOperation(body.operationDetails, client) + val op = WikibaseQueryOperation(body.operationDetails, redirectClient) op.performOperation .flatMap(results => Ok(results.asJson)) .handleErrorWith(err => InternalServerError(err.getMessage)) @@ -165,7 +165,11 @@ class WikibaseService(client: Client[IO]) WikibaseValidateInput ] |>> { body: WikibaseValidateInput => val op = - WikibaseSchemaValidate(body.operationDetails, client, body.schema) + WikibaseSchemaValidate( + body.operationDetails, + redirectClient, + body.schema + ) op.performOperation .flatMap(results => Ok(results.asJson)) .handleErrorWith(err => InternalServerError(err.getMessage)) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/OptEitherF.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/OptEitherF.scala index 534eb1bf..cd8c3ef8 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/OptEitherF.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/OptEitherF.scala @@ -4,7 +4,6 @@ import cats._ import cats.data._ import cats.effect._ import cats.implicits._ -import es.weso.rdfshape.server.utils.error.exceptions.WikibaseServiceException /** Static utility methods to help work with Optional, Either or IO types */ @@ -58,7 +57,7 @@ object OptEitherF { * @return IO wrapping the Either value if right, an IO error if left */ def ioFromEither[A](either: Either[String, A]): IO[A] = { - either.fold(err => IO.raiseError(WikibaseServiceException(err)), IO.pure) + either.fold(err => IO.raiseError(new RuntimeException(err)), IO.pure) } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/WikibaseServiceException.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/WikibaseServiceException.scala index 37707718..fec89955 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/WikibaseServiceException.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/WikibaseServiceException.scala @@ -6,7 +6,12 @@ import scala.util.control.NoStackTrace * * @param message Reason/explanation of why the exception occurred */ -final case class WikibaseServiceException( +final class WikibaseServiceException( private val message: String ) extends RuntimeException(message) - with NoStackTrace + with NoStackTrace { + + def this(throwable: Throwable) = { + this(throwable.getMessage) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/networking/NetworkingUtils.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/networking/NetworkingUtils.scala index 73d5a6b9..ae935cca 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/networking/NetworkingUtils.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/networking/NetworkingUtils.scala @@ -1,13 +1,31 @@ package es.weso.rdfshape.server.utils.networking +import cats.effect.IO +import cats.effect.kernel.Resource +import cats.effect.unsafe.implicits.global import com.typesafe.scalalogging.LazyLogging +import es.weso.rdfshape.server.Server +import org.http4s.Uri +import org.http4s.blaze.client.BlazeClientBuilder +import org.http4s.client.Client +import org.http4s.client.middleware.FollowRedirect import java.net.URL -import scala.io.Source +import scala.concurrent.duration.DurationInt import scala.util.{Failure, Success, Try} object NetworkingUtils extends LazyLogging { + /** Http4s functional client used to fetch data contained in URLs + * It has rich functionality and its tuned to follow redirects + */ + val httpClient: Resource[IO, Client[IO]] = + BlazeClientBuilder[IO] + .withRequestTimeout(Server.defaultRequestTimeout.minute) + .withIdleTimeout(Server.defaultIdleTimeout.minute) + .resource + .map(FollowRedirect(3)(_)) + /** Error-safe way of obtaining the raw contents in a given URL * * @param urlString URL to be fetched (String representation) @@ -24,16 +42,19 @@ object NetworkingUtils extends LazyLogging { } def getUrlContents(url: URL): Either[String, String] = { + val strResponse = + httpClient + .use(client => + // We use unsafe because we trust the java URL class syntax + client.expect[String](Uri.unsafeFromString(url.toString)) + ) Try { - val src = Source.fromURL(url) - val str = src.mkString - src.close() - str + strResponse.unsafeRunSync() } match { case Success(urlContent) => Right(urlContent) case Failure(exception) => val msg = - s"Could not obtain data from url $url." + s"Could not obtain data from $url." logger.warn(s"$msg - ${exception.getMessage}") Left(msg) } From 5c9545e43965395168159189faa640605645aeb2 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Fri, 18 Mar 2022 20:06:11 +0100 Subject: [PATCH 21/50] Manually implemented search Schemas functionality --- .../logic/model/{wikibase => }/Wikibase.scala | 2 +- .../logic/model/{wikibase => }/Wikidata.scala | 2 +- .../objects/wikibase/WikibaseEntity.scala | 4 +- .../objects/wikibase/WikibaseObject.scala | 6 +- .../objects/wikibase/WikibaseProperty.scala | 4 +- .../objects/wikibase/WikibaseSchema.scala | 4 +- .../objects/wikidata/WikidataEntity.scala | 6 +- .../objects/wikidata/WikidataObject.scala | 2 +- .../objects/wikidata/WikidataProperty.scala | 6 +- .../objects/wikidata/WikidataSchema.scala | 6 +- .../logic/operations/WikibaseOperation.scala | 12 +- .../operations/WikibaseOperationDetails.scala | 2 +- .../operations/WikibaseOperationResult.scala | 2 +- .../schema/WikibaseSchemaExtract.scala | 6 +- .../schema/WikibaseSchemaValidate.scala | 6 +- .../schema/WikibaseSheXerExtract.scala | 6 +- .../search/WikibaseSearchSchema.scala | 237 ++++++++++++++++++ .../search/WikibaseSearchTypes.scala | 5 +- .../wikibase/service/WikibaseService.scala | 11 +- version.sbt | 2 +- 20 files changed, 286 insertions(+), 45 deletions(-) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/Wikibase.scala (96%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/Wikidata.scala (96%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikibase/WikibaseEntity.scala (81%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikibase/WikibaseObject.scala (83%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikibase/WikibaseProperty.scala (82%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikibase/WikibaseSchema.scala (81%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikidata/WikidataEntity.scala (68%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikidata/WikidataObject.scala (97%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikidata/WikidataProperty.scala (66%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/{wikibase => }/objects/wikidata/WikidataSchema.scala (66%) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchSchema.scala diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/Wikibase.scala similarity index 96% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/Wikibase.scala index 48acd167..13906eb5 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikibase.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/Wikibase.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase +package es.weso.rdfshape.server.api.routes.wikibase.logic.model import es.weso.rdfshape.server.implicits.codecs.encodeUri import io.circe.syntax.EncoderOps diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikidata.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/Wikidata.scala similarity index 96% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikidata.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/Wikidata.scala index fcad8d5a..08fd5964 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/Wikidata.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/Wikidata.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase +package es.weso.rdfshape.server.api.routes.wikibase.logic.model import es.weso.rdf.PrefixMap import es.weso.rdf.nodes.IRI diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseEntity.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseEntity.scala similarity index 81% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseEntity.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseEntity.scala index 4c75f882..bec58b79 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseEntity.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseEntity.scala @@ -1,6 +1,6 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikibase import org.http4s.Uri /** Data class representing a Wikidata entity diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseObject.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseObject.scala similarity index 83% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseObject.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseObject.scala index 45d2274f..d975fcc2 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseObject.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseObject.scala @@ -1,7 +1,7 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataObject +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikibase +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata.WikidataObject import es.weso.rdfshape.server.utils.networking.NetworkingUtils import org.http4s.Uri diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseProperty.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseProperty.scala similarity index 82% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseProperty.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseProperty.scala index e45fba72..b1db229f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseProperty.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseProperty.scala @@ -1,6 +1,6 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikibase import org.http4s.Uri /** Data class representing a Wikidata entity diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseSchema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseSchema.scala similarity index 81% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseSchema.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseSchema.scala index f24fd06a..8e16c0e3 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikibase/WikibaseSchema.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikibase/WikibaseSchema.scala @@ -1,6 +1,6 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikibase import org.http4s.Uri /** Data class representing a Wikidata entity diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataEntity.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataEntity.scala similarity index 68% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataEntity.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataEntity.scala index b4304627..99098a70 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataEntity.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataEntity.scala @@ -1,7 +1,7 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase.WikibaseEntity import org.http4s.Uri import scala.util.matching.Regex diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataObject.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataObject.scala similarity index 97% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataObject.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataObject.scala index d2d664d0..58ba2718 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataObject.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataObject.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata import org.http4s.Uri diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataProperty.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataProperty.scala similarity index 66% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataProperty.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataProperty.scala index eaf87aec..3a9fe506 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataProperty.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataProperty.scala @@ -1,7 +1,7 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseProperty +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase.WikibaseProperty import org.http4s.Uri import scala.util.matching.Regex diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataSchema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataSchema.scala similarity index 66% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataSchema.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataSchema.scala index a3d9a61b..ba5ab3be 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/wikibase/objects/wikidata/WikidataSchema.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/model/objects/wikidata/WikidataSchema.scala @@ -1,7 +1,7 @@ -package es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata +package es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseSchema +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase.WikibaseSchema import org.http4s.Uri import scala.util.matching.Regex diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala index 0e069bb6..764f67b1 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperation.scala @@ -2,8 +2,7 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.operations import cats.effect.IO import cats.implicits.catsSyntaxEitherId -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.{ +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.{ Wikibase, Wikidata } @@ -29,7 +28,7 @@ private[operations] abstract class WikibaseOperation( /** Wikibase instance to be queried by this operation * Given the data needed for the wikibase operation, configure the target wikibase instance. - * Pattern match along all possible operations and set the target's [[Wikibase.baseUrl]] and/or [[wikibase.Wikibase.queryUrl]] + * Pattern match along all possible operations and set the target's [[Wikibase.baseUrl]] and/or [[Wikibase.queryUrl]] * as needed for each operation. * * For instance: a [[WikibaseSearchOperation]] operation will include the wikibase's base URL @@ -68,6 +67,10 @@ private[operations] abstract class WikibaseOperation( */ val defaultContinue = 0 + /** Default language to use when required but not specified + */ + val defaultLanguage = "en" + /** Base request object that will be executed when performing the operation. * Meant to be overridden or complemented with additional configurations */ @@ -98,8 +101,7 @@ private[operations] abstract class WikibaseOperation( .fold( decodeErr => decodeErr.message, rawResponse => - s"Request $request failed with status ${failedResponse.status.code} " + - s"and body $rawResponse" + s"Request $request failed with status ${failedResponse.status.code}" ) .map(_.asLeft[R]) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala index 077e16e8..d6f66af3 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationDetails.scala @@ -2,7 +2,7 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.operations import cats.implicits.{catsSyntaxEitherId, toBifunctorOps} import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.WikibaseOperationFormats.WikibaseOperationFormats import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ import es.weso.rdfshape.server.implicits.codecs.{decodeUri, encodeUri} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationResult.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationResult.scala index 7ad3faf5..3bb0cb6e 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationResult.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/WikibaseOperationResult.scala @@ -1,6 +1,6 @@ package es.weso.rdfshape.server.api.routes.wikibase.logic.operations -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikibase +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikibase import io.circe.syntax.EncoderOps import io.circe.{Encoder, Json} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala index 1295e19f..5ef8295a 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaExtract.scala @@ -6,9 +6,9 @@ import es.weso.rdf.jena.RDFAsJenaModel import es.weso.rdf.nodes.IRI import es.weso.rdfshape.server.api.format.dataFormats.Turtle import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.ShExC -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataEntity +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase.WikibaseEntity +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata.WikidataEntity import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.{ WikibaseOperation, WikibaseOperationDetails, diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala index a597e055..51da5849 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSchemaValidate.scala @@ -16,9 +16,9 @@ import es.weso.rdfshape.server.api.routes.shapemap.logic.{ ShapeMap, ShapeMapSource } -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataEntity +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase.WikibaseEntity +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata.WikidataEntity import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.{ WikibaseOperation, WikibaseOperationDetails, diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala index eedc3342..16ba42fb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/schema/WikibaseSheXerExtract.scala @@ -6,9 +6,9 @@ import es.weso.rdf.PrefixMap import es.weso.rdfshape.server.api.format.dataFormats.{DataFormat, Turtle} import es.weso.rdfshape.server.api.routes.data.logic.DataSource import es.weso.rdfshape.server.api.routes.data.logic.DataSource.DataSource -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.Wikidata -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikibase.WikibaseEntity -import es.weso.rdfshape.server.api.routes.wikibase.logic.model.wikibase.objects.wikidata.WikidataEntity +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase.WikibaseEntity +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata.WikidataEntity import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.schema.WikibaseSheXerExtract.ShexerParams.{ wikidataNamespaceQualifiers, wikidataProp31 diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchSchema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchSchema.scala new file mode 100644 index 00000000..af348ff0 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchSchema.scala @@ -0,0 +1,237 @@ +package es.weso.rdfshape.server.api.routes.wikibase.logic.operations.search + +import cats.effect.IO +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.Wikidata +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikibase.WikibaseSchema +import es.weso.rdfshape.server.api.routes.wikibase.logic.model.objects.wikidata.WikidataSchema +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.{ + WikibaseOperationDetails, + WikibaseOperationFormats, + WikibaseOperationResult +} +import es.weso.rdfshape.server.utils.error.exceptions.WikibaseServiceException +import io.circe.syntax.EncoderOps +import io.circe.{Json, parser} +import org.http4s.Uri +import org.http4s.circe.jsonDecoder +import org.http4s.client.Client + +/** A [[WikibaseSearchOperation]] searching for schemas in a wikibase instance. + * Unlike other search operations, there is no straightforward method to get + * schemas with their labels and descriptions, so this is our custom solution. + * 1- Resorts to [[https://www.wikidata.org/w/api.php?action=help&modules=query%2Bsearch]] + * to get the pageIds of the schemas that match the query (by name) + * 2- Resorts to [[https://www.wikidata.org/w/api.php?action=help&modules=query]] + * to query the pageIds of each schema and get more detailed information about them + * 3- For each schema, adds the URL to get their ShEx content so that clients + * can easily use them + * + * @param operationData Data needed to perform the wikibase operation + * @param client [[Client]] object to be used in requests to wikibase + * @see https://phabricator.wikimedia.org/T304070 + * @see https://github.com/weso/YASHE/blob/6fd2242e4fc524f7621584eecb19d821fafb3d85/doc/main.js#L104-L130 + */ +sealed case class WikibaseSearchSchema private ( + override val operationData: WikibaseOperationDetails, + override val client: Client[IO] +) extends WikibaseSearchOperation( + operationData, + client, + WikibaseSearchTypes.SCHEMA + ) { + + /** URL to be queried to get the page Ids of the matching schemas. + * Already prepared and given payload. + */ + override lazy val targetUri: Uri = { + targetWikibase.apiUrl + .withQueryParam("action", "query") + .withQueryParam("list", "search") + // It would be interesting to use parameters in the search (e.g.: intitle) + // however the schema titles are not representative + // https://stackoverflow.com/a/33281775/9744696 + .withQueryParam("srsearch", operationData.payload) + .withQueryParam("srprop", "") // Do not return unneeded data + .withQueryParam("srnamespace", 640) // Return schemas + .withQueryParam("srlimit", operationData.limit.getOrElse(defaultLimit)) + .withQueryParam( + "sroffset", + operationData.continue.getOrElse(defaultContinue) + ) + .withQueryParam( + "format", + operationData.format + .getOrElse(WikibaseOperationFormats.JSON) + ) + } + + override def performOperation: IO[WikibaseOperationResult] = { + // Build the results item from the wikibase response, throwing errors + for { + // Perform the default request against targetUri + eitherSchemas <- super + .performRequest[Json]() + .flatMap { + // Error in first request, raise + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) + case Right(jsonResponse) => + // From the first request's response, get the schema pageIds. + val pageIds = parsePageIds(jsonResponse) + + // Make the request to query for the schemas' details + val request = super.request.withUri(mkSchemaDetailsUri(pageIds)) + super.performRequest[Json](request) + } + + result <- eitherSchemas match { + // Error in second request, raise + case Left(err) => IO.raiseError(new WikibaseServiceException(err)) + // Create the final results item + case Right(jsonResults) => + IO { + WikibaseOperationResult( + operationData = operationData, + wikibase = targetWikibase, + result = parseFinalResult(jsonResults) + ) + } + } + } yield result + } + + /** Given a JSON returned from a Wikibase query searching for schemas, extract + * the page ids of the results + * + * @param input JSON to be parsed for pageIds, as returned from MediaWiki's API + * @return List containing the page Ids of the resulting schemas + * @note Example request to be used as input: https://www.wikidata.org/w/api.php?action=query&list=search&srsearch=human&srprop=&srnamespace=640&format=json&formatversion=2 + */ + private def parsePageIds(input: Json): List[Int] = input.hcursor + .downField("query") + .downField("search") + .values + .get + .map(_.hcursor.get[Int]("pageid").getOrElse(-1)) + .filter(_ > 0) // If no pageId could be parsed for an item, filter it out + .toList + + /** Transform the final JSON received from Wikibase into the JSON we want + * to return to clients, including only meaningful information as needed + * + * @param input Input JSON, as returned from MediaWiki's API + * @return New JSON object with the schemas ID, title, labels, etc. + * @note Example request to be used as input: https://www.wikidata.org/w/api.php?action=query&pageids=63842892|66281815&prop=revisions&rvslots=*&rvprop=content&format=json + */ + private def parseFinalResult(input: Json): Json = { + // 1. First isolate the object with the results themselves from the metadata + val resultsObject = + input.hcursor.downField("query").get[Json]("pages").getOrElse(Json.Null) + + /* 2. In this object, each key is a schema pageId and contains another + * object with all the schema info. + * For each key, make the JSON object that fits our needs */ + val results = resultsObject.hcursor.keys + .getOrElse(List.empty) + .map(key => { + val optResult = + for { + // Object with a single schema information + schemaObject <- resultsObject.hcursor.get[Json](key) + // Schema simplified name: EntitySchema:EXXX + schemaName <- schemaObject.hcursor.get[String]("title") + // URL used to access the schema, + // e.g.: https://www.wikidata.org/wiki/EntitySchema:EXXX + webUri = targetWikibase.baseUrl / "wiki" / schemaName + // Memory model of the schema + schemaDomainObject = + if(targetWikibase == Wikidata) WikidataSchema(webUri) + else new WikibaseSchema(targetWikibase, webUri) + + // Schema labels, parsed from String field + schemaAdditionalInfo <- schemaObject.hcursor + .downField("revisions") + .downArray + .downField("slots") + .downField("main") + .get[String]("*") + .flatMap(parser.parse) + + schemaId <- schemaAdditionalInfo.hcursor.get[String]("id") + // Labels object, each key being a language + schemaLabels <- schemaAdditionalInfo.hcursor.get[Json]("labels") + // Descriptions object, each key being a language + schemaDescriptions <- schemaAdditionalInfo.hcursor.get[Json]( + "descriptions" + ) + // Language requested by the client to return the correct label/desc + clientLang = operationData.searchLanguage.getOrElse(defaultLanguage) + + } yield Json.fromFields( + List( + ("id", schemaId.asJson), + ( + "label", + // Try to get the label in the client language, + // else try to fallback to english + // else return nothing + schemaLabels.hcursor + .get[Json](clientLang) + .fold( + _ => + schemaLabels.hcursor + .get[Json](defaultLanguage) + .getOrElse(Json.Null), + identity + ) + ), + ( + "descr", + schemaDescriptions.hcursor + .get[Json](clientLang) + .fold( + _ => + schemaLabels.hcursor + .get[Json](defaultLanguage) + .getOrElse(Json.Null), + identity + ) + ), + ( + "webUri", + schemaDomainObject.entityUri.renderString.asJson + ), + ( + "conceptUri", + schemaDomainObject.contentUri.renderString.asJson + ) + ) + ) + + // Return null Json if object processing failed + optResult.toOption.getOrElse(Json.Null) + }) + + // Return a JSON with the array of all items, filter out nulls + Json.fromValues(results).deepDropNullValues + } + + /** URL to be queried for the schema details (labels, descriptions) + */ + private def mkSchemaDetailsUri(schemaPageIds: List[Int]): Uri = + targetWikibase.apiUrl + .withQueryParam("action", "query") + .withQueryParam( + "pageids", + schemaPageIds.mkString( + "|" + ) // All schema page Ids separated by "|". Max is 50 items but we won't surpass it + ) + .withQueryParam("prop", "revisions") + .withQueryParam("rvslots", "*") + .withQueryParam("rvprop", "content") + .withQueryParam( + "format", + operationData.format + .getOrElse(WikibaseOperationFormats.JSON) + ) +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala index 202badc4..96bd88f1 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/logic/operations/search/WikibaseSearchTypes.scala @@ -5,6 +5,8 @@ import es.weso.rdfshape.server.utils.other.MyEnum /** Enumeration of the different types of objects that can be requested to * wikibase's API in search operations. * + * @note "schema" is not a standard value for wbsearchentities, but a custom + * value we use in some server operations that fetch schemas * @see [[https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities]] */ private[api] object WikibaseSearchTypes extends MyEnum[String] { @@ -15,8 +17,9 @@ private[api] object WikibaseSearchTypes extends MyEnum[String] { val LEXEME = "lexeme" val FORM = "form" val SENSE = "sense" + val SCHEMA = "schema" val values = Set(ENTITY, PROPERTY, LEXEME, FORM, SENSE) - val basicValues = Set(ENTITY, PROPERTY, LEXEME) + val basicValues = Set(ENTITY, PROPERTY, LEXEME, SCHEMA) val default: WikibaseSearchTypes = ENTITY } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala index e1cad108..a8db62f1 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/wikibase/service/WikibaseService.scala @@ -14,12 +14,7 @@ import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.schema.{ WikibaseSheXerExtract } import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.search.WikibaseSearchTypes.WikibaseSearchTypes -import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.search.{ - WikibaseSearchEntity, - WikibaseSearchLexeme, - WikibaseSearchProperty, - WikibaseSearchTypes -} +import es.weso.rdfshape.server.api.routes.wikibase.logic.operations.search._ import es.weso.rdfshape.server.api.routes.wikibase.service.operations.{ WikibaseOperationInput, WikibaseValidateInput @@ -104,6 +99,10 @@ class WikibaseService(client: Client[IO]) WikibaseSearchProperty(body.operationDetails, redirectClient) case WikibaseSearchTypes.LEXEME => WikibaseSearchLexeme(body.operationDetails, redirectClient) + // SCHEMA is a non-standard search case, we implemented our own + // schema search mechanism but that is transparent to clients + case WikibaseSearchTypes.SCHEMA => + WikibaseSearchSchema(body.operationDetails, redirectClient) } searchOperation.performOperation diff --git a/version.sbt b/version.sbt index fad06c04..7dfaf2ef 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.4" +ThisBuild / version := "0.2.5" From d01713b7d133431626c30cd48a5f5a51a0ff81e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 03:41:01 +0000 Subject: [PATCH 22/50] 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/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 36282cef..f5ac61c3 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -5704,9 +5704,9 @@ minimatch@3.0.4, minimatch@^3.0.4: brace-expansion "^1.1.7" 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== + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mixin-deep@^1.2.0: version "1.3.2" From 6d4e6e8d281abd94b77ee391c6167d6dadd48905 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Sun, 10 Apr 2022 13:58:49 +0200 Subject: [PATCH 23/50] Updated dependencies, typos --- build.sbt | 16 ++++++++-------- .../schema/logic/trigger/TriggerMode.scala | 2 +- .../routes/schema/service/SchemaService.scala | 1 - .../api/routes/shapemap/logic/ShapeMap.scala | 4 ++-- version.sbt | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/build.sbt b/build.sbt index d8328b64..42e90c55 100644 --- a/build.sbt +++ b/build.sbt @@ -313,20 +313,20 @@ lazy val http4sVersion = "1.0.0-M30" lazy val rhoVersion = "0.23.0-M1" lazy val catsVersion = "2.7.0" /* ------------------------------------------------------------------------- */ -lazy val mongodbVersion = "4.4.1" -lazy val mongo4catsVersion = "0.4.5" -lazy val any23Version = "2.4" -lazy val rdf4jVersion = "3.7.4" +lazy val mongodbVersion = "4.5.1" +lazy val mongo4catsVersion = "0.4.7" +lazy val any23Version = "2.6" +lazy val rdf4jVersion = "3.7.6" lazy val graphvizJavaVersion = "0.18.1" -lazy val logbackVersion = "1.2.10" +lazy val logbackVersion = "1.2.11" lazy val scalaLoggingVersion = "3.9.4" -lazy val munitVersion = "0.7.27" +lazy val munitVersion = "0.7.29" lazy val munitEffectVersion = "1.0.7" lazy val plantumlVersion = "1.2021.14" lazy val scalajVersion = "2.4.2" // WESO dependencies -lazy val shaclexVersion = "0.2.0" -lazy val shexsVersion = "0.2.0" +lazy val shaclexVersion = "0.2.2" +lazy val shexsVersion = "0.2.2" lazy val umlShaclexVersion = "0.0.82" lazy val wesoUtilsVersion = "0.2.4" // Dependency modules diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 31b28966..8b247cdf 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -11,7 +11,7 @@ import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} import scala.language.implicitConversions -/** Common trait to all schemas, whichever its nature +/** Common trait to all validation triggers, whichever its nature */ trait TriggerMode { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 443f3fa5..6498e070 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -72,7 +72,6 @@ class SchemaService(client: Client[IO]) "Get the default schema engine as a raw string" ** GET / `verb` / "engines" / "default" |>> { - val json = Json.fromString(Schemas.defaultSchema.name) Ok(Schemas.defaultSchema.name) } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala index 35b39b61..4429626f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala @@ -17,8 +17,8 @@ import scala.util.Try * * @note Invalid initial data is accepted, but may cause exceptions when operating with it (like converting to JSON). * @param content Shapemap contents, as received before being processed depending on the [[source]] - * @param nodesPrefixMap Prefix mappings of the data referenced in the shapemap - * @param shapesPrefixMap Prefix mappings of the ShEx schema referenced in the shapemap + * @param nodesPrefixMap Prefix mappings of the data referenced in the shapeMap + * @param shapesPrefixMap Prefix mappings of the ShEx schema referenced in the shapeMap * @param format Shapemap format * @param source Active source, used to know which source the shapemap comes from */ diff --git a/version.sbt b/version.sbt index 7dfaf2ef..149422d8 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.5" +ThisBuild / version := "0.2.6" From d5b403c20c1d3ab1e55d29c2ced4b2e5af220574 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Sun, 10 Apr 2022 17:35:22 +0200 Subject: [PATCH 24/50] Prepare to act as WebSockets server --- .../src/main/scala/es/weso/rdfshape/server/Server.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index 197c8987..820677f5 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -23,6 +23,7 @@ import org.http4s.client.Client import org.http4s.implicits.http4sKleisliResponseSyntaxOptionT import org.http4s.server.Router import org.http4s.server.middleware.{CORS, CORSPolicy, Logger} +import org.http4s.server.websocket.WebSocketBuilder import org.http4s.{HttpApp, HttpRoutes} import java.util.concurrent.TimeUnit @@ -116,7 +117,11 @@ private class Server( .bindHttp(port, ip) .withIdleTimeout(idleTimeout.minutes) .withResponseHeaderTimeout(requestTimeout.minute) - .withHttpApp(createApp(client)) + /* WebSocketBuilder was deprecated and must be obtained here, from the + * server builder */ + .withHttpWebSocketApp((wsBuilder: WebSocketBuilder[IO]) => + createApp(client) + ) sslContext match { case None => baseServer From f00bfc0e2c33074e86160825737fb7c8e882e696 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Tue, 26 Apr 2022 16:55:11 +0200 Subject: [PATCH 25/50] Minor changes to build.sbt --- build.sbt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index 42e90c55..64a76c17 100644 --- a/build.sbt +++ b/build.sbt @@ -8,10 +8,6 @@ Global / cancelable := true Global / apiURL := Some(url("https://github.com/weso/rdfshape-api")) Global / scalaVersion := scala213 -lazy val scala212 = "2.12.15" -lazy val scala213 = "2.13.8" -lazy val supportedScalaVersions = List(scala213) - // Lint-excluded keys Global / excludeLintKeys ++= Set( name, @@ -261,7 +257,6 @@ lazy val server = project moduleName := s"${(Global / packageName).value}-server", run / fork := false, testFrameworks += MUnitFramework, - crossScalaVersions := supportedScalaVersions, libraryDependencies ++= Seq( http4sDsl, http4sBlazeServer, @@ -287,10 +282,12 @@ lazy val server = project ) // "sbt-github-actions" plugin settings -lazy val JavaCIVersion = "adopt@1.11" -lazy val ScalaCIVersion = scala213 -ThisBuild / githubWorkflowJavaVersions := Seq(JavaCIVersion) -ThisBuild / githubWorkflowScalaVersions := Seq(ScalaCIVersion) +lazy val scala212 = "2.12.15" +lazy val scala213 = "2.13.8" +lazy val java11adopt = "adopt@1.11" + +ThisBuild / githubWorkflowJavaVersions := Seq(java11adopt) +ThisBuild / githubWorkflowScalaVersions := Seq(scala213) /* ------------------------------------------------------------------------- */ // Documentation project, for MDoc + Docusaurus documentation From 02358e4883cd4ea7ee24119782eb283e641c4570 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Fri, 29 Apr 2022 10:01:50 +0200 Subject: [PATCH 26/50] Minor microsite fixes --- docs/webpage/webpage_info.md | 5 +-- website/docusaurus.config.js | 52 ++++++++++++++--------------- website/src/css/custom.css | 1 + website/src/pages/index.js | 64 +++++++++++++++++------------------- 4 files changed, 58 insertions(+), 64 deletions(-) diff --git a/docs/webpage/webpage_info.md b/docs/webpage/webpage_info.md index feb20a99..46e1d245 100644 --- a/docs/webpage/webpage_info.md +++ b/docs/webpage/webpage_info.md @@ -41,9 +41,6 @@ was followed. However, minor issues occurred: 1. The _package.json_ had to be modified to include the script `publish-gh-pages`. 2. The [Docusaurus config file](https://github.com/weso/rdfshape-api/blob/master/website/docusaurus.config.js) had to be - modified to indicate what the location of t2. - The [Docusaurus config file](https://github.com/weso/rdfshape-api/blob/master/website/docusaurus.config.js) had to be - modified to indicate what the location of the markdown files with the web docs is.he markdown files with the web docs - is. + modified to indicate what the location of the markdown files with the web docs is. 3. The [sidebar configuration file](https://github.com/weso/rdfshape-api/blob/master/website/sidebars.js) was modified to customize the sidebar that is used as navigation when browsing the web docs. \ No newline at end of file diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index fb3619bf..96c540c8 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -3,7 +3,7 @@ const baseUrl = "/rdfshape-api/" const scalaDocUrl = `${deployUrl}${baseUrl}api/es/weso/rdfshape/` const apiDocsUrl = "https://app.swaggerhub.com/apis-docs/weso/RDFShape/" -/** @type {import('@docusaurus/types').DocusaurusConfig} */ +/** @type {import("@docusaurus/types").DocusaurusConfig} */ module.exports = { title: "RDFShape API", tagline: "Processing and validation of RDF with ShEx, SHACL and more", @@ -27,63 +27,63 @@ module.exports = { darkIcon: "🌙", lightIcon: "\u2600", darkIconStyle: {marginLeft: "2px"}, - lightIconStyle: {marginLeft: "1px"}, - }, + lightIconStyle: {marginLeft: "1px"} + } }, navbar: { title: "RDFShape API", logo: { - alt: "RDFShape API - WESO", src: "img/logo-weso.png", + alt: "RDFShape API - WESO", src: "img/logo-weso.png" }, items: [// Web docs { - to: "/docs", label: "Web docs", position: "left", + to: "/docs", label: "Web docs", position: "left" }, // Scaladoc { - to: scalaDocUrl, label: "Scaladoc", position: "left", + href: scalaDocUrl, label: "Scaladoc", position: "left" }, // API Docs in SwaggerHub { href: "https://github.com/weso/rdfshape-api", label: "SwaggerHub", - position: "right", + position: "right" }, // Link to repo { href: "https://github.com/weso/rdfshape-api", label: "GitHub", - position: "right", - },], + position: "right" + }] }, footer: { style: "light", logo: { alt: "RDFShape API - WESO", src: "img/logo-weso-footer.png", - href: "https://www.weso.es/", + href: "https://www.weso.es/" }, links: [{ title: "About us", items: [{ - label: "WESO Research Group", to: "https://www.weso.es/", + label: "WESO Research Group", to: "https://www.weso.es/" }, { - label: "University of Oviedo", to: "https://www.uniovi.es/", - },], + label: "University of Oviedo", to: "https://www.uniovi.es/" + }] }, { title: "Community", items: [{ - label: "GitHub", to: "https://github.com/weso", + label: "GitHub", to: "https://github.com/weso" }, { - label: "Twitter", to: "https://twitter.com/wesoviedo", - },], + label: "Twitter", to: "https://twitter.com/wesoviedo" + }] }, { title: "Further work", items: [{ - label: "RDFShape project", to: "https://github.com/weso/rdfshape", + label: "RDFShape project", to: "https://github.com/weso/rdfshape" }, { - label: "More software by WESO", to: "https://www.weso.es/#software", - },], - },], - copyright: `Copyright © ${new Date().getFullYear()} WESO Research Group`, - }, + label: "More software by WESO", to: "https://www.weso.es/#software" + }] + }], + copyright: `Copyright © ${new Date().getFullYear()} WESO Research Group` + } }, presets: [["@docusaurus/preset-classic", { docs: { path: "../rdfshape-docs/target/mdoc", - sidebarPath: require.resolve("./sidebars.js"), + sidebarPath: require.resolve("./sidebars.js") }, blog: false, theme: { - customCss: require.resolve("./src/css/custom.css"), - }, sitemap: {}, - },],], + customCss: require.resolve("./src/css/custom.css") + }, sitemap: {} + }]] }; diff --git a/website/src/css/custom.css b/website/src/css/custom.css index 4e78f04b..7e1f69b5 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -17,6 +17,7 @@ --ifm-code-font-size: 95%; } +/* noinspection ALL */ .docusaurus-highlight-code-line { background-color: rgb(72, 77, 91); display: block; diff --git a/website/src/pages/index.js b/website/src/pages/index.js index 3aef1a78..59d07575 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -1,40 +1,36 @@ -import React from 'react'; -import clsx from 'clsx'; -import Layout from '@theme/Layout'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import styles from './index.module.css'; -import HomepageFeatures from '../components/HomepageFeatures'; +import React from "react"; +import clsx from "clsx"; +import Layout from "@theme/Layout"; +import Link from "@docusaurus/Link"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import styles from "./index.module.css"; +import HomepageFeatures from "../components/HomepageFeatures"; function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); - return ( -
-
-

{siteConfig.title}

-

{siteConfig.tagline}

-
- - RDFShape Client DEMO - -
-
-
- ); + const {siteConfig} = useDocusaurusContext(); + return (
+
+

{siteConfig.title}

+

{siteConfig.tagline}

+
+ + RDFShape Client DEMO + +
+
+
); } export default function Home() { - const {siteConfig} = useDocusaurusContext(); - return ( - - -
- -
-
- ); + const {siteConfig} = useDocusaurusContext(); + return ( + +
+ +
+
); } From 00e66b9a71a83c92c0d3c71948bf060ee3fee7b3 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Mon, 2 May 2022 16:21:44 +0200 Subject: [PATCH 27/50] Added comet, enhanced microsite --- .github/workflows/publish_gh_pages.yml | 2 +- build.sbt | 54 +- version.sbt | 2 +- website/docusaurus.config.js | 21 +- website/package.json | 5 +- website/sidebars.js | 20 +- website/yarn.lock | 7925 ++++++++++++------------ 7 files changed, 3847 insertions(+), 4182 deletions(-) diff --git a/.github/workflows/publish_gh_pages.yml b/.github/workflows/publish_gh_pages.yml index 29dd3d29..5189f39b 100644 --- a/.github/workflows/publish_gh_pages.yml +++ b/.github/workflows/publish_gh_pages.yml @@ -25,6 +25,6 @@ jobs: uses: ts-graphviz/setup-graphviz@v1 - name: Build and publish docusaurus site, generating the scaladoc - run: sbt '++2.13.6 docs/docusaurusPublishGhpages' + run: sbt '++2.13.8 docs/docusaurusPublishGhpages' env: GIT_DEPLOY_KEY: ${{ secrets.RDFSHAPE_API_DEPLOY_KEY }} diff --git a/build.sbt b/build.sbt index 64a76c17..f40c916d 100644 --- a/build.sbt +++ b/build.sbt @@ -81,7 +81,8 @@ lazy val scaladocSettings: Seq[Def.Setting[_]] = Seq( // Other settings "-diagrams", "-implicits", - "-private" + "-private", + "-no-link-warnings" ), // Need to generate docs to publish to oss Compile / packageDoc / publishArtifact := true @@ -112,7 +113,7 @@ lazy val mdocSettings = Seq( .dependsOn(Compile / unidoc) .value ) -// Unidoc settings, mirroring scaladoc settings +// Unidoc settings lazy val unidocSettings: Seq[Def.Setting[_]] = Seq( // Generate docs for the root project and the server module ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(rdfshape, server), @@ -120,31 +121,8 @@ lazy val unidocSettings: Seq[Def.Setting[_]] = Seq( ScalaUnidoc / unidoc / target := (LocalRootProject / baseDirectory).value / "website" / "static" / "api", // When cleaning, remove unidoc generated docs as well cleanFiles += (ScalaUnidoc / unidoc / target).value, - // Scalac options - ScalaUnidoc / unidoc / scalacOptions ++= Seq( - // Base source path - "-sourcepath", - (LocalRootProject / baseDirectory).value.getAbsolutePath, - // Link to GitHub source - "-doc-source-url", - scmInfo.value.get.browseUrl + "/tree/master€{FILE_PATH}.scala", - // Page title - "-doc-title", - "RDFShape API - Docs", - // Docs version - "-doc-version", - version.value, - // Docs footer - "-doc-footer", - "WESO Research Group - University of Oviedo", - // Skip unnecessary source - "-skip-packages", - "org:buildinfo", - // Other settings - "-diagrams", - "-implicits", - "-private" - ) + // Scalac options, mirroring scaladoc settings + ScalaUnidoc / unidoc / scalacOptions ++= (Compile / doc / scalacOptions).value ) // Shared publish settings for all modules. lazy val publishSettings = Seq( @@ -185,8 +163,9 @@ lazy val publishSettings = Seq( // Helper to resolve dependencies from GitHub packages lazy val resolverSettings = Seq( resolvers ++= Seq( - Resolver.DefaultMavenRepository, - Resolver.sonatypeRepo("snapshots") + Resolver.DefaultMavenRepository, // maven + Opts.resolver.sonatypeSnapshots, // sonatype + Opts.resolver.sonatypeReleases ) ) // Shared settings for the BuildInfo Plugin @@ -264,6 +243,7 @@ lazy val server = project http4sEmberClient, http4sCirce, rho_swagger, + comet, umlShaclex, shexs, shaclex, @@ -309,10 +289,11 @@ lazy val MUnitFramework = new TestFramework("munit.Framework") lazy val http4sVersion = "1.0.0-M30" lazy val rhoVersion = "0.23.0-M1" lazy val catsVersion = "2.7.0" +lazy val cometVersion = "0.1.1" /* ------------------------------------------------------------------------- */ -lazy val mongodbVersion = "4.5.1" +lazy val mongodbVersion = "4.6.0" lazy val mongo4catsVersion = "0.4.7" -lazy val any23Version = "2.6" +lazy val any23Version = "2.7" lazy val rdf4jVersion = "3.7.6" lazy val graphvizJavaVersion = "0.18.1" lazy val logbackVersion = "1.2.11" @@ -334,11 +315,12 @@ lazy val http4sBlazeClient = "org.http4s" %% "http4s-blaze-client" % http4sVersion lazy val http4sEmberClient = "org.http4s" %% "http4s-ember-client" % http4sVersion -lazy val http4sCirce = "org.http4s" %% "http4s-circe" % http4sVersion -lazy val rho_swagger = "org.http4s" %% "rho-swagger" % rhoVersion -lazy val catsCore = "org.typelevel" %% "cats-core" % catsVersion -lazy val catsKernel = "org.typelevel" %% "cats-kernel" % catsVersion -lazy val mongodb = "org.mongodb.scala" %% "mongo-scala-driver" % mongodbVersion +lazy val http4sCirce = "org.http4s" %% "http4s-circe" % http4sVersion +lazy val rho_swagger = "org.http4s" %% "rho-swagger" % rhoVersion +lazy val catsCore = "org.typelevel" %% "cats-core" % catsVersion +lazy val catsKernel = "org.typelevel" %% "cats-kernel" % catsVersion +lazy val comet = "io.github.ulitol97" %% "comet" % cometVersion +lazy val mongodb = "org.mongodb.scala" %% "mongo-scala-driver" % mongodbVersion lazy val mongo4catsCore = "io.github.kirill5k" %% "mongo4cats-core" % mongo4catsVersion lazy val mongo4catsCirce = diff --git a/version.sbt b/version.sbt index 149422d8..5d3a24f9 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.6" +ThisBuild / version := "0.2.7" diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 96c540c8..1e4dfc20 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -3,6 +3,9 @@ const baseUrl = "/rdfshape-api/" const scalaDocUrl = `${deployUrl}${baseUrl}api/es/weso/rdfshape/` const apiDocsUrl = "https://app.swaggerhub.com/apis-docs/weso/RDFShape/" +const lightCodeTheme = require("prism-react-renderer/themes/github"); +const darkCodeTheme = require("prism-react-renderer/themes/dracula"); + /** @type {import("@docusaurus/types").DocusaurusConfig} */ module.exports = { title: "RDFShape API", @@ -19,17 +22,13 @@ module.exports = { scalaDocUrl, apiDocsUrl }, themeConfig: { - image: "img/preview.png", hideableSidebar: false, colorMode: { + image: "img/preview.png", + colorMode: { defaultMode: "light", disableSwitch: false, - respectPrefersColorScheme: true, - switchConfig: { - darkIcon: "🌙", - lightIcon: "\u2600", - darkIconStyle: {marginLeft: "2px"}, - lightIconStyle: {marginLeft: "1px"} - } - }, navbar: { + respectPrefersColorScheme: true + }, + navbar: { title: "RDFShape API", logo: { alt: "RDFShape API - WESO", src: "img/logo-weso.png" }, items: [// Web docs @@ -76,6 +75,10 @@ module.exports = { }] }], copyright: `Copyright © ${new Date().getFullYear()} WESO Research Group` + }, + prism: { + theme: lightCodeTheme, + darkTheme: darkCodeTheme } }, presets: [["@docusaurus/preset-classic", { diff --git a/website/package.json b/website/package.json index 9b928c4a..6ee1e346 100644 --- a/website/package.json +++ b/website/package.json @@ -15,12 +15,13 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "^2.0.0-beta.4", - "@docusaurus/preset-classic": "^2.0.0-beta.4", + "@docusaurus/core": "^2.0.0-beta.18", + "@docusaurus/preset-classic": "^2.0.0-beta.18", "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", "clsx": "^1.1.1", "file-loader": "^6.2.0", + "prism-react-renderer": "^1.3.1", "react": "^17.0.1", "react-dom": "^17.0.1", "url-loader": "^4.1.1" diff --git a/website/sidebars.js b/website/sidebars.js index c36aab12..8770db44 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -5,13 +5,13 @@ const apiDocsUrl = "https://app.swaggerhub.com/apis-docs/weso/RDFShape/" module.exports = { // Generate a sidebar from the docs folder structure // sidebar: [{type: "autogenerated", dirName: "."}], - + // Create a sidebar manually docsSidebar: [/* Home */ { - type: "doc", id: "home", label: "Welcome", + type: "doc", id: "home", label: "Welcome" }, - + /* Category: deployment */ { type: "category", @@ -19,7 +19,7 @@ module.exports = { items: ["api-deployment/deployment_overview", "api-deployment/deployment_manual", "api-deployment/deployment_docker"], collapsed: false }, - + /* Category: usage */ { type: "category", @@ -27,7 +27,7 @@ module.exports = { items: ["api-usage/usage_cli"], collapsed: false }, - + /* Category: testing */ { type: "category", @@ -35,7 +35,7 @@ module.exports = { items: ["api-testing-auditing/testing-auditing_munit", "api-testing-auditing/testing-auditing_integration", "api-testing-auditing/testing-auditing_logs"], collapsed: true }, - + /* Category: documentation */ { type: "category", label: "Additional documentation", items: [{ @@ -44,10 +44,10 @@ module.exports = { type: "link", label: "API Docs (Swagger Hub)", href: apiDocsUrl }], collapsed: false }, - + /* Webpage information */ { - type: "doc", id: "webpage/webpage_info", label: "About this webpage", - },], - + type: "doc", id: "webpage/webpage_info", label: "About this webpage" + }] + }; diff --git a/website/yarn.lock b/website/yarn.lock index 36282cef..ce0c7b4c 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -2,151 +2,169 @@ # yarn lockfile v1 -"@algolia/autocomplete-core@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.2.1.tgz#95fc07cfa40b5a38e3f80acd75d1fb94968215a8" - integrity sha512-/SLS6636Wpl7eFiX7eEy0E3wBo60sUm1qRYybJBDt1fs8reiJ1+OSy+dZgrLBfLL4mSFqRIIUHXbVp25QdZ+iw== +"@algolia/autocomplete-core@1.5.2": + version "1.5.2" + resolved "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.5.2.tgz" + integrity sha512-DY0bhyczFSS1b/CqJlTE/nQRtnTAHl6IemIkBy0nEWnhDzRDdtdx4p5Uuk3vwAFxwEEgi1WqKwgSSMx6DpNL4A== dependencies: - "@algolia/autocomplete-shared" "1.2.1" + "@algolia/autocomplete-shared" "1.5.2" -"@algolia/autocomplete-preset-algolia@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.2.1.tgz#bda1741823268ff76ba78306259036f000198e01" - integrity sha512-Lf4PpPVgHNXm1ytrnVdrZYV7hAYSCpAI/TrebF8UC6xflPY6sKb1RL/2OfrO9On7SDjPBtNd+6MArSar5JmK0g== +"@algolia/autocomplete-preset-algolia@1.5.2": + version "1.5.2" + resolved "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.5.2.tgz" + integrity sha512-3MRYnYQFJyovANzSX2CToS6/5cfVjbLLqFsZTKcvF3abhQzxbqwwaMBlJtt620uBUOeMzhdfasKhCc40+RHiZw== dependencies: - "@algolia/autocomplete-shared" "1.2.1" + "@algolia/autocomplete-shared" "1.5.2" -"@algolia/autocomplete-shared@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.2.1.tgz#96f869fb2285ed6a34a5ac2509722c065df93016" - integrity sha512-RHCwcXAYFwDXTlomstjWRFIzOfyxtQ9KmViacPE5P5hxUSSjkmG3dAb77xdydift1PaZNbho5TNTCi5UZe0RpA== +"@algolia/autocomplete-shared@1.5.2": + version "1.5.2" + resolved "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.5.2.tgz" + integrity sha512-ylQAYv5H0YKMfHgVWX0j0NmL8XBcAeeeVQUmppnnMtzDbDnca6CzhKj3Q8eF9cHCgcdTDdb5K+3aKyGWA0obug== + +"@algolia/cache-browser-local-storage@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.13.0.tgz" + integrity sha512-nj1vHRZauTqP/bluwkRIgEADEimqojJgoTRCel5f6q8WCa9Y8QeI4bpDQP28FoeKnDRYa3J5CauDlN466jqRhg== + dependencies: + "@algolia/cache-common" "4.13.0" + +"@algolia/cache-common@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.13.0.tgz" + integrity sha512-f9mdZjskCui/dA/fA/5a+6hZ7xnHaaZI5tM/Rw9X8rRB39SUlF/+o3P47onZ33n/AwkpSbi5QOyhs16wHd55kA== + +"@algolia/cache-in-memory@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.13.0.tgz" + integrity sha512-hHdc+ahPiMM92CQMljmObE75laYzNFYLrNOu0Q3/eyvubZZRtY2SUsEEgyUEyzXruNdzrkcDxFYa7YpWBJYHAg== + dependencies: + "@algolia/cache-common" "4.13.0" + +"@algolia/client-account@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.13.0.tgz" + integrity sha512-FzFqFt9b0g/LKszBDoEsW+dVBuUe1K3scp2Yf7q6pgHWM1WqyqUlARwVpLxqyc+LoyJkTxQftOKjyFUqddnPKA== + dependencies: + "@algolia/client-common" "4.13.0" + "@algolia/client-search" "4.13.0" + "@algolia/transporter" "4.13.0" + +"@algolia/client-analytics@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.13.0.tgz" + integrity sha512-klmnoq2FIiiMHImkzOm+cGxqRLLu9CMHqFhbgSy9wtXZrqb8BBUIUE2VyBe7azzv1wKcxZV2RUyNOMpFqmnRZA== + dependencies: + "@algolia/client-common" "4.13.0" + "@algolia/client-search" "4.13.0" + "@algolia/requester-common" "4.13.0" + "@algolia/transporter" "4.13.0" + +"@algolia/client-common@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.13.0.tgz" + integrity sha512-GoXfTp0kVcbgfSXOjfrxx+slSipMqGO9WnNWgeMmru5Ra09MDjrcdunsiiuzF0wua6INbIpBQFTC2Mi5lUNqGA== + dependencies: + "@algolia/requester-common" "4.13.0" + "@algolia/transporter" "4.13.0" + +"@algolia/client-personalization@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.13.0.tgz" + integrity sha512-KneLz2WaehJmNfdr5yt2HQETpLaCYagRdWwIwkTqRVFCv4DxRQ2ChPVW9jeTj4YfAAhfzE6F8hn7wkQ/Jfj6ZA== + dependencies: + "@algolia/client-common" "4.13.0" + "@algolia/requester-common" "4.13.0" + "@algolia/transporter" "4.13.0" + +"@algolia/client-search@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.13.0.tgz" + integrity sha512-blgCKYbZh1NgJWzeGf+caKE32mo3j54NprOf0LZVCubQb3Kx37tk1Hc8SDs9bCAE8hUvf3cazMPIg7wscSxspA== + dependencies: + "@algolia/client-common" "4.13.0" + "@algolia/requester-common" "4.13.0" + "@algolia/transporter" "4.13.0" + +"@algolia/events@^4.0.1": + version "4.0.1" + resolved "https://registry.npmjs.org/@algolia/events/-/events-4.0.1.tgz" + integrity sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ== -"@algolia/cache-browser-local-storage@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.9.3.tgz#44e6306a548a76c410b5f64a8a0a1b65f63183c9" - integrity sha512-t9yKMfPNxxEUk/PPbZtXj0GCttDk1pk0wV2eA5udIOgf+Wqb/77yH75zz1u8EmCBGPe+FWXjSVT/wS1tlQz7SA== - dependencies: - "@algolia/cache-common" "4.9.3" - -"@algolia/cache-common@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.9.3.tgz#0b3ca07c9af108433b4d3423a03511c3d053fed5" - integrity sha512-4dvzz28ESs7lRHmpBIjlmRloD9oGeD90E2C0QWNQYuAYosSdXGwW7vw4vdGRdPoL32t6u6S+47Bk6Dhcbw2ftA== - -"@algolia/cache-in-memory@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.9.3.tgz#0bae2ad1de6537ca28efaf5280051265903bfca5" - integrity sha512-e1eRpP/Ht9qmLw5Sp674N6Y0c59K0L2LBI71EBOlq1j+kVc+JxVO03he5g+nQ7JOwLijyJPrkbm3RvXb5CX0sA== - dependencies: - "@algolia/cache-common" "4.9.3" - -"@algolia/client-account@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.9.3.tgz#af9bf3612d05e87aa36372da50a2f0a9265de201" - integrity sha512-mSF0jiAo/tWKf/Z7mqhz6ETltrl+L+Zt2xuM3W5y1UOZvj47fn2ZcMRce8MQ+dd54t9iA8qIa+0XGlCSQf9lxA== - dependencies: - "@algolia/client-common" "4.9.3" - "@algolia/client-search" "4.9.3" - "@algolia/transporter" "4.9.3" - -"@algolia/client-analytics@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.9.3.tgz#cddb4a97d796291d91bd15735de008b2d80a0b1b" - integrity sha512-Z3EjegxsdTMRmOLoDBnCZJjdL3ZM4J/G7TMe2PIArdCJFWM4iDnO7/MvYasqpK0PPOCHRh0wS4yKG9rZOz6Vsw== - dependencies: - "@algolia/client-common" "4.9.3" - "@algolia/client-search" "4.9.3" - "@algolia/requester-common" "4.9.3" - "@algolia/transporter" "4.9.3" - -"@algolia/client-common@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.9.3.tgz#167a6863b55ffe7788ab9ac98b1b6fd0078f79df" - integrity sha512-6GAfuNqMrBN3094H0DzvQyxJoKUkyQpEr5OiFhH8I3lihI1rTtjEUrNDTsVp6e9VsR2OCRpnL9EEDv2HcGe8cw== - dependencies: - "@algolia/requester-common" "4.9.3" - "@algolia/transporter" "4.9.3" - -"@algolia/client-recommendation@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/client-recommendation/-/client-recommendation-4.9.3.tgz#e2031237b2904c9d9b946fc846c87a21ad67bc5a" - integrity sha512-r+MNluwnUTr1tgHWQ5BPRw0A0YJZp9sXjSVxPCY3a+N6BgLaX4E02+FA8VrqVs8uR7mMQSLaJHoeCKnmNPrk9w== - dependencies: - "@algolia/client-common" "4.9.3" - "@algolia/requester-common" "4.9.3" - "@algolia/transporter" "4.9.3" - -"@algolia/client-search@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.9.3.tgz#6259645ad5a7e7388727343806bcf2d0cf3e343a" - integrity sha512-8C6woYf6bY4Fh9H9nKY5IDDeBPwQ3nZn9QMQdgUj9ffDU8UzPqSivtLER1A+I81p1j9h+aBADRifwzIYtSXOkA== - dependencies: - "@algolia/client-common" "4.9.3" - "@algolia/requester-common" "4.9.3" - "@algolia/transporter" "4.9.3" - -"@algolia/logger-common@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.9.3.tgz#d9b976524313b11f11c6ec546e2ed451c7964a11" - integrity sha512-8hGQ5HQvjx2kr7GWOmpON1tcRX2+VHqVg4p+qJqCBsPFlXbAshUyRJkxuen20eem2EAA5Cmmo1fPy/jlqdMMHA== - -"@algolia/logger-console@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.9.3.tgz#f690bf8d5262a82425da26b42a519d7ec6c3784a" - integrity sha512-7FGulrAjS/oCVRShKJw5qFuyHOZk/44jolEtNtXvO/tZRR8hPPiow16Vrd3ByRSIhghkC5zj6at4nQhoPK+KqA== - dependencies: - "@algolia/logger-common" "4.9.3" - -"@algolia/requester-browser-xhr@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.9.3.tgz#1c0fd594e253b41786b3408ade9f63862fe0c577" - integrity sha512-hP4YgxcY1kol0d+joXpO4BJuXjgF+vy3eBPk8WCXvZucv8hl5Vqb4BLccDMck+sTqP4Tqglwh/KwVTQrpmi/wA== - dependencies: - "@algolia/requester-common" "4.9.3" - -"@algolia/requester-common@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.9.3.tgz#58fb72ca3f4f7714d75287ff568000ee6c2afac6" - integrity sha512-AgUw1iA/JkanZC+dhkSLyeiVgBhaaM3bI20f3cokuuDdz4X6F+hzi0vEpUZrEuNfnMLbUg8gxq3Vcg1/L9+9MA== - -"@algolia/requester-node-http@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.9.3.tgz#a2bf0e7048fe3b81c6b6b170f8f68a5789dadafe" - integrity sha512-+nz7rRnI9qNcdZjHpyAyvcDLAO9mGobqsAi0aicxMka/szU1HVUX6+pvSOiiOsD8ST3R13rJuufgHfWdDUysQg== - dependencies: - "@algolia/requester-common" "4.9.3" - -"@algolia/transporter@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.9.3.tgz#5a0933d4e59acdf88712156b2ab6f1b46c0a7f88" - integrity sha512-oJ68VSSpmUyB9EByqoyx25wgcrO9fgXtjH+pOtKoKmCW+RfxHW5agltJoQ808N8uq/AvP5ugMkRLGL3xf4WdzQ== +"@algolia/logger-common@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.13.0.tgz" + integrity sha512-8yqXk7rMtmQJ9wZiHOt/6d4/JDEg5VCk83gJ39I+X/pwUPzIsbKy9QiK4uJ3aJELKyoIiDT1hpYVt+5ia+94IA== + +"@algolia/logger-console@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.13.0.tgz" + integrity sha512-YepRg7w2/87L0vSXRfMND6VJ5d6699sFJBRWzZPOlek2p5fLxxK7O0VncYuc/IbVHEgeApvgXx0WgCEa38GVuQ== dependencies: - "@algolia/cache-common" "4.9.3" - "@algolia/logger-common" "4.9.3" - "@algolia/requester-common" "4.9.3" + "@algolia/logger-common" "4.13.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== +"@algolia/requester-browser-xhr@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.13.0.tgz" + integrity sha512-Dj+bnoWR5MotrnjblzGKZ2kCdQi2cK/VzPURPnE616NU/il7Ypy6U6DLGZ/ZYz+tnwPa0yypNf21uqt84fOgrg== + dependencies: + "@algolia/requester-common" "4.13.0" + +"@algolia/requester-common@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.13.0.tgz" + integrity sha512-BRTDj53ecK+gn7ugukDWOOcBRul59C4NblCHqj4Zm5msd5UnHFjd/sGX+RLOEoFMhetILAnmg6wMrRrQVac9vw== + +"@algolia/requester-node-http@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.13.0.tgz" + integrity sha512-9b+3O4QFU4azLhGMrZAr/uZPydvzOR4aEZfSL8ZrpLZ7fbbqTO0S/5EVko+QIgglRAtVwxvf8UJ1wzTD2jvKxQ== + dependencies: + "@algolia/requester-common" "4.13.0" + +"@algolia/transporter@4.13.0": + version "4.13.0" + resolved "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.13.0.tgz" + integrity sha512-8tSQYE+ykQENAdeZdofvtkOr5uJ9VcQSWgRhQ9h01AehtBIPAczk/b2CLrMsw5yQZziLs5cZ3pJ3478yI+urhA== dependencies: - "@babel/highlight" "^7.10.4" + "@algolia/cache-common" "4.13.0" + "@algolia/logger-common" "4.13.0" + "@algolia/requester-common" "4.13.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.5.5": +"@ampproject/remapping@^2.1.0": + version "2.2.0" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" + integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== + dependencies: + "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz" integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== dependencies: "@babel/highlight" "^7.14.5" +"@babel/code-frame@^7.16.0", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.8.3": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz" + integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== + dependencies: + "@babel/highlight" "^7.16.7" + "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.5.tgz#8ef4c18e58e801c5c95d3c1c0f2874a2680fadea" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.5.tgz" integrity sha512-kixrYn4JwfAVPa0f2yfzc2AWti6WRRyO3XjWW5PJAvtE11qhSayrrcrEnee05KAtNaPC+EwehE8Qt1UedEVB8w== +"@babel/compat-data@^7.17.0", "@babel/compat-data@^7.17.10": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz" + integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== + "@babel/core@7.12.9": version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz" integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== dependencies: "@babel/code-frame" "^7.10.4" @@ -166,54 +184,70 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.12.16", "@babel/core@^7.12.3": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab" - integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.5" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helpers" "^7.14.6" - "@babel/parser" "^7.14.6" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" +"@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.17.8": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.17.10.tgz" + integrity sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.10" + "@babel/helper-compilation-targets" "^7.17.10" + "@babel/helper-module-transforms" "^7.17.7" + "@babel/helpers" "^7.17.9" + "@babel/parser" "^7.17.10" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.10" + "@babel/types" "^7.17.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.1.2" + json5 "^2.2.1" semver "^6.3.0" - source-map "^0.5.0" -"@babel/generator@^7.12.15", "@babel/generator@^7.12.5", "@babel/generator@^7.14.5": +"@babel/generator@^7.12.5", "@babel/generator@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz" integrity sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA== dependencies: "@babel/types" "^7.14.5" jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.17.10", "@babel/generator@^7.17.7": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.17.10.tgz" + integrity sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg== + dependencies: + "@babel/types" "^7.17.10" + "@jridgewell/gen-mapping" "^0.1.0" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz#7bf478ec3b71726d56a8ca5775b046fc29879e61" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz" integrity sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA== dependencies: "@babel/types" "^7.14.5" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz#b939b43f8c37765443a19ae74ad8b15978e0a191" - integrity sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w== +"@babel/helper-annotate-as-pure@^7.16.7": + 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== dependencies: - "@babel/helper-explode-assignable-expression" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/types" "^7.16.7" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.16.7": + 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== + 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.14.5": +"@babel/helper-compilation-targets@^7.13.0": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz#7a99c5d0967911e972fe2c3411f7d5b498498ecf" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz" integrity sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw== dependencies: "@babel/compat-data" "^7.14.5" @@ -221,30 +255,49 @@ browserslist "^4.16.6" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.14.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz#f114469b6c06f8b5c59c6c4e74621f5085362542" - integrity sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg== +"@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.10": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz" + integrity sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-function-name" "^7.14.5" - "@babel/helper-member-expression-to-functions" "^7.14.5" - "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" - "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/compat-data" "^7.17.10" + "@babel/helper-validator-option" "^7.16.7" + browserslist "^4.20.2" + 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.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz" + 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.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4" + resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz" integrity sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A== dependencies: "@babel/helper-annotate-as-pure" "^7.14.5" regexpu-core "^4.7.1" -"@babel/helper-define-polyfill-provider@^0.2.2": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz#0525edec5094653a282688d34d846e4c75e9c0b6" - integrity sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew== +"@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.0": + version "7.17.0" + resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz" + 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.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz" + integrity sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA== dependencies: "@babel/helper-compilation-targets" "^7.13.0" "@babel/helper-module-imports" "^7.12.13" @@ -255,53 +308,89 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-explode-assignable-expression@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz#8aa72e708205c7bb643e45c73b4386cdf2a1f645" - integrity sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ== +"@babel/helper-environment-visitor@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz" + integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.16.7" + +"@babel/helper-explode-assignable-expression@^7.16.7": + 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== + dependencies: + "@babel/types" "^7.16.7" "@babel/helper-function-name@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz#89e2c474972f15d8e233b52ee8c480e2cfcd50c4" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz" integrity sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ== dependencies: "@babel/helper-get-function-arity" "^7.14.5" "@babel/template" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": + version "7.17.9" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz" + integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== + dependencies: + "@babel/template" "^7.16.7" + "@babel/types" "^7.17.0" + "@babel/helper-get-function-arity@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz#25fbfa579b0937eee1f3b805ece4ce398c431815" + resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz" integrity sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg== dependencies: "@babel/types" "^7.14.5" "@babel/helper-hoist-variables@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz#e0dd27c33a78e577d7c8884916a3e7ef1f7c7f8d" + resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz" integrity sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ== dependencies: "@babel/types" "^7.14.5" +"@babel/helper-hoist-variables@^7.16.7": + 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== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-member-expression-to-functions@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.5.tgz#d5c70e4ad13b402c95156c7a53568f504e2fb7b8" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.5.tgz" integrity sha512-UxUeEYPrqH1Q/k0yRku1JE7dyfyehNwT6SVkMHvYvPDv4+uu627VXBckVj891BO8ruKBkiDoGnZf4qPDD8abDQ== dependencies: "@babel/types" "^7.14.5" +"@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.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz" + integrity sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw== + dependencies: + "@babel/types" "^7.17.0" + "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz" integrity sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ== dependencies: "@babel/types" "^7.14.5" -"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.14.5": +"@babel/helper-module-imports@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz" + integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-module-transforms@^7.12.1": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz#7de42f10d789b423eb902ebd24031ca77cb1e10e" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz" integrity sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA== dependencies: "@babel/helper-module-imports" "^7.14.5" @@ -313,35 +402,61 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-module-transforms@^7.16.7", "@babel/helper-module-transforms@^7.17.7": + version "7.17.7" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz" + 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.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz" integrity sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA== dependencies: "@babel/types" "^7.14.5" +"@babel/helper-optimise-call-expression@^7.16.7": + 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== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-plugin-utils@7.10.4": version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== "@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.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz" integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== -"@babel/helper-remap-async-to-generator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz#51439c913612958f54a987a4ffc9ee587a2045d6" - integrity sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A== +"@babel/helper-plugin-utils@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz" + integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== + +"@babel/helper-remap-async-to-generator@^7.16.8": + 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== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-wrap-function" "^7.14.5" - "@babel/types" "^7.14.5" + "@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.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz#0ecc0b03c41cd567b4024ea016134c28414abb94" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz" integrity sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow== dependencies: "@babel/helper-member-expression-to-functions" "^7.14.5" @@ -349,211 +464,279 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" +"@babel/helper-replace-supers@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz" + 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.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz" integrity sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw== dependencies: "@babel/types" "^7.14.5" -"@babel/helper-skip-transparent-expression-wrappers@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz#96f486ac050ca9f44b009fbe5b7d394cab3a0ee4" - integrity sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ== +"@babel/helper-simple-access@^7.17.7": + version "7.17.7" + resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz" + integrity sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.17.0" + +"@babel/helper-skip-transparent-expression-wrappers@^7.16.0": + 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== + dependencies: + "@babel/types" "^7.16.0" "@babel/helper-split-export-declaration@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz#22b23a54ef51c2b7605d851930c1976dd0bc693a" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz" integrity sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA== dependencies: "@babel/types" "^7.14.5" +"@babel/helper-split-export-declaration@^7.16.7": + 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== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-validator-identifier@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz" integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== -"@babel/helper-validator-option@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" - integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== +"@babel/helper-validator-identifier@^7.16.7": + 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== -"@babel/helper-wrap-function@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz#5919d115bf0fe328b8a5d63bcb610f51601f2bff" - integrity sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ== +"@babel/helper-validator-option@^7.14.5", "@babel/helper-validator-option@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz" + integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== + +"@babel/helper-wrap-function@^7.16.8": + version "7.16.8" + resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz" + integrity sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw== dependencies: - "@babel/helper-function-name" "^7.14.5" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@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.12.5", "@babel/helpers@^7.14.6": +"@babel/helpers@^7.12.5": version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.6.tgz#5b58306b95f1b47e2a0199434fa8658fa6c21635" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz" integrity sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA== dependencies: "@babel/template" "^7.14.5" "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": +"@babel/helpers@^7.17.9": + version "7.17.9" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz" + 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.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz" integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== dependencies: "@babel/helper-validator-identifier" "^7.14.5" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.16", "@babel/parser@^7.12.7", "@babel/parser@^7.14.5", "@babel/parser@^7.14.6": +"@babel/highlight@^7.16.7": + version "7.17.9" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz" + 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.12.7", "@babel/parser@^7.14.5": version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.14.6.tgz" integrity sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ== -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz#4b467302e1548ed3b1be43beae2cc9cf45e0bb7e" - integrity sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ== +"@babel/parser@^7.16.7", "@babel/parser@^7.17.10", "@babel/parser@^7.17.8": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.17.10.tgz" + integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" - "@babel/plugin-proposal-optional-chaining" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-proposal-async-generator-functions@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.5.tgz#4024990e3dd74181f4f426ea657769ff49a2df39" - integrity sha512-tbD/CG3l43FIXxmu4a7RBe4zH7MLJ+S/lFowPFO7HetS2hyOZ/0nnnznegDuzFzfkyQYTxqdTH/hKmuBngaDAA== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-remap-async-to-generator" "^7.14.5" + "@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.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz" + 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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz#40d1ee140c5b1e31a350f4f5eed945096559b42e" - integrity sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg== +"@babel/plugin-proposal-class-properties@^7.16.7": + 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== dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-proposal-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz#158e9e10d449c3849ef3ecde94a03d9f1841b681" - integrity sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg== +"@babel/plugin-proposal-class-static-block@^7.17.6": + version "7.17.6" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz" + integrity sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA== dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz#0c6617df461c0c1f8fff3b47cd59772360101d2c" - integrity sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g== +"@babel/plugin-proposal-dynamic-import@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz#dbad244310ce6ccd083072167d8cea83a52faf76" - integrity sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA== +"@babel/plugin-proposal-export-namespace-from@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz#38de60db362e83a3d8c944ac858ddf9f0c2239eb" - integrity sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ== +"@babel/plugin-proposal-json-strings@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz#6e6229c2a99b02ab2915f82571e0cc646a40c738" - integrity sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw== +"@babel/plugin-proposal-logical-assignment-operators@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz#ee38589ce00e2cc59b299ec3ea406fcd3a0fdaf6" - integrity sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg== +"@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz#83631bf33d9a51df184c2102a069ac0c58c05f18" - integrity sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg== +"@babel/plugin-proposal-numeric-separator@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-proposal-object-rest-spread@7.12.1": 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" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz" 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-object-rest-spread@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.5.tgz#e581d5ccdfa187ea6ed73f56c6a21c1580b90fbf" - integrity sha512-VzMyY6PWNPPT3pxc5hi9LloKNr4SSrVCg7Yr6aZpW4Ym07r7KqSU/QXYwjXLVxqwSv0t/XSXkFoKBPUkZ8vb2A== +"@babel/plugin-proposal-object-rest-spread@^7.17.3": + version "7.17.3" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz" + integrity sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw== dependencies: - "@babel/compat-data" "^7.14.5" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@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.14.5" + "@babel/plugin-transform-parameters" "^7.16.7" -"@babel/plugin-proposal-optional-catch-binding@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz#939dd6eddeff3a67fdf7b3f044b5347262598c3c" - integrity sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ== +"@babel/plugin-proposal-optional-catch-binding@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz#fa83651e60a360e3f13797eef00b8d519695b603" - integrity sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ== +"@babel/plugin-proposal-optional-chaining@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz#37446495996b2945f30f5be5b60d5e2aa4f5792d" - integrity sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g== +"@babel/plugin-proposal-private-methods@^7.16.11": + version "7.16.11" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz" + integrity sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-create-class-features-plugin" "^7.16.10" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-proposal-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz#9f65a4d0493a940b4c01f8aa9d3f1894a587f636" - integrity sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q== +"@babel/plugin-proposal-private-property-in-object@^7.16.7": + 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== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-create-class-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@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.14.5", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": +"@babel/plugin-proposal-unicode-property-regex@^7.16.7": + 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== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz" integrity sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.14.5" @@ -561,457 +744,475 @@ "@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" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" 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" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" 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" + 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== 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" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz" 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" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz" 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" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" 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" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz" integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz#000e2e25d8673cce49300517a3eda44c263e4201" - integrity sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw== +"@babel/plugin-syntax-jsx@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz" + integrity sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@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" + 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== 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" + 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== 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" + 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== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@7.8.3", "@babel/plugin-syntax-object-rest-spread@^7.8.0", "@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" + 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== 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" + 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== 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" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" 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" + 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== 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" + 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== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz#b82c6ce471b165b5ce420cf92914d6fb46225716" - integrity sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q== +"@babel/plugin-syntax-typescript@^7.16.7": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.10.tgz" + integrity sha512-xJefea1DWXW09pW4Tm9bjwVlPDyYA2it3fWlmEjpYz6alPvTUjL0EOzNzI/FEOyI3r4/J7uVH5UqKgl1TQ5hqQ== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-arrow-functions@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz#f7187d9588a768dd080bf4c9ffe117ea62f7862a" - integrity sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A== +"@babel/plugin-transform-arrow-functions@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-async-to-generator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz#72c789084d8f2094acb945633943ef8443d39e67" - integrity sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA== +"@babel/plugin-transform-async-to-generator@^7.16.8": + 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== dependencies: - "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-remap-async-to-generator" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz#e48641d999d4bc157a67ef336aeb54bc44fd3ad4" - integrity sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ== +"@babel/plugin-transform-block-scoped-functions@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-block-scoping@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz#8cc63e61e50f42e078e6f09be775a75f23ef9939" - integrity sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw== +"@babel/plugin-transform-block-scoping@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-classes@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz#0e98e82097b38550b03b483f9b51a78de0acb2cf" - integrity sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA== +"@babel/plugin-transform-classes@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz" + integrity sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-function-name" "^7.14.5" - "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" - "@babel/helper-split-export-declaration" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz#1b9d78987420d11223d41195461cc43b974b204f" - integrity sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg== +"@babel/plugin-transform-computed-properties@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-destructuring@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.5.tgz#d32ad19ff1a6da1e861dc62720d80d9776e3bf35" - integrity sha512-wU9tYisEbRMxqDezKUqC9GleLycCRoUsai9ddlsq54r8QRLaeEhc+d+9DqCG+kV9W2GgQjTZESPTpn5bAFMDww== +"@babel/plugin-transform-destructuring@^7.17.7": + version "7.17.7" + resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz" + integrity sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-dotall-regex@^7.14.5", "@babel/plugin-transform-dotall-regex@^7.4.4": +"@babel/plugin-transform-dotall-regex@^7.16.7": + 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== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-dotall-regex@^7.4.4": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz" integrity sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-duplicate-keys@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz#365a4844881bdf1501e3a9f0270e7f0f91177954" - integrity sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A== +"@babel/plugin-transform-duplicate-keys@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-exponentiation-operator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz#5154b8dd6a3dfe6d90923d61724bd3deeb90b493" - integrity sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA== +"@babel/plugin-transform-exponentiation-operator@^7.16.7": + 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== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-for-of@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz#dae384613de8f77c196a8869cbf602a44f7fc0eb" - integrity sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA== +"@babel/plugin-transform-for-of@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-function-name@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz#e81c65ecb900746d7f31802f6bed1f52d915d6f2" - integrity sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ== +"@babel/plugin-transform-function-name@^7.16.7": + 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== dependencies: - "@babel/helper-function-name" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz#41d06c7ff5d4d09e3cf4587bd3ecf3930c730f78" - integrity sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A== +"@babel/plugin-transform-literals@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-member-expression-literals@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz#b39cd5212a2bf235a617d320ec2b48bcc091b8a7" - integrity sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q== +"@babel/plugin-transform-member-expression-literals@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-modules-amd@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz#4fd9ce7e3411cb8b83848480b7041d83004858f7" - integrity sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g== +"@babel/plugin-transform-modules-amd@^7.16.7": + 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== dependencies: - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz#7aaee0ea98283de94da98b28f8c35701429dad97" - integrity sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A== +"@babel/plugin-transform-modules-commonjs@^7.17.9": + version "7.17.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.9.tgz" + integrity sha512-2TBFd/r2I6VlYn0YRTz2JdazS+FoUuQ2rIFHoAxtyP/0G3D82SBLaRq9rnUkpqlLg03Byfl/+M32mpxjO6KaPw== dependencies: - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-simple-access" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz#c75342ef8b30dcde4295d3401aae24e65638ed29" - integrity sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA== +"@babel/plugin-transform-modules-systemjs@^7.17.8": + version "7.17.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz" + integrity sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw== dependencies: - "@babel/helper-hoist-variables" "^7.14.5" - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.5" + "@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.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz#fb662dfee697cce274a7cda525190a79096aa6e0" - integrity sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA== +"@babel/plugin-transform-modules-umd@^7.16.7": + 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== dependencies: - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-named-capturing-groups-regex@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.5.tgz#d537e8ee083ee6f6aa4f4eef9d2081d555746e4c" - integrity sha512-+Xe5+6MWFo311U8SchgeX5c1+lJM+eZDBZgD+tvXu9VVQPXwwVzeManMMjYX6xw2HczngfOSZjoFYKwdeB/Jvw== +"@babel/plugin-transform-named-capturing-groups-regex@^7.17.10": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.10.tgz" + integrity sha512-v54O6yLaJySCs6mGzaVOUw9T967GnH38T6CQSAtnzdNPwu84l2qAjssKzo/WSO8Yi7NF+7ekm5cVbF/5qiIgNA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-create-regexp-features-plugin" "^7.17.0" -"@babel/plugin-transform-new-target@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz#31bdae8b925dc84076ebfcd2a9940143aed7dbf8" - integrity sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ== +"@babel/plugin-transform-new-target@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-object-super@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz#d0b5faeac9e98597a161a9cf78c527ed934cdc45" - integrity sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg== +"@babel/plugin-transform-object-super@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" -"@babel/plugin-transform-parameters@^7.12.1", "@babel/plugin-transform-parameters@^7.14.5": +"@babel/plugin-transform-parameters@^7.12.1": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz#49662e86a1f3ddccac6363a7dfb1ff0a158afeb3" + resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz" integrity sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA== dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-property-literals@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz#0ddbaa1f83db3606f1cdf4846fa1dfb473458b34" - integrity sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-react-constant-elements@^7.12.1": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.14.5.tgz#41790d856f7c5cec82d2bcf5d0e5064d682522ed" - integrity sha512-NBqLEx1GxllIOXJInJAQbrnwwYJsV3WaMHIcOwD8rhYS0AabTWn7kHdHgPgu5RmHLU0q4DMxhAMu8ue/KampgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-react-display-name@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.14.5.tgz#baa92d15c4570411301a85a74c13534873885b65" - integrity sha512-07aqY1ChoPgIxsuDviptRpVkWCSbXWmzQqcgy65C6YSFOfPFvb/DX3bBRHh7pCd/PMEEYHYWUTSVkCbkVainYQ== +"@babel/plugin-transform-parameters@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-react-jsx-development@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz#1a6c73e2f7ed2c42eebc3d2ad60b0c7494fcb9af" - integrity sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ== +"@babel/plugin-transform-property-literals@^7.16.7": + 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== dependencies: - "@babel/plugin-transform-react-jsx" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-react-jsx@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.5.tgz#39749f0ee1efd8a1bd729152cf5f78f1d247a44a" - integrity sha512-7RylxNeDnxc1OleDm0F5Q/BSL+whYRbOAR+bwgCxIr0L32v7UFh/pz1DLMZideAUxKT6eMoS2zQH6fyODLEi8Q== +"@babel/plugin-transform-react-constant-elements@^7.12.1", "@babel/plugin-transform-react-constant-elements@^7.14.5": + version "7.17.6" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.17.6.tgz" + integrity sha512-OBv9VkyyKtsHZiHLoSfCn+h6yU7YKX8nrs32xUmOa1SRSk+t03FosB6fBZ0Yz4BpD1WV7l73Nsad+2Tz7APpqw== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-jsx" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-react-pure-annotations@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz#18de612b84021e3a9802cbc212c9d9f46d0d11fc" - integrity sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g== +"@babel/plugin-transform-react-display-name@^7.16.7": + 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== dependencies: - "@babel/helper-annotate-as-pure" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-regenerator@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz#9676fd5707ed28f522727c5b3c0aa8544440b04f" - integrity sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg== +"@babel/plugin-transform-react-jsx-development@^7.16.7": + 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== dependencies: - regenerator-transform "^0.14.2" + "@babel/plugin-transform-react-jsx" "^7.16.7" -"@babel/plugin-transform-reserved-words@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz#c44589b661cfdbef8d4300dcc7469dffa92f8304" - integrity sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg== +"@babel/plugin-transform-react-jsx@^7.16.7": + version "7.17.3" + resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz" + integrity sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@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-runtime@^7.12.15": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.5.tgz#30491dad49c6059f8f8fa5ee8896a0089e987523" - integrity sha512-fPMBhh1AV8ZyneiCIA+wYYUH1arzlXR1UMcApjvchDhfKxhy2r2lReJv8uHEyihi4IFIGlr1Pdx7S5fkESDQsg== +"@babel/plugin-transform-react-pure-annotations@^7.16.7": + 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== dependencies: - "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - babel-plugin-polyfill-corejs2 "^0.2.2" - babel-plugin-polyfill-corejs3 "^0.2.2" - babel-plugin-polyfill-regenerator "^0.2.2" - semver "^6.3.0" + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-shorthand-properties@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz#97f13855f1409338d8cadcbaca670ad79e091a58" - integrity sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g== +"@babel/plugin-transform-regenerator@^7.17.9": + version "7.17.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.17.9.tgz" + integrity sha512-Lc2TfbxR1HOyn/c6b4Y/b6NHoTb67n/IoWLxTu4kC7h4KQnWlhCq2S8Tx0t2SVvv5Uu87Hs+6JEJ5kt2tYGylQ== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + regenerator-transform "^0.15.0" -"@babel/plugin-transform-spread@^7.14.5": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz#6bd40e57fe7de94aa904851963b5616652f73144" - integrity sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag== +"@babel/plugin-transform-reserved-words@^7.16.7": + 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== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" - -"@babel/plugin-transform-sticky-regex@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz#5b617542675e8b7761294381f3c28c633f40aeb9" - integrity sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-template-literals@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz#a5f2bc233937d8453885dc736bdd8d9ffabf3d93" - integrity sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg== +"@babel/plugin-transform-runtime@^7.17.0": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.10.tgz" + integrity sha512-6jrMilUAJhktTr56kACL8LnWC5hx3Lf27BS0R0DSyW/OoJfb/iTHeE96V3b1dgKG3FSFdd/0culnYWMkjcKCig== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-typeof-symbol@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz#39af2739e989a2bd291bf6b53f16981423d457d4" - integrity sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-typescript@^7.14.5": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.6.tgz#6e9c2d98da2507ebe0a883b100cde3c7279df36c" - integrity sha512-XlTdBq7Awr4FYIzqhmYY80WN0V0azF74DMPyFqVHBvf81ZUgc4X7ZOpx6O8eLDK6iM5cCQzeyJw0ynTaefixRA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.6" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-typescript" "^7.14.5" - -"@babel/plugin-transform-unicode-escapes@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz#9d4bd2a681e3c5d7acf4f57fa9e51175d91d0c6b" - integrity sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-unicode-regex@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz#4cd09b6c8425dd81255c7ceb3fb1836e7414382e" - integrity sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + babel-plugin-polyfill-corejs2 "^0.3.0" + babel-plugin-polyfill-corejs3 "^0.5.0" + babel-plugin-polyfill-regenerator "^0.3.0" + semver "^6.3.0" -"@babel/preset-env@^7.12.1", "@babel/preset-env@^7.12.16": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.14.5.tgz#c0c84e763661fd0e74292c3d511cb33b0c668997" - integrity sha512-ci6TsS0bjrdPpWGnQ+m4f+JSSzDKlckqKIJJt9UZ/+g7Zz9k0N8lYU8IeLg/01o2h8LyNZDMLGgRLDTxpudLsA== - dependencies: - "@babel/compat-data" "^7.14.5" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-validator-option" "^7.14.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.14.5" - "@babel/plugin-proposal-async-generator-functions" "^7.14.5" - "@babel/plugin-proposal-class-properties" "^7.14.5" - "@babel/plugin-proposal-class-static-block" "^7.14.5" - "@babel/plugin-proposal-dynamic-import" "^7.14.5" - "@babel/plugin-proposal-export-namespace-from" "^7.14.5" - "@babel/plugin-proposal-json-strings" "^7.14.5" - "@babel/plugin-proposal-logical-assignment-operators" "^7.14.5" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.5" - "@babel/plugin-proposal-numeric-separator" "^7.14.5" - "@babel/plugin-proposal-object-rest-spread" "^7.14.5" - "@babel/plugin-proposal-optional-catch-binding" "^7.14.5" - "@babel/plugin-proposal-optional-chaining" "^7.14.5" - "@babel/plugin-proposal-private-methods" "^7.14.5" - "@babel/plugin-proposal-private-property-in-object" "^7.14.5" - "@babel/plugin-proposal-unicode-property-regex" "^7.14.5" +"@babel/plugin-transform-shorthand-properties@^7.16.7": + 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== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-spread@^7.16.7": + 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== + 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.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz" + 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.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz" + 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.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz" + integrity sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-typescript@^7.16.7": + version "7.16.8" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz" + integrity sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-typescript" "^7.16.7" + +"@babel/plugin-transform-unicode-escapes@^7.16.7": + 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== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-unicode-regex@^7.16.7": + 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== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/preset-env@^7.12.1", "@babel/preset-env@^7.15.6", "@babel/preset-env@^7.16.11": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.17.10.tgz" + integrity sha512-YNgyBHZQpeoBSRBg0xixsZzfT58Ze1iZrajvv0lJc70qDDGuGfonEnMGfWeSY0mQ3JTuCWFbMkzFRVafOyJx4g== + dependencies: + "@babel/compat-data" "^7.17.10" + "@babel/helper-compilation-targets" "^7.17.10" + "@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.17.6" + "@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.17.3" + "@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" @@ -1026,50 +1227,50 @@ "@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.14.5" - "@babel/plugin-transform-async-to-generator" "^7.14.5" - "@babel/plugin-transform-block-scoped-functions" "^7.14.5" - "@babel/plugin-transform-block-scoping" "^7.14.5" - "@babel/plugin-transform-classes" "^7.14.5" - "@babel/plugin-transform-computed-properties" "^7.14.5" - "@babel/plugin-transform-destructuring" "^7.14.5" - "@babel/plugin-transform-dotall-regex" "^7.14.5" - "@babel/plugin-transform-duplicate-keys" "^7.14.5" - "@babel/plugin-transform-exponentiation-operator" "^7.14.5" - "@babel/plugin-transform-for-of" "^7.14.5" - "@babel/plugin-transform-function-name" "^7.14.5" - "@babel/plugin-transform-literals" "^7.14.5" - "@babel/plugin-transform-member-expression-literals" "^7.14.5" - "@babel/plugin-transform-modules-amd" "^7.14.5" - "@babel/plugin-transform-modules-commonjs" "^7.14.5" - "@babel/plugin-transform-modules-systemjs" "^7.14.5" - "@babel/plugin-transform-modules-umd" "^7.14.5" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.14.5" - "@babel/plugin-transform-new-target" "^7.14.5" - "@babel/plugin-transform-object-super" "^7.14.5" - "@babel/plugin-transform-parameters" "^7.14.5" - "@babel/plugin-transform-property-literals" "^7.14.5" - "@babel/plugin-transform-regenerator" "^7.14.5" - "@babel/plugin-transform-reserved-words" "^7.14.5" - "@babel/plugin-transform-shorthand-properties" "^7.14.5" - "@babel/plugin-transform-spread" "^7.14.5" - "@babel/plugin-transform-sticky-regex" "^7.14.5" - "@babel/plugin-transform-template-literals" "^7.14.5" - "@babel/plugin-transform-typeof-symbol" "^7.14.5" - "@babel/plugin-transform-unicode-escapes" "^7.14.5" - "@babel/plugin-transform-unicode-regex" "^7.14.5" - "@babel/preset-modules" "^0.1.4" - "@babel/types" "^7.14.5" - babel-plugin-polyfill-corejs2 "^0.2.2" - babel-plugin-polyfill-corejs3 "^0.2.2" - babel-plugin-polyfill-regenerator "^0.2.2" - core-js-compat "^3.14.0" + "@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.17.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.17.9" + "@babel/plugin-transform-modules-systemjs" "^7.17.8" + "@babel/plugin-transform-modules-umd" "^7.16.7" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.17.10" + "@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.17.9" + "@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.17.10" + 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.22.1" semver "^6.3.0" -"@babel/preset-modules@^0.1.4": - 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== +"@babel/preset-modules@^0.1.5": + 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== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" @@ -1077,54 +1278,70 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@^7.12.13", "@babel/preset-react@^7.12.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.14.5.tgz#0fbb769513f899c2c56f3a882fa79673c2d4ab3c" - integrity sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-validator-option" "^7.14.5" - "@babel/plugin-transform-react-display-name" "^7.14.5" - "@babel/plugin-transform-react-jsx" "^7.14.5" - "@babel/plugin-transform-react-jsx-development" "^7.14.5" - "@babel/plugin-transform-react-pure-annotations" "^7.14.5" - -"@babel/preset-typescript@^7.12.16": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.14.5.tgz#aa98de119cf9852b79511f19e7f44a2d379bcce0" - integrity sha512-u4zO6CdbRKbS9TypMqrlGH7sd2TAJppZwn3c/ZRLeO/wGsbddxgbPDUZVNrie3JWYLQ9vpineKlsrWFvO6Pwkw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/helper-validator-option" "^7.14.5" - "@babel/plugin-transform-typescript" "^7.14.5" - -"@babel/runtime-corejs3@^7.12.13": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.14.6.tgz#066b966eda40481740180cb3caab861a3f208cd3" - integrity sha512-Xl8SPYtdjcMoCsIM4teyVRg7jIcgl8F2kRtoCcXuHzXswt9UxZCS6BzRo8fcnCuP6u2XtPgvyonmEPF57Kxo9Q== - dependencies: - core-js-pure "^3.14.0" +"@babel/preset-react@^7.12.5", "@babel/preset-react@^7.14.5", "@babel/preset-react@^7.16.7": + 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== + 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/preset-typescript@^7.15.0", "@babel/preset-typescript@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.16.7.tgz" + integrity sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-validator-option" "^7.16.7" + "@babel/plugin-transform-typescript" "^7.16.7" + +"@babel/runtime-corejs3@^7.17.8": + version "7.17.9" + resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.17.9.tgz" + integrity sha512-WxYHHUWF2uZ7Hp1K+D1xQgbgkGUfA+5UPOegEXGt2Y5SMog/rYCVaifLZDbw8UkNXozEqqrZTy6bglL7xTaCOw== + dependencies: + core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.8.4": version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.6.tgz#535203bc0892efc7dec60bdc27b2ecf6e409062d" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz" integrity sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg== dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.17.8": + version "7.17.9" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz" + integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.12.7", "@babel/template@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz" integrity sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g== dependencies: "@babel/code-frame" "^7.14.5" "@babel/parser" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/traverse@^7.12.13", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5": +"@babel/template@^7.16.7": + version "7.16.7" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz" + 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.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.5.tgz#c111b0f58afab4fea3d3385a406f692748c59870" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.5.tgz" integrity sha512-G3BiS15vevepdmFqmUc9X+64y0viZYygubAMO8SvBmKARuF6CPSZtH4Ng9vi/lrWlZFGe3FWdXNy835akH8Glg== dependencies: "@babel/code-frame" "^7.14.5" @@ -1137,394 +1354,480 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.10", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.10.tgz" + integrity sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.10" + "@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.10" + "@babel/types" "^7.17.10" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.14.5", "@babel/types@^7.4.4": version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz" integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg== dependencies: "@babel/helper-validator-identifier" "^7.14.5" to-fast-properties "^2.0.0" -"@docsearch/css@3.0.0-alpha.39": - version "3.0.0-alpha.39" - resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.0.0-alpha.39.tgz#1ebd390d93e06aad830492f5ffdc8e05d058813f" - integrity sha512-lr10MFTgcR3NRea/FtJ7uNtIpQz0XVwYxbpO5wxykgfHu1sxZTr6zwkuPquRgFYXnccxsTvfoIiK3rMH0fLr/w== +"@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.10": + version "7.17.10" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.17.10.tgz" + integrity sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" -"@docsearch/react@^3.0.0-alpha.39": - version "3.0.0-alpha.39" - resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.0.0-alpha.39.tgz#bbd253f6fc591f63c1a171e7ef2da26b253164d9" - integrity sha512-urTIt82tan6CU+D2kO6xXpWQom/r1DA7L/55m2JiCIK/3SLh2z15FJFVN2abeK7B4wl8pCfWunYOwCsSHhWDLA== +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@docsearch/css@3.0.0": + version "3.0.0" + resolved "https://registry.npmjs.org/@docsearch/css/-/css-3.0.0.tgz" + integrity sha512-1kkV7tkAsiuEd0shunYRByKJe3xQDG2q7wYg24SOw1nV9/2lwEd4WrUYRJC/ukGTl2/kHeFxsaUvtiOy0y6fFA== + +"@docsearch/react@^3.0.0": + version "3.0.0" + resolved "https://registry.npmjs.org/@docsearch/react/-/react-3.0.0.tgz" + integrity sha512-yhMacqS6TVQYoBh/o603zszIb5Bl8MIXuOc6Vy617I74pirisDzzcNh0NEaYQt50fVVR3khUbeEhUEWEWipESg== dependencies: - "@algolia/autocomplete-core" "1.2.1" - "@algolia/autocomplete-preset-algolia" "1.2.1" - "@docsearch/css" "3.0.0-alpha.39" + "@algolia/autocomplete-core" "1.5.2" + "@algolia/autocomplete-preset-algolia" "1.5.2" + "@docsearch/css" "3.0.0" algoliasearch "^4.0.0" -"@docusaurus/core@2.0.0-beta.4", "@docusaurus/core@^2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-beta.4.tgz#b41c5064c8737405cfceb1a373c9c5aa3410fd95" - integrity sha512-ITa976MPFl9KbYchMOWCCX6SU6EFDSdGeGOHtpaNcrJ9e9Sj7o77fKmMH/ciShwz1g8brTm3VxZ0FwleU8lTig== +"@docusaurus/core@2.0.0-beta.18", "@docusaurus/core@^2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/core/-/core-2.0.0-beta.18.tgz" + integrity sha512-puV7l+0/BPSi07Xmr8tVktfs1BzhC8P5pm6Bs2CfvysCJ4nefNCD1CosPc1PGBWy901KqeeEJ1aoGwj9tU3AUA== dependencies: - "@babel/core" "^7.12.16" - "@babel/generator" "^7.12.15" + "@babel/core" "^7.17.8" + "@babel/generator" "^7.17.7" "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-transform-runtime" "^7.12.15" - "@babel/preset-env" "^7.12.16" - "@babel/preset-react" "^7.12.13" - "@babel/preset-typescript" "^7.12.16" - "@babel/runtime" "^7.12.5" - "@babel/runtime-corejs3" "^7.12.13" - "@babel/traverse" "^7.12.13" - "@docusaurus/cssnano-preset" "2.0.0-beta.4" - "@docusaurus/react-loadable" "5.5.0" - "@docusaurus/types" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@docusaurus/utils-common" "2.0.0-beta.4" - "@docusaurus/utils-validation" "2.0.0-beta.4" - "@slorber/static-site-generator-webpack-plugin" "^4.0.0" - "@svgr/webpack" "^5.5.0" - autoprefixer "^10.2.5" - babel-loader "^8.2.2" + "@babel/plugin-transform-runtime" "^7.17.0" + "@babel/preset-env" "^7.16.11" + "@babel/preset-react" "^7.16.7" + "@babel/preset-typescript" "^7.16.7" + "@babel/runtime" "^7.17.8" + "@babel/runtime-corejs3" "^7.17.8" + "@babel/traverse" "^7.17.3" + "@docusaurus/cssnano-preset" "2.0.0-beta.18" + "@docusaurus/logger" "2.0.0-beta.18" + "@docusaurus/mdx-loader" "2.0.0-beta.18" + "@docusaurus/react-loadable" "5.5.2" + "@docusaurus/utils" "2.0.0-beta.18" + "@docusaurus/utils-common" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + "@slorber/static-site-generator-webpack-plugin" "^4.0.4" + "@svgr/webpack" "^6.2.1" + autoprefixer "^10.4.4" + babel-loader "^8.2.4" babel-plugin-dynamic-import-node "2.3.0" - boxen "^5.0.1" - chalk "^4.1.1" - chokidar "^3.5.1" - clean-css "^5.1.2" + boxen "^6.2.1" + chokidar "^3.5.3" + clean-css "^5.2.4" + cli-table3 "^0.6.1" + combine-promises "^1.1.0" commander "^5.1.0" - copy-webpack-plugin "^9.0.0" - core-js "^3.9.1" - css-loader "^5.1.1" - css-minimizer-webpack-plugin "^3.0.1" - cssnano "^5.0.4" + copy-webpack-plugin "^10.2.4" + core-js "^3.21.1" + css-loader "^6.7.1" + css-minimizer-webpack-plugin "^3.4.1" + cssnano "^5.1.5" del "^6.0.0" detect-port "^1.3.0" escape-html "^1.0.3" - eta "^1.12.1" - express "^4.17.1" + eta "^1.12.3" file-loader "^6.2.0" - fs-extra "^10.0.0" - github-slugger "^1.3.0" - globby "^11.0.2" - html-minifier-terser "^5.1.1" + fs-extra "^10.0.1" + html-minifier-terser "^6.1.0" html-tags "^3.1.0" - html-webpack-plugin "^5.3.2" + html-webpack-plugin "^5.5.0" import-fresh "^3.3.0" is-root "^2.1.0" leven "^3.1.0" - lodash "^4.17.20" - mini-css-extract-plugin "^1.6.0" - module-alias "^2.2.2" + lodash "^4.17.21" + mini-css-extract-plugin "^2.6.0" nprogress "^0.2.0" - postcss "^8.2.15" - postcss-loader "^5.3.0" - prompts "^2.4.1" - react-dev-utils "^11.0.1" - react-error-overlay "^6.0.9" - react-helmet "^6.1.0" - react-loadable "^5.5.0" + postcss "^8.4.12" + postcss-loader "^6.2.1" + prompts "^2.4.2" + react-dev-utils "^12.0.0" + react-helmet-async "^1.2.3" + react-loadable "npm:@docusaurus/react-loadable@5.5.2" react-loadable-ssr-addon-v5-slorber "^1.0.1" react-router "^5.2.0" react-router-config "^5.1.1" react-router-dom "^5.2.0" - resolve-pathname "^3.0.0" - rtl-detect "^1.0.3" - semver "^7.3.4" + remark-admonitions "^1.2.1" + rtl-detect "^1.0.4" + semver "^7.3.5" serve-handler "^6.1.3" - shelljs "^0.8.4" - std-env "^2.2.1" - strip-ansi "^6.0.0" - terser-webpack-plugin "^5.1.3" - tslib "^2.2.0" + shelljs "^0.8.5" + terser-webpack-plugin "^5.3.1" + tslib "^2.3.1" update-notifier "^5.1.0" url-loader "^4.1.1" - wait-on "^5.3.0" - webpack "^5.40.0" - webpack-bundle-analyzer "^4.4.2" - webpack-dev-server "^3.11.2" + wait-on "^6.0.1" + webpack "^5.70.0" + webpack-bundle-analyzer "^4.5.0" + webpack-dev-server "^4.7.4" webpack-merge "^5.8.0" - webpackbar "^5.0.0-3" - -"@docusaurus/cssnano-preset@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.4.tgz#a40c0bee39143a531ca4dde05bb3a84bec416668" - integrity sha512-KsmFEob0ElffnFFbz93wcYH4IncU4LDnKBerdomU0Wdg/vXTLo3Q7no8df9yjbcBXVRaSX+/tNFapY9Iu/4Cew== - dependencies: - cssnano-preset-advanced "^5.1.1" - postcss "^8.2.15" - postcss-sort-media-queries "^3.10.11" - -"@docusaurus/mdx-loader@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-beta.4.tgz#cc1a88d693078be56c82571d1d88004dad0f18f4" - integrity sha512-dwYKFKcsgiMB/TECoieKnwQemBAozd2a+cm4xzrWhDzElvwlQPo/j45OOUb6U/H8NJp7DnAynLBqSyKJ3YZb4g== - dependencies: - "@babel/parser" "^7.12.16" - "@babel/traverse" "^7.12.13" - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@mdx-js/mdx" "^1.6.21" - "@mdx-js/react" "^1.6.21" - chalk "^4.1.1" + webpackbar "^5.0.2" + +"@docusaurus/cssnano-preset@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.18.tgz" + integrity sha512-VxhYmpyx16Wv00W9TUfLVv0NgEK/BwP7pOdWoaiELEIAMV7SO1+6iB8gsFUhtfKZ31I4uPVLMKrCyWWakoFeFA== + dependencies: + cssnano-preset-advanced "^5.3.1" + postcss "^8.4.12" + postcss-sort-media-queries "^4.2.1" + +"@docusaurus/logger@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/logger/-/logger-2.0.0-beta.18.tgz" + integrity sha512-frNe5vhH3mbPmH980Lvzaz45+n1PQl3TkslzWYXQeJOkFX17zUd3e3U7F9kR1+DocmAqHkgAoWuXVcvEoN29fg== + dependencies: + chalk "^4.1.2" + tslib "^2.3.1" + +"@docusaurus/mdx-loader@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-beta.18.tgz" + integrity sha512-pOmAQM4Y1jhuZTbEhjh4ilQa74Mh6Q0pMZn1xgIuyYDdqvIOrOlM/H0i34YBn3+WYuwsGim4/X0qynJMLDUA4A== + dependencies: + "@babel/parser" "^7.17.8" + "@babel/traverse" "^7.17.3" + "@docusaurus/logger" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + "@mdx-js/mdx" "^1.6.22" escape-html "^1.0.3" file-loader "^6.2.0" - fs-extra "^10.0.0" - github-slugger "^1.3.0" - gray-matter "^4.0.3" + fs-extra "^10.0.1" + image-size "^1.0.1" mdast-util-to-string "^2.0.0" remark-emoji "^2.1.0" stringify-object "^3.3.0" + tslib "^2.3.1" unist-util-visit "^2.0.2" url-loader "^4.1.1" - webpack "^5.40.0" - -"@docusaurus/plugin-content-blog@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-beta.4.tgz#dfa70cc364debd77e28683b733b254d6abec197c" - integrity sha512-NyLqoem/r/m8mNO3H1PbbPayA5KjgRTeB5T7j949uvGwlK34c+W6bSvr3OSRJdmFXqhFL4CG8E8wbSq7h+8WEA== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/mdx-loader" "2.0.0-beta.4" - "@docusaurus/types" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@docusaurus/utils-validation" "2.0.0-beta.4" - chalk "^4.1.1" - escape-string-regexp "^4.0.0" + webpack "^5.70.0" + +"@docusaurus/module-type-aliases@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-2.0.0-beta.18.tgz" + integrity sha512-e6mples8FZRyT7QyqidGS6BgkROjM+gljJsdOqoctbtBp+SZ5YDjwRHOmoY7eqEfsQNOaFZvT2hK38ui87hCRA== + dependencies: + "@docusaurus/types" "2.0.0-beta.18" + "@types/react" "*" + "@types/react-router-config" "*" + "@types/react-router-dom" "*" + react-helmet-async "*" + +"@docusaurus/plugin-content-blog@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-beta.18.tgz" + integrity sha512-qzK83DgB+mxklk3PQC2nuTGPQD/8ogw1nXSmaQpyXAyhzcz4CXAZ9Swl/Ee9A/bvPwQGnSHSP3xqIYl8OkFtfw== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/logger" "2.0.0-beta.18" + "@docusaurus/mdx-loader" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + "@docusaurus/utils-common" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + cheerio "^1.0.0-rc.10" feed "^4.2.2" - fs-extra "^10.0.0" - globby "^11.0.2" - loader-utils "^2.0.0" - lodash "^4.17.20" - reading-time "^1.3.0" + fs-extra "^10.0.1" + lodash "^4.17.21" + reading-time "^1.5.0" remark-admonitions "^1.2.1" - tslib "^2.2.0" - webpack "^5.40.0" - -"@docusaurus/plugin-content-docs@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-beta.4.tgz#6322bf44fd43ba2f1e79711d2651e1143c7b725a" - integrity sha512-aVYycpOvtgPQ78a10jakCtrI7DEAffw+zVdZT6tgO8QIn5hNPcr5NB7Ms3kSZw83fMZwJqStHHGp0y13zt/gLw== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/mdx-loader" "2.0.0-beta.4" - "@docusaurus/types" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@docusaurus/utils-validation" "2.0.0-beta.4" - chalk "^4.1.1" + tslib "^2.3.1" + utility-types "^3.10.0" + webpack "^5.70.0" + +"@docusaurus/plugin-content-docs@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-beta.18.tgz" + integrity sha512-z4LFGBJuzn4XQiUA7OEA2SZTqlp+IYVjd3NrCk/ZUfNi1tsTJS36ATkk9Y6d0Nsp7K2kRXqaXPsz4adDgeIU+Q== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/logger" "2.0.0-beta.18" + "@docusaurus/mdx-loader" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" combine-promises "^1.1.0" - escape-string-regexp "^4.0.0" - execa "^5.0.0" - fs-extra "^10.0.0" - globby "^11.0.2" - import-fresh "^3.2.2" - js-yaml "^4.0.0" - loader-utils "^1.2.3" - lodash "^4.17.20" + fs-extra "^10.0.1" + import-fresh "^3.3.0" + js-yaml "^4.1.0" + lodash "^4.17.21" remark-admonitions "^1.2.1" - shelljs "^0.8.4" - tslib "^2.2.0" + tslib "^2.3.1" utility-types "^3.10.0" - webpack "^5.40.0" - -"@docusaurus/plugin-content-pages@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-beta.4.tgz#47bdaa8d8711502f6ba75ba036ebd64a3991034e" - integrity sha512-VZ/iuxT1kgBh/1+W3Li88UZVjqHtHOt4TyFoVwHmf2p91BPHiF7zpiLb4hYL8s694/V+AdfWf4ostSyEoeMx8A== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/mdx-loader" "2.0.0-beta.4" - "@docusaurus/types" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@docusaurus/utils-validation" "2.0.0-beta.4" - globby "^11.0.2" - lodash "^4.17.20" + webpack "^5.70.0" + +"@docusaurus/plugin-content-pages@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-beta.18.tgz" + integrity sha512-CJ2Xeb9hQrMeF4DGywSDVX2TFKsQpc8ZA7czyeBAAbSFsoRyxXPYeSh8aWljqR4F1u/EKGSKy0Shk/D4wumaHw== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/mdx-loader" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + fs-extra "^10.0.1" remark-admonitions "^1.2.1" - tslib "^2.1.0" - webpack "^5.40.0" + tslib "^2.3.1" + webpack "^5.70.0" -"@docusaurus/plugin-debug@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-beta.4.tgz#7a69fee980a352cd338dba24d8e0d67f6f64ef0b" - integrity sha512-jc9o45NUuhVnFcoq6/6juxJQGgD2Q71IUokoOgw3sytHHOv1jv+eLWP1LDX71MHA1ElZ1MZTlz5mCd1wlzdCOw== +"@docusaurus/plugin-debug@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-beta.18.tgz" + integrity sha512-inLnLERgG7q0WlVmK6nYGHwVqREz13ivkynmNygEibJZToFRdgnIPW+OwD8QzgC5MpQTJw7+uYjcitpBumy1Gw== dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/types" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + fs-extra "^10.0.1" react-json-view "^1.21.3" - tslib "^2.1.0" - -"@docusaurus/plugin-google-analytics@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-beta.4.tgz#88d17bd1a2b5da35fe625fae43d32430595c087e" - integrity sha512-mqMEnfMKIoR1UfIX+jiAcUolwYntqSNaW8Gg2tg8dlGvC3payT1gpNJaew6TWyrtE29vuZz6a830bIXBYm4uAA== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - -"@docusaurus/plugin-google-gtag@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-beta.4.tgz#52f5922857680dfb2acc2099f08ac97d3edcb725" - integrity sha512-MZ0Rr6LBZLKMVFXxV7Kr+l0U3Yz/Yn8L2E5z9DbgVi+9tyLn4xlMzuMPG3gN9TZ8kPcQ1ZWwv9crA+138UzIkw== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - -"@docusaurus/plugin-sitemap@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-beta.4.tgz#60b189107af772ef2bbc94b83055eff8a3013da3" - integrity sha512-0sU1aMQmMN7fE3TlSM2wBZN/gFsuvo79DYxw8TIVtNakA84oDxurH/rhDQHwJ34JQufm5CuWNC1ICHtyI3qyWw== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/types" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@docusaurus/utils-common" "2.0.0-beta.4" - "@docusaurus/utils-validation" "2.0.0-beta.4" - fs-extra "^10.0.0" - sitemap "^7.0.0" - tslib "^2.2.0" - -"@docusaurus/preset-classic@^2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-beta.4.tgz#7f57be3368ed645ab634928d8564fe29b45136cd" - integrity sha512-fW8/iyGLJfBTtbCBQtnRcbDa+ZZMq6Ak20+8+ORB8mzjK4BNYmt9wIbfq0oV9/QBLyryQBYcsRimJoXpLZmWOg== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/plugin-content-blog" "2.0.0-beta.4" - "@docusaurus/plugin-content-docs" "2.0.0-beta.4" - "@docusaurus/plugin-content-pages" "2.0.0-beta.4" - "@docusaurus/plugin-debug" "2.0.0-beta.4" - "@docusaurus/plugin-google-analytics" "2.0.0-beta.4" - "@docusaurus/plugin-google-gtag" "2.0.0-beta.4" - "@docusaurus/plugin-sitemap" "2.0.0-beta.4" - "@docusaurus/theme-classic" "2.0.0-beta.4" - "@docusaurus/theme-search-algolia" "2.0.0-beta.4" - -"@docusaurus/react-loadable@5.5.0": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@docusaurus/react-loadable/-/react-loadable-5.5.0.tgz#6d6f0c8fd9a434b62a1ab1f8645ee7bde5a9ec21" - integrity sha512-Ld/kwUE6yATIOTLq3JCsWiTa/drisajwKqBQ2Rw6IcT+sFsKfYek8F2jSH8f68AT73xX97UehduZeCSlnuCBIg== - dependencies: + tslib "^2.3.1" + +"@docusaurus/plugin-google-analytics@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-beta.18.tgz" + integrity sha512-s9dRBWDrZ1uu3wFXPCF7yVLo/+5LUFAeoxpXxzory8gn9GYDt8ZDj80h5DUyCLxiy72OG6bXWNOYS/Vc6cOPXQ== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + tslib "^2.3.1" + +"@docusaurus/plugin-google-gtag@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-beta.18.tgz" + integrity sha512-h7vPuLVo/9pHmbFcvb4tCpjg4SxxX4k+nfVDyippR254FM++Z/nA5pRB0WvvIJ3ZTe0ioOb5Wlx2xdzJIBHUNg== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + tslib "^2.3.1" + +"@docusaurus/plugin-sitemap@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-beta.18.tgz" + integrity sha512-Klonht0Ye3FivdBpS80hkVYNOH+8lL/1rbCPEV92rKhwYdwnIejqhdKct4tUTCl8TYwWiyeUFQqobC/5FNVZPQ== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + "@docusaurus/utils-common" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + fs-extra "^10.0.1" + sitemap "^7.1.1" + tslib "^2.3.1" + +"@docusaurus/preset-classic@^2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-2.0.0-beta.18.tgz" + integrity sha512-TfDulvFt/vLWr/Yy7O0yXgwHtJhdkZ739bTlFNwEkRMAy8ggi650e52I1I0T79s67llecb4JihgHPW+mwiVkCQ== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/plugin-content-blog" "2.0.0-beta.18" + "@docusaurus/plugin-content-docs" "2.0.0-beta.18" + "@docusaurus/plugin-content-pages" "2.0.0-beta.18" + "@docusaurus/plugin-debug" "2.0.0-beta.18" + "@docusaurus/plugin-google-analytics" "2.0.0-beta.18" + "@docusaurus/plugin-google-gtag" "2.0.0-beta.18" + "@docusaurus/plugin-sitemap" "2.0.0-beta.18" + "@docusaurus/theme-classic" "2.0.0-beta.18" + "@docusaurus/theme-common" "2.0.0-beta.18" + "@docusaurus/theme-search-algolia" "2.0.0-beta.18" + +"@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": + version "5.5.2" + resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz" + integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== + dependencies: + "@types/react" "*" prop-types "^15.6.2" -"@docusaurus/theme-classic@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-beta.4.tgz#0f30f8d22770ab8bb2e2cacb006f2a2f675e16ce" - integrity sha512-gekEt/YuAEs7CLEJhBC5mE3AqXiDNL6U3WI9emokatpbPY7B12DLJ11QWJZ4mfKYWHuiTwPeybXkOySWMLuaaA== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/plugin-content-blog" "2.0.0-beta.4" - "@docusaurus/plugin-content-docs" "2.0.0-beta.4" - "@docusaurus/plugin-content-pages" "2.0.0-beta.4" - "@docusaurus/theme-common" "2.0.0-beta.4" - "@docusaurus/types" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@docusaurus/utils-common" "2.0.0-beta.4" - "@docusaurus/utils-validation" "2.0.0-beta.4" - "@mdx-js/mdx" "^1.6.21" - "@mdx-js/react" "^1.6.21" - chalk "^4.1.1" +"@docusaurus/theme-classic@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-2.0.0-beta.18.tgz" + integrity sha512-WJWofvSGKC4Luidk0lyUwkLnO3DDynBBHwmt4QrV+aAVWWSOHUjA2mPOF6GLGuzkZd3KfL9EvAfsU0aGE1Hh5g== + dependencies: + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/plugin-content-blog" "2.0.0-beta.18" + "@docusaurus/plugin-content-docs" "2.0.0-beta.18" + "@docusaurus/plugin-content-pages" "2.0.0-beta.18" + "@docusaurus/theme-common" "2.0.0-beta.18" + "@docusaurus/theme-translations" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + "@docusaurus/utils-common" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + "@mdx-js/react" "^1.6.22" clsx "^1.1.1" copy-text-to-clipboard "^3.0.1" - fs-extra "^10.0.0" - globby "^11.0.2" - infima "0.2.0-alpha.29" - lodash "^4.17.20" - parse-numeric-range "^1.2.0" - postcss "^8.2.15" - prism-react-renderer "^1.2.1" - prismjs "^1.23.0" - prop-types "^15.7.2" + infima "0.2.0-alpha.38" + lodash "^4.17.21" + postcss "^8.4.12" + prism-react-renderer "^1.3.1" + prismjs "^1.27.0" react-router-dom "^5.2.0" - rtlcss "^3.1.2" - -"@docusaurus/theme-common@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.0.0-beta.4.tgz#a60527fd436691621b10aeecfac09bf0feece019" - integrity sha512-RJ78rfb/K2dc/u/WDCZB8Q8mj19l7UtDx3F1yFC4WMwAd5tT8V5xlKc5UpHVJrKdc1c3Z4g+ki0wFm+LpCZj0w== - dependencies: - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/plugin-content-blog" "2.0.0-beta.4" - "@docusaurus/plugin-content-docs" "2.0.0-beta.4" - "@docusaurus/plugin-content-pages" "2.0.0-beta.4" - "@docusaurus/types" "2.0.0-beta.4" + rtlcss "^3.5.0" + +"@docusaurus/theme-common@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-2.0.0-beta.18.tgz" + integrity sha512-3pI2Q6ttScDVTDbuUKAx+TdC8wmwZ2hfWk8cyXxksvC9bBHcyzXhSgcK8LTsszn2aANyZ3e3QY2eNSOikTFyng== + dependencies: + "@docusaurus/module-type-aliases" "2.0.0-beta.18" + "@docusaurus/plugin-content-blog" "2.0.0-beta.18" + "@docusaurus/plugin-content-docs" "2.0.0-beta.18" + "@docusaurus/plugin-content-pages" "2.0.0-beta.18" clsx "^1.1.1" - fs-extra "^10.0.0" - tslib "^2.1.0" + parse-numeric-range "^1.3.0" + prism-react-renderer "^1.3.1" + tslib "^2.3.1" + utility-types "^3.10.0" -"@docusaurus/theme-search-algolia@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-beta.4.tgz#0c2051523428c4486ef1dd7cb5271b0d871f5c8e" - integrity sha512-W/DfGhlAe1Vl+IJiL9rCw8yswdUrX0lTyCMNRAFi749YN4vCWo2RoxylbUuWoV6lUKoIYfj3EGyotRT2OLqtZw== - dependencies: - "@docsearch/react" "^3.0.0-alpha.39" - "@docusaurus/core" "2.0.0-beta.4" - "@docusaurus/theme-common" "2.0.0-beta.4" - "@docusaurus/utils" "2.0.0-beta.4" - "@docusaurus/utils-validation" "2.0.0-beta.4" - algoliasearch "^4.8.4" - algoliasearch-helper "^3.3.4" +"@docusaurus/theme-search-algolia@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-beta.18.tgz" + integrity sha512-2w97KO/gnjI49WVtYQqENpQ8iO1Sem0yaTxw7/qv/ndlmIAQD0syU4yx6GsA7bTQCOGwKOWWzZSetCgUmTnWgA== + dependencies: + "@docsearch/react" "^3.0.0" + "@docusaurus/core" "2.0.0-beta.18" + "@docusaurus/logger" "2.0.0-beta.18" + "@docusaurus/plugin-content-docs" "2.0.0-beta.18" + "@docusaurus/theme-common" "2.0.0-beta.18" + "@docusaurus/theme-translations" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + "@docusaurus/utils-validation" "2.0.0-beta.18" + algoliasearch "^4.13.0" + algoliasearch-helper "^3.7.4" clsx "^1.1.1" - eta "^1.12.1" - lodash "^4.17.20" + eta "^1.12.3" + fs-extra "^10.0.1" + lodash "^4.17.21" + tslib "^2.3.1" + utility-types "^3.10.0" -"@docusaurus/types@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-beta.4.tgz#9eef0a88b008ebd65bb9870b7ff0050de0e620c4" - integrity sha512-2aMCliUCBYhZO8UiiPIKpRu2KECtqt0nRu44EbN6rj1STf695AIOhJC1Zo5TiuW2WbiljSbkJTgG3XdBZ3FUBw== +"@docusaurus/theme-translations@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/theme-translations/-/theme-translations-2.0.0-beta.18.tgz" + integrity sha512-1uTEUXlKC9nco1Lx9H5eOwzB+LP4yXJG5wfv1PMLE++kJEdZ40IVorlUi3nJnaa9/lJNq5vFvvUDrmeNWsxy/Q== + dependencies: + fs-extra "^10.0.1" + tslib "^2.3.1" + +"@docusaurus/types@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/types/-/types-2.0.0-beta.18.tgz" + integrity sha512-zkuSmPQYP3+z4IjGHlW0nGzSSpY7Sit0Nciu/66zSb5m07TK72t6T1MlpCAn/XijcB9Cq6nenC3kJh66nGsKYg== dependencies: commander "^5.1.0" - joi "^17.4.0" - querystring "0.2.0" - webpack "^5.40.0" + joi "^17.6.0" + utility-types "^3.10.0" + webpack "^5.70.0" webpack-merge "^5.8.0" -"@docusaurus/utils-common@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-beta.4.tgz#eb2e5876f5f79d037fa7e1867177658661b9c1c2" - integrity sha512-QaKs96/95ztKgZqHMUS/vNl+GzZ/6vKVEPjBXWt7Fdhg2soT1Iu4cShnibEO5HaVlwSfnJbVmDLVm8phQRdr0A== +"@docusaurus/utils-common@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-2.0.0-beta.18.tgz" + integrity sha512-pK83EcOIiKCLGhrTwukZMo5jqd1sqqqhQwOVyxyvg+x9SY/lsnNzScA96OEfm+qQLBwK1OABA7Xc1wfkgkUxvw== dependencies: - "@docusaurus/types" "2.0.0-beta.4" - tslib "^2.2.0" + tslib "^2.3.1" -"@docusaurus/utils-validation@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.4.tgz#417ff389d61aab4c6544f169e31bb86573b518df" - integrity sha512-t1sxSeyVU02NkcFhPvE7eQFA0CFUst68hTnie6ZS3ToY3nlzdbYRPOAZY5MPr3zRMwum6yFAXgqVA+5fnR0OGg== +"@docusaurus/utils-validation@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.18.tgz" + integrity sha512-3aDrXjJJ8Cw2MAYEk5JMNnr8UHPxmVNbPU/PIHFWmWK09nJvs3IQ8nc9+8I30aIjRdIyc/BIOCxgvAcJ4hsxTA== dependencies: - "@docusaurus/utils" "2.0.0-beta.4" - chalk "^4.1.1" - joi "^17.4.0" - tslib "^2.1.0" + "@docusaurus/logger" "2.0.0-beta.18" + "@docusaurus/utils" "2.0.0-beta.18" + joi "^17.6.0" + js-yaml "^4.1.0" + tslib "^2.3.1" -"@docusaurus/utils@2.0.0-beta.4": - version "2.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-beta.4.tgz#6e572371b0a59360b49102d014579f5364f1d8da" - integrity sha512-6nI3ETBp0ZSt5yp5Fc5nthQjR1MmLgl2rXC3hcscrSUZx0QvzJFzTiRgD9EAIJtR/i2JkUK18eaFiBjMBoXEbQ== +"@docusaurus/utils@2.0.0-beta.18": + version "2.0.0-beta.18" + resolved "https://registry.npmjs.org/@docusaurus/utils/-/utils-2.0.0-beta.18.tgz" + integrity sha512-v2vBmH7xSbPwx3+GB90HgLSQdj+Rh5ELtZWy7M20w907k0ROzDmPQ/8Ke2DK3o5r4pZPGnCrsB3SaYI83AEmAA== dependencies: - "@docusaurus/types" "2.0.0-beta.4" - "@types/github-slugger" "^1.3.0" - chalk "^4.1.1" - escape-string-regexp "^4.0.0" - fs-extra "^10.0.0" - globby "^11.0.4" + "@docusaurus/logger" "2.0.0-beta.18" + "@svgr/webpack" "^6.2.1" + file-loader "^6.2.0" + fs-extra "^10.0.1" + github-slugger "^1.4.0" + globby "^11.1.0" gray-matter "^4.0.3" - lodash "^4.17.20" - micromatch "^4.0.4" + js-yaml "^4.1.0" + lodash "^4.17.21" + micromatch "^4.0.5" resolve-pathname "^3.0.0" - tslib "^2.2.0" + shelljs "^0.8.5" + tslib "^2.3.1" + url-loader "^4.1.1" + webpack "^5.70.0" "@hapi/hoek@^9.0.0": version "9.2.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131" + resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz" integrity sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug== "@hapi/topo@^5.0.0": version "5.0.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.0.0.tgz#c19af8577fa393a06e9c77b60995af959be721e7" + resolved "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz" integrity sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw== dependencies: "@hapi/hoek" "^9.0.0" -"@mdx-js/mdx@^1.6.21": +"@jridgewell/gen-mapping@^0.1.0": + version "0.1.1" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" + integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.0.6" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.6.tgz" + integrity sha512-R7xHtBSNm+9SyvpJkdQl+qrM3Hm2fea3Ef197M3mUug+v+yR+Rhfbs7PBtcBUVnIWJ4JcAdjvij+c8hXS9p5aw== + +"@jridgewell/set-array@^1.0.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.0.tgz" + integrity sha512-SfJxIxNVYLTsKwzB3MoOQ1yxf4w/E6MdkvTgrgAt1bfxjSrLUoHMKrDOykwN14q65waezZIdqDneUIPh4/sKxg== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.11" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz" + integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.3" + resolved "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.3.tgz" + integrity sha512-nkalE/f1RvRGChwBnEIoBfSEYOXnCRdleKuv6+lePbMDrMZXeDQnqak5XDOeBgrPPyPfAdcCu/B5z+v3VhplGg== + +"@mdx-js/mdx@^1.6.22": version "1.6.22" - resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.6.22.tgz#8a723157bf90e78f17dc0f27995398e6c731f1ba" + resolved "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz" integrity sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA== dependencies: "@babel/core" "7.12.9" @@ -1547,19 +1850,19 @@ unist-builder "2.0.3" unist-util-visit "2.0.3" -"@mdx-js/react@^1.6.21": +"@mdx-js/react@^1.6.21", "@mdx-js/react@^1.6.22": version "1.6.22" - resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-1.6.22.tgz#ae09b4744fddc74714ee9f9d6f17a66e77c43573" + resolved "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz" integrity sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg== "@mdx-js/util@1.6.22": version "1.6.22" - resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" + resolved "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== "@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" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" @@ -1567,12 +1870,12 @@ "@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" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": version "1.2.7" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz#94c23db18ee4653e129abd26fb06f870ac9e1ee2" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz" integrity sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA== dependencies: "@nodelib/fs.scandir" "2.1.5" @@ -1580,85 +1883,124 @@ "@polka/url@^1.0.0-next.15": version "1.0.0-next.15" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.15.tgz#6a9d143f7f4f49db2d782f9e1c8839a29b43ae23" + resolved "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.15.tgz" integrity sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA== -"@sideway/address@^4.1.0": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.2.tgz#811b84333a335739d3969cfc434736268170cad1" - integrity sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA== +"@sideway/address@^4.1.3": + version "4.1.4" + resolved "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz" + integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== dependencies: "@hapi/hoek" "^9.0.0" "@sideway/formula@^3.0.0": version "3.0.0" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" + resolved "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz" integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== "@sideway/pinpoint@^2.0.0": version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + resolved "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== "@sindresorhus/is@^0.14.0": version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== -"@slorber/static-site-generator-webpack-plugin@^4.0.0": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.1.tgz#0c8852146441aaa683693deaa5aee2f991d94841" - integrity sha512-PSv4RIVO1Y3kvHxjvqeVisk3E9XFoO04uwYBDWe217MFqKspplYswTuKLiJu0aLORQWzuQjfVsSlLPojwfYsLw== +"@slorber/static-site-generator-webpack-plugin@^4.0.4": + version "4.0.4" + resolved "https://registry.npmjs.org/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.4.tgz" + integrity sha512-FvMavoWEIePps6/JwGCOLYKCRhuwIHhMtmbKpBFgzNkxwpa/569LfTkrbRk1m1I3n+ezJK4on9E1A6cjuZmD9g== dependencies: bluebird "^3.7.1" cheerio "^0.22.0" - eval "^0.1.4" - url "^0.11.0" + eval "^0.1.8" webpack-sources "^1.4.3" "@svgr/babel-plugin-add-jsx-attribute@^5.4.0": version "5.4.0" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz#81ef61947bb268eb9d50523446f9c638fb355906" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz" integrity sha512-ZFf2gs/8/6B8PnSofI0inYXr2SDNTDScPXhN7k5EqD4aZ3gi6u+rbmZHVB8IM3wDyx8ntKACZbtXSm7oZGRqVg== +"@svgr/babel-plugin-add-jsx-attribute@^6.0.0": + version "6.0.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.0.0.tgz" + integrity sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA== + "@svgr/babel-plugin-remove-jsx-attribute@^5.4.0": version "5.4.0" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-5.4.0.tgz#6b2c770c95c874654fd5e1d5ef475b78a0a962ef" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-5.4.0.tgz" integrity sha512-yaS4o2PgUtwLFGTKbsiAy6D0o3ugcUhWK0Z45umJ66EPWunAz9fuFw2gJuje6wqQvQWOTJvIahUwndOXb7QCPg== +"@svgr/babel-plugin-remove-jsx-attribute@^6.0.0": + version "6.0.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.0.0.tgz" + integrity sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw== + "@svgr/babel-plugin-remove-jsx-empty-expression@^5.0.1": version "5.0.1" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-5.0.1.tgz#25621a8915ed7ad70da6cea3d0a6dbc2ea933efd" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-5.0.1.tgz" integrity sha512-LA72+88A11ND/yFIMzyuLRSMJ+tRKeYKeQ+mR3DcAZ5I4h5CPWN9AHyUzJbWSYp/u2u0xhmgOe0+E41+GjEueA== +"@svgr/babel-plugin-remove-jsx-empty-expression@^6.0.0": + version "6.0.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.0.0.tgz" + integrity sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA== + "@svgr/babel-plugin-replace-jsx-attribute-value@^5.0.1": version "5.0.1" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-5.0.1.tgz#0b221fc57f9fcd10e91fe219e2cd0dd03145a897" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-5.0.1.tgz" integrity sha512-PoiE6ZD2Eiy5mK+fjHqwGOS+IXX0wq/YDtNyIgOrc6ejFnxN4b13pRpiIPbtPwHEc+NT2KCjteAcq33/F1Y9KQ== +"@svgr/babel-plugin-replace-jsx-attribute-value@^6.0.0": + version "6.0.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.0.0.tgz" + integrity sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ== + "@svgr/babel-plugin-svg-dynamic-title@^5.4.0": version "5.4.0" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-5.4.0.tgz#139b546dd0c3186b6e5db4fefc26cb0baea729d7" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-5.4.0.tgz" integrity sha512-zSOZH8PdZOpuG1ZVx/cLVePB2ibo3WPpqo7gFIjLV9a0QsuQAzJiwwqmuEdTaW2pegyBE17Uu15mOgOcgabQZg== +"@svgr/babel-plugin-svg-dynamic-title@^6.0.0": + version "6.0.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.0.0.tgz" + integrity sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg== + "@svgr/babel-plugin-svg-em-dimensions@^5.4.0": version "5.4.0" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-5.4.0.tgz#6543f69526632a133ce5cabab965deeaea2234a0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-5.4.0.tgz" integrity sha512-cPzDbDA5oT/sPXDCUYoVXEmm3VIoAWAPT6mSPTJNbQaBNUuEKVKyGH93oDY4e42PYHRW67N5alJx/eEol20abw== +"@svgr/babel-plugin-svg-em-dimensions@^6.0.0": + version "6.0.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.0.0.tgz" + integrity sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA== + "@svgr/babel-plugin-transform-react-native-svg@^5.4.0": version "5.4.0" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-5.4.0.tgz#00bf9a7a73f1cad3948cdab1f8dfb774750f8c80" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-5.4.0.tgz" integrity sha512-3eYP/SaopZ41GHwXma7Rmxcv9uRslRDTY1estspeB1w1ueZWd/tPlMfEOoccYpEMZU3jD4OU7YitnXcF5hLW2Q== +"@svgr/babel-plugin-transform-react-native-svg@^6.0.0": + version "6.0.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.0.0.tgz" + integrity sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ== + "@svgr/babel-plugin-transform-svg-component@^5.5.0": version "5.5.0" - resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-5.5.0.tgz#583a5e2a193e214da2f3afeb0b9e8d3250126b4a" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-5.5.0.tgz" integrity sha512-q4jSH1UUvbrsOtlo/tKcgSeiCHRSBdXoIoqX1pgcKK/aU3JD27wmMKwGtpB8qRYUYoyXvfGxUVKchLuR5pB3rQ== +"@svgr/babel-plugin-transform-svg-component@^6.2.0": + version "6.2.0" + resolved "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.2.0.tgz" + integrity sha512-bhYIpsORb++wpsp91fymbFkf09Z/YEKR0DnFjxvN+8JHeCUD2unnh18jIMKnDJTWtvpTaGYPXELVe4OOzFI0xg== + "@svgr/babel-preset@^5.5.0": version "5.5.0" - resolved "https://registry.yarnpkg.com/@svgr/babel-preset/-/babel-preset-5.5.0.tgz#8af54f3e0a8add7b1e2b0fcd5a882c55393df327" + resolved "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-5.5.0.tgz" integrity sha512-4FiXBjvQ+z2j7yASeGPEi8VD/5rrGQk4Xrq3EdJmoZgz/tpqChpo5hgXDvmEauwtvOc52q8ghhZK4Oy7qph4ig== dependencies: "@svgr/babel-plugin-add-jsx-attribute" "^5.4.0" @@ -1670,25 +2012,56 @@ "@svgr/babel-plugin-transform-react-native-svg" "^5.4.0" "@svgr/babel-plugin-transform-svg-component" "^5.5.0" +"@svgr/babel-preset@^6.2.0": + version "6.2.0" + resolved "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-6.2.0.tgz" + integrity sha512-4WQNY0J71JIaL03DRn0vLiz87JXx0b9dYm2aA8XHlQJQoixMl4r/soYHm8dsaJZ3jWtkCiOYy48dp9izvXhDkQ== + dependencies: + "@svgr/babel-plugin-add-jsx-attribute" "^6.0.0" + "@svgr/babel-plugin-remove-jsx-attribute" "^6.0.0" + "@svgr/babel-plugin-remove-jsx-empty-expression" "^6.0.0" + "@svgr/babel-plugin-replace-jsx-attribute-value" "^6.0.0" + "@svgr/babel-plugin-svg-dynamic-title" "^6.0.0" + "@svgr/babel-plugin-svg-em-dimensions" "^6.0.0" + "@svgr/babel-plugin-transform-react-native-svg" "^6.0.0" + "@svgr/babel-plugin-transform-svg-component" "^6.2.0" + "@svgr/core@^5.5.0": version "5.5.0" - resolved "https://registry.yarnpkg.com/@svgr/core/-/core-5.5.0.tgz#82e826b8715d71083120fe8f2492ec7d7874a579" + resolved "https://registry.npmjs.org/@svgr/core/-/core-5.5.0.tgz" integrity sha512-q52VOcsJPvV3jO1wkPtzTuKlvX7Y3xIcWRpCMtBF3MrteZJtBfQw/+u0B1BHy5ColpQc1/YVTrPEtSYIMNZlrQ== dependencies: "@svgr/plugin-jsx" "^5.5.0" camelcase "^6.2.0" cosmiconfig "^7.0.0" +"@svgr/core@^6.2.1": + version "6.2.1" + resolved "https://registry.npmjs.org/@svgr/core/-/core-6.2.1.tgz" + integrity sha512-NWufjGI2WUyrg46mKuySfviEJ6IxHUOm/8a3Ph38VCWSp+83HBraCQrpEM3F3dB6LBs5x8OElS8h3C0oOJaJAA== + dependencies: + "@svgr/plugin-jsx" "^6.2.1" + camelcase "^6.2.0" + cosmiconfig "^7.0.1" + "@svgr/hast-util-to-babel-ast@^5.5.0": version "5.5.0" - resolved "https://registry.yarnpkg.com/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-5.5.0.tgz#5ee52a9c2533f73e63f8f22b779f93cd432a5461" + resolved "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-5.5.0.tgz" integrity sha512-cAaR/CAiZRB8GP32N+1jocovUtvlj0+e65TB50/6Lcime+EA49m/8l+P2ko+XPJ4dw3xaPS3jOL4F2X4KWxoeQ== dependencies: "@babel/types" "^7.12.6" +"@svgr/hast-util-to-babel-ast@^6.2.1": + version "6.2.1" + resolved "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.2.1.tgz" + integrity sha512-pt7MMkQFDlWJVy9ULJ1h+hZBDGFfSCwlBNW1HkLnVi7jUhyEXUaGYWi1x6bM2IXuAR9l265khBT4Av4lPmaNLQ== + dependencies: + "@babel/types" "^7.15.6" + entities "^3.0.1" + "@svgr/plugin-jsx@^5.5.0": version "5.5.0" - resolved "https://registry.yarnpkg.com/@svgr/plugin-jsx/-/plugin-jsx-5.5.0.tgz#1aa8cd798a1db7173ac043466d7b52236b369000" + resolved "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-5.5.0.tgz" integrity sha512-V/wVh33j12hGh05IDg8GpIUXbjAPnTdPTKuP4VNLggnwaHMPNQNae2pRnyTAILWCQdz5GyMqtO488g7CKM8CBA== dependencies: "@babel/core" "^7.12.3" @@ -1696,18 +2069,37 @@ "@svgr/hast-util-to-babel-ast" "^5.5.0" svg-parser "^2.0.2" +"@svgr/plugin-jsx@^6.2.1": + version "6.2.1" + resolved "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-6.2.1.tgz" + integrity sha512-u+MpjTsLaKo6r3pHeeSVsh9hmGRag2L7VzApWIaS8imNguqoUwDq/u6U/NDmYs/KAsrmtBjOEaAAPbwNGXXp1g== + dependencies: + "@babel/core" "^7.15.5" + "@svgr/babel-preset" "^6.2.0" + "@svgr/hast-util-to-babel-ast" "^6.2.1" + svg-parser "^2.0.2" + "@svgr/plugin-svgo@^5.5.0": version "5.5.0" - resolved "https://registry.yarnpkg.com/@svgr/plugin-svgo/-/plugin-svgo-5.5.0.tgz#02da55d85320549324e201c7b2e53bf431fcc246" + resolved "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-5.5.0.tgz" integrity sha512-r5swKk46GuQl4RrVejVwpeeJaydoxkdwkM1mBKOgJLBUJPGaLci6ylg/IjhrRsREKDkr4kbMWdgOtbXEh0fyLQ== dependencies: cosmiconfig "^7.0.0" deepmerge "^4.2.2" svgo "^1.2.2" +"@svgr/plugin-svgo@^6.2.0": + version "6.2.0" + resolved "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-6.2.0.tgz" + integrity sha512-oDdMQONKOJEbuKwuy4Np6VdV6qoaLLvoY86hjvQEgU82Vx1MSWRyYms6Sl0f+NtqxLI/rDVufATbP/ev996k3Q== + dependencies: + cosmiconfig "^7.0.1" + deepmerge "^4.2.2" + svgo "^2.5.0" + "@svgr/webpack@^5.5.0": version "5.5.0" - resolved "https://registry.yarnpkg.com/@svgr/webpack/-/webpack-5.5.0.tgz#aae858ee579f5fa8ce6c3166ef56c6a1b381b640" + resolved "https://registry.npmjs.org/@svgr/webpack/-/webpack-5.5.0.tgz" integrity sha512-DOBOK255wfQxguUta2INKkzPj6AIS6iafZYiYmHn6W3pHlycSRRlvWKCfLDG10fXfLWqE3DJHgRUOyJYmARa7g== dependencies: "@babel/core" "^7.12.3" @@ -1719,29 +2111,73 @@ "@svgr/plugin-svgo" "^5.5.0" loader-utils "^2.0.0" +"@svgr/webpack@^6.2.1": + version "6.2.1" + resolved "https://registry.npmjs.org/@svgr/webpack/-/webpack-6.2.1.tgz" + integrity sha512-h09ngMNd13hnePwgXa+Y5CgOjzlCvfWLHg+MBnydEedAnuLRzUHUJmGS3o2OsrhxTOOqEsPOFt5v/f6C5Qulcw== + dependencies: + "@babel/core" "^7.15.5" + "@babel/plugin-transform-react-constant-elements" "^7.14.5" + "@babel/preset-env" "^7.15.6" + "@babel/preset-react" "^7.14.5" + "@babel/preset-typescript" "^7.15.0" + "@svgr/core" "^6.2.1" + "@svgr/plugin-jsx" "^6.2.1" + "@svgr/plugin-svgo" "^6.2.0" + "@szmarczak/http-timer@^1.1.2": version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== dependencies: defer-to-connect "^1.0.1" -"@trysound/sax@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.1.1.tgz#3348564048e7a2d7398c935d466c0414ebb6a669" - integrity sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow== +"@trysound/sax@0.2.0": + version "0.2.0" + resolved "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz" + integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== -"@types/eslint-scope@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.0.tgz#4792816e31119ebd506902a482caec4951fabd86" - integrity sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw== +"@types/body-parser@*": + version "1.19.2" + resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz" + integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/bonjour@^3.5.9": + version "3.5.10" + resolved "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz" + integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== + dependencies: + "@types/node" "*" + +"@types/connect-history-api-fallback@^1.3.5": + version "1.3.5" + resolved "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz" + integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== + dependencies: + "@types/express-serve-static-core" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.35" + resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" + integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + dependencies: + "@types/node" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.3" + resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz" + integrity sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g== dependencies: "@types/eslint" "*" "@types/estree" "*" "@types/eslint@*": version "7.2.13" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.13.tgz#e0ca7219ba5ded402062ad6f926d491ebb29dd53" + resolved "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.13.tgz" integrity sha512-LKmQCWAlnVHvvXq4oasNUMTJJb2GwSyTY8+1C7OH5ILR8mPLaljv1jxL1bXW3xB3jFbQxTKxJAvI8PyjB09aBg== dependencies: "@types/estree" "*" @@ -1749,101 +2185,213 @@ "@types/estree@*": version "0.0.48" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.48.tgz#18dc8091b285df90db2f25aa7d906cfc394b7f74" + resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz" integrity sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew== -"@types/estree@^0.0.50": - version "0.0.50" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" - integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== +"@types/estree@^0.0.51": + version "0.0.51" + resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz" + integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== -"@types/github-slugger@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@types/github-slugger/-/github-slugger-1.3.0.tgz#16ab393b30d8ae2a111ac748a015ac05a1fc5524" - integrity sha512-J/rMZa7RqiH/rT29TEVZO4nBoDP9XJOjnbbIofg7GQKs4JIduEO3WLpte+6WeUz/TcrXKlY+bM7FYrp8yFB+3g== - -"@types/glob@^7.1.1": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18": + version "4.17.28" + resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz" + integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== dependencies: - "@types/minimatch" "*" "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + +"@types/express@*", "@types/express@^4.17.13": + version "4.17.13" + resolved "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz" + integrity sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.18" + "@types/qs" "*" + "@types/serve-static" "*" "@types/hast@^2.0.0": version "2.3.1" - resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.1.tgz#b16872f2a6144c7025f296fb9636a667ebb79cd9" + resolved "https://registry.npmjs.org/@types/hast/-/hast-2.3.1.tgz" integrity sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q== dependencies: "@types/unist" "*" -"@types/html-minifier-terser@^5.0.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#3c9ee980f1a10d6021ae6632ca3e79ca2ec4fb50" - integrity sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA== +"@types/history@^4.7.11": + version "4.7.11" + resolved "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz" + integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA== + +"@types/html-minifier-terser@^6.0.0": + version "6.1.0" + resolved "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz" + integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== + +"@types/http-proxy@^1.17.8": + version "1.17.8" + resolved "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.8.tgz" + integrity sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA== + dependencies: + "@types/node" "*" "@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": version "7.0.7" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json-schema@^7.0.4", "@types/json-schema@^7.0.9": + version "7.0.11" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + "@types/json-schema@^7.0.8": version "7.0.8" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.8.tgz#edf1bf1dbf4e04413ca8e5b17b3b7d7d54b59818" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz" integrity sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg== "@types/mdast@^3.0.0": version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.3.tgz#2d7d671b1cd1ea3deb306ea75036c2a0407d2deb" + resolved "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz" integrity sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw== dependencies: "@types/unist" "*" -"@types/minimatch@*": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" - integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== +"@types/mime@^1": + version "1.3.2" + resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== "@types/node@*": version "15.12.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d" + resolved "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz" integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww== -"@types/node@^15.0.1": - version "15.14.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.5.tgz#7b5b3532053fd14c771ad6598a4ee2c7a85aceca" - integrity sha512-6ewfMNmkumZieB/EeJ4cdP1bbJyOlOt5MTwbKMr7WKxyCt2j09H8YWRK6zOd/Jh35Vu/gls39ZUmeu4vHu1WKQ== +"@types/node@^17.0.5": + version "17.0.31" + resolved "https://registry.npmjs.org/@types/node/-/node-17.0.31.tgz" + integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q== "@types/parse-json@^4.0.0": version "4.0.0" - resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" + resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/parse5@^5.0.0": version "5.0.3" - resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.3.tgz#e7b5aebbac150f8b5fdd4a46e7f0bd8e65e19109" + resolved "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz" integrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw== -"@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== +"@types/prop-types@*": + version "15.7.5" + resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz" + integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + +"@types/q@^1.5.1": + version "1.5.4" + resolved "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz" + integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== + +"@types/qs@*": + version "6.9.7" + resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/range-parser@*": + version "1.2.4" + resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz" + integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== + +"@types/react-router-config@*": + version "5.0.6" + resolved "https://registry.npmjs.org/@types/react-router-config/-/react-router-config-5.0.6.tgz" + integrity sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg== + dependencies: + "@types/history" "^4.7.11" + "@types/react" "*" + "@types/react-router" "*" + +"@types/react-router-dom@*": + version "5.3.3" + resolved "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz" + integrity sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw== + dependencies: + "@types/history" "^4.7.11" + "@types/react" "*" + "@types/react-router" "*" + +"@types/react-router@*": + version "5.1.18" + resolved "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.18.tgz" + integrity sha512-YYknwy0D0iOwKQgz9v8nOzt2J6l4gouBmDnWqUUznltOTaon+r8US8ky8HvN0tXvc38U9m6z/t2RsVsnd1zM0g== + dependencies: + "@types/history" "^4.7.11" + "@types/react" "*" + +"@types/react@*": + version "17.0.44" + resolved "https://registry.npmjs.org/@types/react/-/react-17.0.44.tgz" + integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/retry@0.12.0": + version "0.12.0" + resolved "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz" + integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + +"@types/sax@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@types/sax/-/sax-1.2.1.tgz" + integrity sha512-dqYdvN7Sbw8QT/0Ci5rhjE4/iCMJEM0Y9rHpCu+gGXD9Lwbz28t6HI2yegsB6BoV1sShRMU6lAmAcgRjmFy7LA== + dependencies: + "@types/node" "*" + +"@types/scheduler@*": + version "0.16.2" + resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" + integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== + +"@types/serve-index@^1.9.1": + version "1.9.1" + resolved "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz" + integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== + dependencies: + "@types/express" "*" + +"@types/serve-static@*": + version "1.13.10" + resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz" + integrity sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ== + dependencies: + "@types/mime" "^1" + "@types/node" "*" -"@types/sax@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.1.tgz#e0248be936ece791a82db1a57f3fb5f7c87e8172" - integrity sha512-dqYdvN7Sbw8QT/0Ci5rhjE4/iCMJEM0Y9rHpCu+gGXD9Lwbz28t6HI2yegsB6BoV1sShRMU6lAmAcgRjmFy7LA== +"@types/sockjs@^0.3.33": + version "0.3.33" + resolved "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz" + integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== dependencies: "@types/node" "*" "@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2", "@types/unist@^2.0.3": version "2.0.3" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e" + resolved "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz" integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== +"@types/ws@^8.5.1": + version "8.5.3" + resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz" + integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== + dependencies: + "@types/node" "*" + "@webassemblyjs/ast@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" + resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz" integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== dependencies: "@webassemblyjs/helper-numbers" "1.11.1" @@ -1851,22 +2399,22 @@ "@webassemblyjs/floating-point-hex-parser@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" + resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz" integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== "@webassemblyjs/helper-api-error@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz" integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== "@webassemblyjs/helper-buffer@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz" integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== "@webassemblyjs/helper-numbers@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz" integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== dependencies: "@webassemblyjs/floating-point-hex-parser" "1.11.1" @@ -1875,12 +2423,12 @@ "@webassemblyjs/helper-wasm-bytecode@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz" integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== "@webassemblyjs/helper-wasm-section@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz" integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== dependencies: "@webassemblyjs/ast" "1.11.1" @@ -1890,26 +2438,26 @@ "@webassemblyjs/ieee754@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" + resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz" integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== dependencies: "@xtuc/ieee754" "^1.2.0" "@webassemblyjs/leb128@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" + resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz" integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== dependencies: "@xtuc/long" "4.2.2" "@webassemblyjs/utf8@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" + resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz" integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== "@webassemblyjs/wasm-edit@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz" integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== dependencies: "@webassemblyjs/ast" "1.11.1" @@ -1923,7 +2471,7 @@ "@webassemblyjs/wasm-gen@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz" integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== dependencies: "@webassemblyjs/ast" "1.11.1" @@ -1934,7 +2482,7 @@ "@webassemblyjs/wasm-opt@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz" integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== dependencies: "@webassemblyjs/ast" "1.11.1" @@ -1944,7 +2492,7 @@ "@webassemblyjs/wasm-parser@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz" integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== dependencies: "@webassemblyjs/ast" "1.11.1" @@ -1956,7 +2504,7 @@ "@webassemblyjs/wast-printer@1.11.1": version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" + resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz" integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== dependencies: "@webassemblyjs/ast" "1.11.1" @@ -1964,63 +2512,90 @@ "@xtuc/ieee754@^1.2.0": version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz" integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== "@xtuc/long@4.2.2": version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: +accepts@~1.3.4, accepts@~1.3.5: version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== dependencies: mime-types "~2.1.24" negotiator "0.6.2" +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-import-assertions@^1.7.6: + version "1.8.0" + resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz" + integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== + acorn-walk@^8.0.0: version "8.1.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.0.tgz#d3c6a9faf00987a5e2b9bdb506c2aa76cd707f83" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.0.tgz" integrity sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg== -acorn@^8.0.4: - version "8.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.0.tgz#af53266e698d7cffa416714b503066a82221be60" - integrity sha512-ULr0LDaEqQrMFGyQ3bhJkLsbtrQ8QibAseGZeaSUiT/6zb9IvIkomWHJIvgvwad+hinRAgsI51JcWk2yvwyL+w== - -acorn@^8.4.1: +acorn@^8.0.4, acorn@^8.4.1: version "8.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz" integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== -address@1.1.2, address@^1.0.1: +acorn@^8.5.0: + version "8.7.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz" + integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== + +address@^1.0.1: version "1.1.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + resolved "https://registry.npmjs.org/address/-/address-1.1.2.tgz" integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== +address@^1.1.2: + version "1.2.0" + resolved "https://registry.npmjs.org/address/-/address-1.2.0.tgz" + integrity sha512-tNEZYz5G/zYunxFm7sfhAxkXEuLj3K6BKwv6ZURlsF6yiUQ65z0Q2wZW9L5cPUl9ocofGvXOdFYbFHp0+6MOig== + aggregate-error@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" -ajv-keywords@^3.1.0, ajv-keywords@^3.5.2: +ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.1.0, ajv@^6.12.4, ajv@^6.12.5: +ajv-keywords@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + +ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -2028,102 +2603,87 @@ ajv@^6.1.0, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -algoliasearch-helper@^3.3.4: - version "3.5.3" - resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.5.3.tgz#fbf8b328bc103efdefde59a7d25eaffe85b2490f" - integrity sha512-DtSlOKAJ6TGkQD6u58g6/ABdMmHf3pAj6xVL5hJF+D4z9ldDRf/f5v6puNIxGOlJRwGVvFGyz34beYNqhLDUbQ== - dependencies: - events "^1.1.1" - -algoliasearch@^4.0.0, algoliasearch@^4.8.4: - version "4.9.3" - resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.9.3.tgz#b22ef0ae0450304cdf5264369a29cefa71ea2b30" - integrity sha512-VLl9pYXhVB397xTW369sy13qw3m1hHzCfj9zSdeDDYVwTxHiiok/QvhPKAMIzjqyUoY07O8j+941UxYZjugsMQ== - dependencies: - "@algolia/cache-browser-local-storage" "4.9.3" - "@algolia/cache-common" "4.9.3" - "@algolia/cache-in-memory" "4.9.3" - "@algolia/client-account" "4.9.3" - "@algolia/client-analytics" "4.9.3" - "@algolia/client-common" "4.9.3" - "@algolia/client-recommendation" "4.9.3" - "@algolia/client-search" "4.9.3" - "@algolia/logger-common" "4.9.3" - "@algolia/logger-console" "4.9.3" - "@algolia/requester-browser-xhr" "4.9.3" - "@algolia/requester-common" "4.9.3" - "@algolia/requester-node-http" "4.9.3" - "@algolia/transporter" "4.9.3" - -alphanum-sort@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= - -ansi-align@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" - integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== +ajv@^8.0.0, ajv@^8.8.0: + version "8.11.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz" + integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== dependencies: - string-width "^3.0.0" - -ansi-colors@^3.0.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" - integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" -ansi-escapes@^4.3.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== +algoliasearch-helper@^3.7.4: + version "3.8.2" + resolved "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.8.2.tgz" + integrity sha512-AXxiF0zT9oYwl8ZBgU/eRXvfYhz7cBA5YrLPlw9inZHdaYF0QEya/f1Zp1mPYMXc1v6VkHwBq4pk6/vayBLICg== + dependencies: + "@algolia/events" "^4.0.1" + +algoliasearch@^4.0.0, algoliasearch@^4.13.0: + version "4.13.0" + resolved "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.13.0.tgz" + integrity sha512-oHv4faI1Vl2s+YC0YquwkK/TsaJs79g2JFg5FDm2rKN12VItPTAeQ7hyJMHarOPPYuCnNC5kixbtcqvb21wchw== + dependencies: + "@algolia/cache-browser-local-storage" "4.13.0" + "@algolia/cache-common" "4.13.0" + "@algolia/cache-in-memory" "4.13.0" + "@algolia/client-account" "4.13.0" + "@algolia/client-analytics" "4.13.0" + "@algolia/client-common" "4.13.0" + "@algolia/client-personalization" "4.13.0" + "@algolia/client-search" "4.13.0" + "@algolia/logger-common" "4.13.0" + "@algolia/logger-console" "4.13.0" + "@algolia/requester-browser-xhr" "4.13.0" + "@algolia/requester-common" "4.13.0" + "@algolia/requester-node-http" "4.13.0" + "@algolia/transporter" "4.13.0" + +ansi-align@^3.0.0, ansi-align@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz" + integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== dependencies: - type-fest "^0.21.3" - -ansi-html@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" - integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4= + string-width "^4.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-html-community@^0.0.8: + version "0.0.8" + resolved "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz" + integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== -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-regex@^5.0.0, ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -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" +ansi-styles@^6.1.0: + version "6.1.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz" + integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ== anymatch@~3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" @@ -2131,132 +2691,90 @@ anymatch@~3.1.2: arg@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.0.tgz#a20e2bb5710e82950a516b3f933fee5ed478be90" + resolved "https://registry.npmjs.org/arg/-/arg-5.0.0.tgz" integrity sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ== argparse@^1.0.7: version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -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-flatten@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-flatten@^2.1.0: +array-flatten@^2.1.2: version "2.1.2" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== -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" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" 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-union@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz" + integrity sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw== asap@~2.0.3: version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= -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-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - 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.npmjs.org/async/-/async-2.6.4.tgz" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" -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== +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -autoprefixer@^10.2.0, autoprefixer@^10.2.5: - version "10.2.6" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.2.6.tgz#aadd9ec34e1c98d403e01950038049f0eb252949" - integrity sha512-8lChSmdU6dCNMCQopIf4Pe5kipkAGj/fvTMslCsih0uHpOrXOPUEVOmYMMqmw3cekQkSD7EhIeuYl5y0BLdKqg== +autoprefixer@^10.3.7, autoprefixer@^10.4.4: + version "10.4.6" + resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.6.tgz" + integrity sha512-Rvzel0AZO9tJNm3ydySK80PpkWoEZTGC5bHUh/xbrP8qJCy08NFBwNGPcozy3d3SDIM0b2kNxw2K7jAIYFF01A== dependencies: - browserslist "^4.16.6" - caniuse-lite "^1.0.30001230" - colorette "^1.2.2" - fraction.js "^4.1.1" + browserslist "^4.20.3" + caniuse-lite "^1.0.30001334" + fraction.js "^4.2.0" normalize-range "^0.1.2" - postcss-value-parser "^4.1.0" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" -axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== +axios@^0.25.0: + version "0.25.0" + resolved "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz" + integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g== dependencies: - follow-redirects "^1.10.0" + follow-redirects "^1.14.7" -babel-loader@^8.2.2: - version "8.2.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" - integrity sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g== +babel-loader@^8.2.4: + version "8.2.5" + resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz" + integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== dependencies: find-cache-dir "^3.3.1" - loader-utils "^1.4.0" + loader-utils "^2.0.0" make-dir "^3.1.0" schema-utils "^2.6.5" babel-plugin-apply-mdx-type-prop@1.6.22: version "1.6.22" - resolved "https://registry.yarnpkg.com/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.22.tgz#d216e8fd0de91de3f1478ef3231e05446bc8705b" + resolved "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.22.tgz" integrity sha512-VefL+8o+F/DfK24lPZMtJctrCVOfgbqLAGZSkxwhazQv4VxPg3Za/i40fu22KR2m8eEda+IfSOlPLUSIiLcnCQ== dependencies: "@babel/helper-plugin-utils" "7.10.4" @@ -2264,145 +2782,120 @@ babel-plugin-apply-mdx-type-prop@1.6.22: babel-plugin-dynamic-import-node@2.3.0: version "2.3.0" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" + resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz" integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== dependencies: object.assign "^4.1.0" 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" + 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== dependencies: object.assign "^4.1.0" babel-plugin-extract-import-names@1.6.22: version "1.6.22" - resolved "https://registry.yarnpkg.com/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz#de5f9a28eb12f3eb2578bf74472204e66d1a13dc" + resolved "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz" integrity sha512-yJ9BsJaISua7d8zNT7oRG1ZLBJCIdZ4PZqmH8qa9N5AK01ifk3fnkc98AXhtzE7UkfCsEumvoQWgoYLhOnJ7jQ== dependencies: "@babel/helper-plugin-utils" "7.10.4" -babel-plugin-polyfill-corejs2@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz#e9124785e6fd94f94b618a7954e5693053bf5327" - integrity sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ== +babel-plugin-polyfill-corejs2@^0.3.0: + version "0.3.1" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz" + integrity sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w== dependencies: "@babel/compat-data" "^7.13.11" - "@babel/helper-define-polyfill-provider" "^0.2.2" + "@babel/helper-define-polyfill-provider" "^0.3.1" semver "^6.1.1" -babel-plugin-polyfill-corejs3@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.3.tgz#72add68cf08a8bf139ba6e6dfc0b1d504098e57b" - integrity sha512-rCOFzEIJpJEAU14XCcV/erIf/wZQMmMT5l5vXOpL5uoznyOGfDIjPj6FVytMvtzaKSTSVKouOCTPJ5OMUZH30g== +babel-plugin-polyfill-corejs3@^0.5.0: + version "0.5.2" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz" + integrity sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ== dependencies: - "@babel/helper-define-polyfill-provider" "^0.2.2" - core-js-compat "^3.14.0" + "@babel/helper-define-polyfill-provider" "^0.3.1" + core-js-compat "^3.21.0" -babel-plugin-polyfill-regenerator@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz#b310c8d642acada348c1fa3b3e6ce0e851bee077" - integrity sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg== +babel-plugin-polyfill-regenerator@^0.3.0: + version "0.3.1" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz" + integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== dependencies: - "@babel/helper-define-polyfill-provider" "^0.2.2" + "@babel/helper-define-polyfill-provider" "^0.3.1" bail@^1.0.0: version "1.0.5" - resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.5.tgz#b6fa133404a392cbc1f8c4bf63f5953351e7a776" + resolved "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz" integrity sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ== balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base16@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" + resolved "https://registry.npmjs.org/base16/-/base16-1.0.0.tgz" integrity sha1-4pf2DX7BAUp6lxo568ipjAtoHnA= -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" - batch@0.6.1: version "0.6.1" - resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + resolved "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= big.js@^5.2.2: version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -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== - binary-extensions@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -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" - bluebird@^3.7.1: version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -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== +body-parser@1.20.0: + version "1.20.0" + resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz" + integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== dependencies: - bytes "3.1.0" + bytes "3.1.2" content-type "~1.0.4" debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" + on-finished "2.4.1" + qs "6.10.3" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" -bonjour@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" - integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= +bonjour-service@^1.0.11: + version "1.0.12" + resolved "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.12.tgz" + integrity sha512-pMmguXYCu63Ug37DluMKEHdxc+aaIf/ay4YbF8Gxtba+9d3u+rmEWy61VK3Z3hp8Rskok3BunHYnG0dUHAsblw== dependencies: - array-flatten "^2.1.0" - deep-equal "^1.0.1" + array-flatten "^2.1.2" dns-equal "^1.0.0" - dns-txt "^2.0.2" - multicast-dns "^6.0.1" - multicast-dns-service-types "^1.1.0" + fast-deep-equal "^3.1.3" + multicast-dns "^7.2.4" boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -boxen@^5.0.0, boxen@^5.0.1: +boxen@^5.0.0: version "5.0.1" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.0.1.tgz#657528bdd3f59a772b8279b831f27ec2c744664b" + resolved "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz" integrity sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA== dependencies: ansi-align "^3.0.0" @@ -2414,50 +2907,38 @@ boxen@^5.0.0, boxen@^5.0.1: widest-line "^3.1.0" wrap-ansi "^7.0.0" +boxen@^6.2.1: + version "6.2.1" + resolved "https://registry.npmjs.org/boxen/-/boxen-6.2.1.tgz" + integrity sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw== + dependencies: + ansi-align "^3.0.1" + camelcase "^6.2.0" + chalk "^4.1.2" + cli-boxes "^3.0.0" + string-width "^5.0.1" + type-fest "^2.5.0" + widest-line "^4.0.1" + wrap-ansi "^8.0.1" + brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" 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" - -braces@^3.0.1, braces@~3.0.2: +braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" 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.14.5, browserslist@^4.16.0, browserslist@^4.16.6: +browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.6: version "4.16.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz" integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== dependencies: caniuse-lite "^1.0.30001219" @@ -2466,44 +2947,35 @@ browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.0, browserslist@^4 escalade "^3.1.1" node-releases "^1.1.71" +browserslist@^4.18.1, browserslist@^4.20.2, browserslist@^4.20.3: + version "4.20.3" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz" + integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg== + dependencies: + caniuse-lite "^1.0.30001332" + electron-to-chromium "^1.4.118" + escalade "^3.1.1" + node-releases "^2.0.3" + picocolors "^1.0.0" + buffer-from@^1.0.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-indexof@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" - integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== - bytes@3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= -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" +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== cacheable-request@^6.0.0: version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz" integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== dependencies: clone-response "^1.0.2" @@ -2516,7 +2988,7 @@ cacheable-request@^6.0.0: 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" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== dependencies: function-bind "^1.1.1" @@ -2524,12 +2996,12 @@ call-bind@^1.0.0, call-bind@^1.0.2: callsites@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.1: +camel-case@^4.1.2: version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + resolved "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz" integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== dependencies: pascal-case "^3.1.2" @@ -2537,22 +3009,17 @@ camel-case@^4.1.1: camelcase-css@2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" + resolved "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz" integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - camelcase@^6.2.0: version "6.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== caniuse-api@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" + resolved "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz" integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== dependencies: browserslist "^4.0.0" @@ -2560,19 +3027,24 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001230: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001219: version "1.0.30001237" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz#4b7783661515b8e7151fc6376cfd97f0e427b9e5" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz" integrity sha512-pDHgRndit6p1NR2GhzMbQ6CkRrp4VKuSsqbcLeOQppYPKOYkKT/6ZvZDvKJUqcmtyWIAHuZq3SVS2vc1egCZzw== +caniuse-lite@^1.0.30001332, caniuse-lite@^1.0.30001334: + version "1.0.30001335" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001335.tgz" + integrity sha512-ddP1Tgm7z2iIxu6QTtbZUv6HJxSaV/PZeSrWFZtbY4JZ69tOeNhBCl3HyRQgeNZKE5AOn1kpV7fhljigy0Ty3w== + ccount@^1.0.0, ccount@^1.0.3: version "1.1.0" - resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" + resolved "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== -chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.4.1: version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" @@ -2581,15 +3053,15 @@ chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1: chalk@^4.1.0: version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz" integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.1.1: +chalk@^4.1.2: version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -2597,22 +3069,33 @@ chalk@^4.1.1: character-entities-legacy@^1.0.0: version "1.1.4" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" + resolved "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz" integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== character-entities@^1.0.0: version "1.2.4" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" + resolved "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz" integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== character-reference-invalid@^1.0.0: version "1.1.4" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" + resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz" integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== +cheerio-select@^1.5.0: + version "1.6.0" + resolved "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.6.0.tgz" + 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" + resolved "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz" integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= dependencies: css-select "~1.2.0" @@ -2632,29 +3115,23 @@ cheerio@^0.22.0: lodash.reject "^4.4.0" lodash.some "^4.4.0" -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== +cheerio@^1.0.0-rc.10: + 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== 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" + 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" -chokidar@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" - integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== +chokidar@^3.4.2, chokidar@^3.5.3: + version "3.5.3" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -2668,65 +3145,48 @@ chokidar@^3.5.1: chrome-trace-event@^1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== ci-info@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6" - integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== - -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" - -clean-css@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" - integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA== - dependencies: - source-map "~0.6.0" - -clean-css@^5.1.2: - version "5.1.4" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.1.4.tgz#d191c98347f9fc36b301f99bb827898151175782" - integrity sha512-e6JAuR0T2ahg7fOSv98Nxqh7mHWOac5TaCSgrr61h/6mkPLwlxX38hzob4h6IKj/UHlrrLXvAEjWqXlvi8r8lQ== +clean-css@^5.2.2, clean-css@^5.2.4: + version "5.3.0" + resolved "https://registry.npmjs.org/clean-css/-/clean-css-5.3.0.tgz" + integrity sha512-YYuuxv4H/iNb1Z/5IbMRoxgrzjWGhOEFfd+groZ5dMCVkpENiMZmwspdrzBo9286JjM1gZJPAyL7ZIdzuvu2AQ== dependencies: source-map "~0.6.0" clean-stack@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== cli-boxes@^2.2.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== +cli-boxes@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz" + integrity sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g== + +cli-table3@^0.6.1: + version "0.6.2" + resolved "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.2.tgz" + integrity sha512-QyavHCaIC80cMivimWu4aWHilIpiDpfm3hGmqAmXVL1UsnbLuBSMd21hTX6VY4ZSDSM73ESLeF8TOYId3rBTbw== dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" clone-deep@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + resolved "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz" integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== dependencies: is-plain-object "^2.0.4" @@ -2735,19 +3195,19 @@ clone-deep@^4.0.1: clone-response@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + resolved "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz" integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= dependencies: mimic-response "^1.0.0" clsx@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" + resolved "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz" integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== coa@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" + resolved "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz" integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== dependencies: "@types/q" "^1.5.1" @@ -2756,106 +3216,93 @@ coa@^2.0.2: collapse-white-space@^1.0.2: version "1.0.6" - resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287" + resolved "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz" integrity sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ== -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: version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" 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" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" 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" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= color-name@~1.1.4: version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colord@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/colord/-/colord-2.0.1.tgz#1e7fb1f9fa1cf74f42c58cb9c20320bab8435aa0" - integrity sha512-vm5YpaWamD0Ov6TSG0GGmUIwstrWcfKQV/h2CmbR7PbNu41+qdB5PW9lpzhjedrpm08uuYvcXi0Oel1RLZIJuA== +colord@^2.9.1: + version "2.9.2" + resolved "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz" + integrity sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ== colorette@^1.2.2: version "1.2.2" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + resolved "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== +colorette@^2.0.10: + version "2.0.16" + resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz" + integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + combine-promises@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/combine-promises/-/combine-promises-1.1.0.tgz#72db90743c0ca7aab7d0d8d2052fd7b0f674de71" + resolved "https://registry.npmjs.org/combine-promises/-/combine-promises-1.1.0.tgz" integrity sha512-ZI9jvcLDxqwaXEixOhArm3r7ReIivsXkpbyEWyeOhzz1QS0iSgBPnWvEqvIQtYyamGCYA88gFhmUrs9hrrQ0pg== comma-separated-tokens@^1.0.0: version "1.0.8" - resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" + resolved "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== commander@^2.20.0: version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - commander@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + resolved "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== -commander@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== - -commander@^7.1.0: +commander@^7.2.0: version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" + resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +commander@^8.3.0: + version "8.3.0" + resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + commondir@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" 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== - compressible@~2.0.16: version "2.0.18" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + resolved "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz" integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== dependencies: mime-db ">= 1.43.0 < 2" compression@^1.7.4: version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + resolved "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz" integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== dependencies: accepts "~1.3.5" @@ -2868,12 +3315,12 @@ compression@^1.7.4: concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= configstore@^5.0.1: version "5.0.1" - resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" + resolved "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz" integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== dependencies: dot-prop "^5.2.0" @@ -2885,97 +3332,102 @@ configstore@^5.0.1: connect-history-api-fallback@^1.6.0: version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" + resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz" integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== -consola@^2.15.0: +consola@^2.15.3: version "2.15.3" - resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" + resolved "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz" integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== content-disposition@0.5.2: version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz" integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== dependencies: - safe-buffer "5.1.2" + 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" + resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== 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" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz" 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" + resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" 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= +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== copy-text-to-clipboard@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz#8cbf8f90e0a47f12e4a24743736265d157bce69c" + resolved "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz" integrity sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q== -copy-webpack-plugin@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-9.0.1.tgz#b71d21991599f61a4ee00ba79087b8ba279bbb59" - integrity sha512-14gHKKdYIxF84jCEgPgYXCPpldbwpxxLbCmA7LReY7gvbaT555DgeBWBgBZM116tv/fO6RRJrsivBqRyRlukhw== +copy-webpack-plugin@^10.2.4: + version "10.2.4" + resolved "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-10.2.4.tgz" + integrity sha512-xFVltahqlsRcyyJqQbDY6EYTtyQZF9rf+JPjwHObLdPFMEISqkFkr7mFoVOC6BfYS/dNThyoQKvziugm+OnwBg== dependencies: - fast-glob "^3.2.5" - glob-parent "^6.0.0" - globby "^11.0.3" + fast-glob "^3.2.7" + glob-parent "^6.0.1" + globby "^12.0.2" normalize-path "^3.0.0" - p-limit "^3.1.0" - schema-utils "^3.0.0" + schema-utils "^4.0.0" serialize-javascript "^6.0.0" -core-js-compat@^3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.14.0.tgz#b574dabf29184681d5b16357bd33d104df3d29a5" - integrity sha512-R4NS2eupxtiJU+VwgkF9WTpnSfZW4pogwKHd8bclWU2sp93Pr5S1uYJI84cMOubJRou7bcfL0vmwtLslWN5p3A== +core-js-compat@^3.21.0, core-js-compat@^3.22.1: + version "3.22.3" + resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.3.tgz" + integrity sha512-wliMbvPI2idgFWpFe7UEyHMvu6HWgW8WA+HnDRtgzoSDYvXFMpoGX1H3tPDDXrcfUSyXafCLDd7hOeMQHEZxGw== dependencies: - browserslist "^4.16.6" + browserslist "^4.20.3" semver "7.0.0" -core-js-pure@^3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.14.0.tgz#72bcfacba74a65ffce04bf94ae91d966e80ee553" - integrity sha512-YVh+LN2FgNU0odThzm61BsdkwrbrchumFq3oztnE9vTKC4KS2fvnPmcx8t6jnqAyOTCTF4ZSiuK8Qhh7SNcL4g== +core-js-pure@^3.20.2: + version "3.22.3" + resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.3.tgz" + integrity sha512-oN88zz7nmKROMy8GOjs+LN+0LedIvbMdnB5XsTlhcOg1WGARt9l0LFg0zohdoFmCsEZ1h2ZbSQ6azj3M+vhzwQ== -core-js@^3.9.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.14.0.tgz#62322b98c71cc2018b027971a69419e2425c2a6c" - integrity sha512-3s+ed8er9ahK+zJpp9ZtuVcDoFzHNiZsPbNAAE4KXgrRHbjSqqNN6xGSXq6bq7TZIbKj4NLrLb6bJ5i+vSVjHA== +core-js@^3.21.1: + version "3.22.3" + resolved "https://registry.npmjs.org/core-js/-/core-js-3.22.3.tgz" + integrity sha512-1t+2a/d2lppW1gkLXx3pKPVGbBdxXAkqztvWb1EJ8oF8O2gIGiytzflNiFEehYwVK/t2ryUsGBoOFFvNx95mbg== 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" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cosmiconfig@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz" + integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.7.2" + cosmiconfig@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz" integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== dependencies: "@types/parse-json" "^4.0.0" @@ -2984,92 +3436,77 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +cosmiconfig@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz" + integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + cross-fetch@^3.0.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.4.tgz#9723f3a3a247bf8b89039f3a380a9244e8fa2f39" - integrity sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ== + version "3.1.5" + resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== dependencies: - node-fetch "2.6.1" + node-fetch "2.6.7" -cross-spawn@7.0.3, cross-spawn@^7.0.3: +cross-spawn@^7.0.3: version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" which "^2.0.1" -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" - crypto-random-string@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" + resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -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-color-names@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-1.0.1.tgz#6ff7ee81a823ad46e020fa2fd6ab40a887e2ba67" - integrity sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA== - -css-declaration-sorter@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.0.3.tgz#9dfd8ea0df4cc7846827876fafb52314890c21a9" - integrity sha512-52P95mvW1SMzuRZegvpluT6yEv0FqQusydKQPZsNN5Q7hh8EwQvN8E2nwuJ16BBvNN6LcoIZXu/Bk58DAhrrxw== - dependencies: - timsort "^0.3.0" +css-declaration-sorter@^6.2.2: + version "6.2.2" + resolved "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz" + integrity sha512-Ufadglr88ZLsrvS11gjeu/40Lw74D9Am/Jpr3LlYm5Q4ZP5KdlUhG+6u2EjyXeZcxmZ2h1ebCKngDjolpeLHpg== -css-loader@^5.1.1: - version "5.2.6" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-5.2.6.tgz#c3c82ab77fea1f360e587d871a6811f4450cc8d1" - integrity sha512-0wyN5vXMQZu6BvjbrPdUJvkCzGEO24HC7IS7nW4llc6BBFC+zwR9CKtYGv63Puzsg10L/o12inMY5/2ByzfD6w== +css-loader@^6.7.1: + version "6.7.1" + resolved "https://registry.npmjs.org/css-loader/-/css-loader-6.7.1.tgz" + integrity sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw== dependencies: icss-utils "^5.1.0" - loader-utils "^2.0.0" - postcss "^8.2.15" + postcss "^8.4.7" postcss-modules-extract-imports "^3.0.0" postcss-modules-local-by-default "^4.0.0" postcss-modules-scope "^3.0.0" postcss-modules-values "^4.0.0" - postcss-value-parser "^4.1.0" - schema-utils "^3.0.0" + postcss-value-parser "^4.2.0" semver "^7.3.5" -css-minimizer-webpack-plugin@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.0.2.tgz#8fadbdf10128cb40227bff275a4bb47412534245" - integrity sha512-B3I5e17RwvKPJwsxjjWcdgpU/zqylzK1bPVghcmpFHRL48DXiBgrtqz1BJsn68+t/zzaLp9kYAaEDvQ7GyanFQ== +css-minimizer-webpack-plugin@^3.4.1: + version "3.4.1" + resolved "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz" + integrity sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q== dependencies: cssnano "^5.0.6" jest-worker "^27.0.2" - p-limit "^3.0.2" postcss "^8.3.5" - schema-utils "^3.0.0" + schema-utils "^4.0.0" serialize-javascript "^6.0.0" source-map "^0.6.1" 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" + resolved "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz" 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" + resolved "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz" integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== dependencies: boolbase "^1.0.0" @@ -3077,20 +3514,9 @@ css-select@^2.0.0: domutils "^1.7.0" nth-check "^1.0.2" -css-select@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-3.1.2.tgz#d52cbdc6fee379fba97fb0d3925abbd18af2d9d8" - integrity sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA== - dependencies: - boolbase "^1.0.0" - css-what "^4.0.0" - domhandler "^4.0.0" - domutils "^2.4.3" - nth-check "^2.0.0" - css-select@^4.1.3: version "4.1.3" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067" + resolved "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz" integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA== dependencies: boolbase "^1.0.0" @@ -3099,9 +3525,20 @@ css-select@^4.1.3: domutils "^2.6.0" nth-check "^2.0.0" +css-select@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz" + 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" + resolved "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz" integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= dependencies: boolbase "~1.0.0" @@ -3111,15 +3548,15 @@ css-select@~1.2.0: 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" + resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz" integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== dependencies: mdn-data "2.0.4" source-map "^0.6.1" -css-tree@^1.1.2: +css-tree@^1.1.2, css-tree@^1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" + resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz" integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== dependencies: mdn-data "2.0.14" @@ -3127,216 +3564,167 @@ css-tree@^1.1.2: css-what@2.1: version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + resolved "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz" 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" + resolved "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz" integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== -css-what@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-4.0.0.tgz#35e73761cab2eeb3d3661126b23d7aa0e8432233" - integrity sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A== - css-what@^5.0.0: version "5.0.1" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" + resolved "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz" integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== +css-what@^6.0.1: + version "6.1.0" + resolved "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz" + 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" + resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-advanced@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.1.3.tgz#a2c6cf2fe39108b81e88810e3c399d1c0fe030ea" - integrity sha512-pS4+Q2Hoo/FevZs2JqA2BG8Vn5o5VeXgj+z6kGndKTq3RFYvlKeJ1ZPnLXo9zyYKwmSqWW0rWqtGxxmigIte0Q== - dependencies: - autoprefixer "^10.2.0" - cssnano-preset-default "^5.1.3" - postcss-discard-unused "^5.0.1" - postcss-merge-idents "^5.0.1" - postcss-reduce-idents "^5.0.1" - postcss-zindex "^5.0.1" - -cssnano-preset-default@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.1.3.tgz#caa54183a8c8df03124a9e23f374ab89df5a9a99" - integrity sha512-qo9tX+t4yAAZ/yagVV3b+QBKeLklQbmgR3wI7mccrDcR+bEk9iHgZN1E7doX68y9ThznLya3RDmR+nc7l6/2WQ== - dependencies: - css-declaration-sorter "^6.0.3" - cssnano-utils "^2.0.1" - postcss-calc "^8.0.0" - postcss-colormin "^5.2.0" - postcss-convert-values "^5.0.1" - postcss-discard-comments "^5.0.1" - postcss-discard-duplicates "^5.0.1" - postcss-discard-empty "^5.0.1" - postcss-discard-overridden "^5.0.1" - postcss-merge-longhand "^5.0.2" - postcss-merge-rules "^5.0.2" - postcss-minify-font-values "^5.0.1" - postcss-minify-gradients "^5.0.1" - postcss-minify-params "^5.0.1" - postcss-minify-selectors "^5.1.0" - postcss-normalize-charset "^5.0.1" - postcss-normalize-display-values "^5.0.1" - postcss-normalize-positions "^5.0.1" - postcss-normalize-repeat-style "^5.0.1" - postcss-normalize-string "^5.0.1" - postcss-normalize-timing-functions "^5.0.1" - postcss-normalize-unicode "^5.0.1" - postcss-normalize-url "^5.0.2" - postcss-normalize-whitespace "^5.0.1" - postcss-ordered-values "^5.0.2" - postcss-reduce-initial "^5.0.1" - postcss-reduce-transforms "^5.0.1" - postcss-svgo "^5.0.2" - postcss-unique-selectors "^5.0.1" - -cssnano-utils@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-2.0.1.tgz#8660aa2b37ed869d2e2f22918196a9a8b6498ce2" - integrity sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ== +cssnano-preset-advanced@^5.3.1: + version "5.3.3" + resolved "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.3.tgz" + integrity sha512-AB9SmTSC2Gd8T7PpKUsXFJ3eNsg7dc4CTZ0+XAJ29MNxyJsrCEk7N1lw31bpHrsQH2PVJr21bbWgGAfA9j0dIA== + dependencies: + autoprefixer "^10.3.7" + cssnano-preset-default "^5.2.7" + postcss-discard-unused "^5.1.0" + postcss-merge-idents "^5.1.1" + postcss-reduce-idents "^5.2.0" + postcss-zindex "^5.1.0" + +cssnano-preset-default@^5.2.7: + version "5.2.7" + resolved "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.7.tgz" + integrity sha512-JiKP38ymZQK+zVKevphPzNSGHSlTI+AOwlasoSRtSVMUU285O7/6uZyd5NbW92ZHp41m0sSHe6JoZosakj63uA== + dependencies: + css-declaration-sorter "^6.2.2" + cssnano-utils "^3.1.0" + postcss-calc "^8.2.3" + postcss-colormin "^5.3.0" + postcss-convert-values "^5.1.0" + postcss-discard-comments "^5.1.1" + postcss-discard-duplicates "^5.1.0" + postcss-discard-empty "^5.1.1" + postcss-discard-overridden "^5.1.0" + postcss-merge-longhand "^5.1.4" + postcss-merge-rules "^5.1.1" + postcss-minify-font-values "^5.1.0" + postcss-minify-gradients "^5.1.1" + postcss-minify-params "^5.1.2" + postcss-minify-selectors "^5.2.0" + postcss-normalize-charset "^5.1.0" + postcss-normalize-display-values "^5.1.0" + postcss-normalize-positions "^5.1.0" + postcss-normalize-repeat-style "^5.1.0" + postcss-normalize-string "^5.1.0" + postcss-normalize-timing-functions "^5.1.0" + postcss-normalize-unicode "^5.1.0" + postcss-normalize-url "^5.1.0" + postcss-normalize-whitespace "^5.1.1" + postcss-ordered-values "^5.1.1" + postcss-reduce-initial "^5.1.0" + postcss-reduce-transforms "^5.1.0" + postcss-svgo "^5.1.0" + postcss-unique-selectors "^5.1.1" + +cssnano-utils@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz" + integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== -cssnano@^5.0.4, cssnano@^5.0.6: - version "5.0.7" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.0.7.tgz#e81894bdf31aa01a0ca3d1d0eee47be18f7f3012" - integrity sha512-7C0tbb298hef3rq+TtBbMuezBQ9VrFtrQEsPNuBKNVgWny/67vdRsnq8EoNu7TRjAHURgYvWlRIpCUmcMZkRzw== +cssnano@^5.0.6, cssnano@^5.1.5: + version "5.1.7" + resolved "https://registry.npmjs.org/cssnano/-/cssnano-5.1.7.tgz" + integrity sha512-pVsUV6LcTXif7lvKKW9ZrmX+rGRzxkEdJuVJcp5ftUjWITgwam5LMZOgaTvUrWPkcORBey6he7JKb4XAJvrpKg== dependencies: - cssnano-preset-default "^5.1.3" - is-resolvable "^1.1.0" + cssnano-preset-default "^5.2.7" lilconfig "^2.0.3" yaml "^1.10.2" csso@^4.0.2, csso@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" + resolved "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz" integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== dependencies: css-tree "^1.1.2" -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: +csstype@^3.0.2: + version "3.0.11" + resolved "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz" + integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw== + +debug@2.6.9, debug@^2.6.0: version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^3.1.1, debug@^3.2.6: +debug@^3.1.1: version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" debug@^4.1.0, debug@^4.1.1: version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" -decamelize@^1.2.0: - 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.3.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= dependencies: mimic-response "^1.0.0" -deep-equal@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" - integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== - dependencies: - is-arguments "^1.0.4" - is-date-object "^1.0.1" - is-regex "^1.0.4" - object-is "^1.0.1" - object-keys "^1.1.1" - regexp.prototype.flags "^1.2.0" - deep-extend@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deepmerge@^4.2.2: version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -default-gateway@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" - integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== +default-gateway@^6.0.3: + version "6.0.3" + resolved "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz" + integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== dependencies: - execa "^1.0.0" - ip-regex "^2.1.0" + execa "^5.0.0" defer-to-connect@^1.0.1: version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" 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" - -del@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" - integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== - dependencies: - "@types/glob" "^7.1.1" - globby "^6.1.0" - is-path-cwd "^2.0.0" - is-path-in-cwd "^2.0.0" - p-map "^2.0.0" - pify "^4.0.1" - rimraf "^2.6.3" - del@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" + resolved "https://registry.npmjs.org/del/-/del-6.0.0.tgz" integrity sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ== dependencies: globby "^11.0.1" @@ -3348,31 +3736,36 @@ del@^6.0.0: rimraf "^3.0.2" slash "^3.0.0" +depd@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + depd@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" 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= +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detab@2.0.4: version "2.0.4" - resolved "https://registry.yarnpkg.com/detab/-/detab-2.0.4.tgz#b927892069aff405fbb9a186fe97a44a92a94b43" + resolved "https://registry.npmjs.org/detab/-/detab-2.0.4.tgz" integrity sha512-8zdsQA5bIkoRECvCrNKPla84lyoR7DSAyf7p0YgXzBO9PDJx8KntPUay7NS6yp+KdxdVtiE5SpHKtbp2ZQyA9g== dependencies: repeat-string "^1.5.4" detect-node@^2.0.4: version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" + resolved "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== -detect-port-alt@1.1.6: +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" + resolved "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz" integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== dependencies: address "^1.0.1" @@ -3380,7 +3773,7 @@ detect-port-alt@1.1.6: detect-port@^1.3.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.3.0.tgz#d9c40e9accadd4df5cac6a782aefd014d573d1f1" + resolved "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz" integrity sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ== dependencies: address "^1.0.1" @@ -3388,41 +3781,33 @@ detect-port@^1.3.0: dir-glob@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: path-type "^4.0.0" dns-equal@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + resolved "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz" integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= -dns-packet@^1.3.1: - version "1.3.4" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.4.tgz#e3455065824a2507ba886c55a89963bb107dec6f" - integrity sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA== - dependencies: - ip "^1.1.0" - safe-buffer "^5.0.1" - -dns-txt@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" - integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= +dns-packet@^5.2.2: + version "5.3.1" + resolved "https://registry.npmjs.org/dns-packet/-/dns-packet-5.3.1.tgz" + integrity sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw== dependencies: - buffer-indexof "^1.0.0" + "@leichtgewicht/ip-codec" "^2.0.1" dom-converter@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" + resolved "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz" integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== dependencies: utila "~0.4" dom-serializer@0: version "0.2.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz" integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== dependencies: domelementtype "^2.0.1" @@ -3430,16 +3815,25 @@ dom-serializer@0: dom-serializer@^1.0.1: version "1.3.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz" integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== dependencies: domelementtype "^2.0.1" domhandler "^4.2.0" entities "^2.0.0" +dom-serializer@^1.3.2: + version "1.4.1" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz" + integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== + 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" + resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz" integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== dependencies: domelementtype "^1.3.0" @@ -3447,31 +3841,38 @@ dom-serializer@~0.1.0: 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" + resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== domelementtype@^2.0.1, domelementtype@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz" integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== domhandler@^2.3.0: version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz" integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== dependencies: domelementtype "1" domhandler@^4.0.0, domhandler@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz" integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA== dependencies: domelementtype "^2.2.0" +domhandler@^4.3.1: + version "4.3.1" + resolved "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz" + 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" + resolved "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz" integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= dependencies: dom-serializer "0" @@ -3479,24 +3880,33 @@ domutils@1.5.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" + resolved "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz" integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== dependencies: dom-serializer "0" domelementtype "1" -domutils@^2.4.3, domutils@^2.5.2, domutils@^2.6.0: +domutils@^2.5.2, domutils@^2.6.0: version "2.7.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.7.0.tgz#8ebaf0c41ebafcf55b0b72ec31c56323712c5442" + resolved "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz" integrity sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg== dependencies: dom-serializer "^1.0.1" domelementtype "^2.2.0" domhandler "^4.2.0" +domutils@^2.8.0: + version "2.8.0" + resolved "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-case@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" + resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== dependencies: no-case "^3.0.4" @@ -3504,103 +3914,106 @@ dot-case@^3.0.4: dot-prop@^5.2.0: version "5.3.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" duplexer3@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= -duplexer@^0.1.1, duplexer@^0.1.2: +duplexer@^0.1.2: version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + ee-first@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.723: +electron-to-chromium@^1.3.723: version "1.3.752" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz#0728587f1b9b970ec9ffad932496429aef750d09" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz" integrity sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A== -"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= - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== +electron-to-chromium@^1.4.118: + version "1.4.129" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.129.tgz" + integrity sha512-GgtN6bsDtHdtXJtlMYZWGB/uOyjZWjmRDumXTas7dGBaB9zUyCjzHet1DY2KhyHN8R0GLbzZWqm4efeddqqyRQ== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + emojis-list@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== emoticon@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/emoticon/-/emoticon-3.2.0.tgz#c008ca7d7620fac742fe1bf4af8ff8fed154ae7f" + resolved "https://registry.npmjs.org/emoticon/-/emoticon-3.2.0.tgz" integrity sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg== encodeurl@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= 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" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" -enhanced-resolve@^5.8.0: - version "5.8.2" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz#15ddc779345cbb73e97c611cd00c01c1e7bf4d8b" - integrity sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA== +enhanced-resolve@^5.9.2: + version "5.9.3" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz" + integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow== dependencies: graceful-fs "^4.2.4" tapable "^2.2.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" + resolved "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz" 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" + resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== -errno@^0.1.3: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" +entities@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz" + integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" es-abstract@^1.17.2, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: version "1.18.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.3.tgz#25c4c3380a27aa203c44b2b685bba94da31b63e0" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz" integrity sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw== dependencies: call-bind "^1.0.2" @@ -3620,53 +4033,48 @@ es-abstract@^1.17.2, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" -es-module-lexer@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.7.1.tgz#c2c8e0f46f2df06274cdaf0dd3f3b33e0a0b267d" - integrity sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw== +es-module-lexer@^0.9.0: + version "0.9.3" + resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz" + integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== 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" + resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" 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: +escalade@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-goat@^2.0.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" + resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz" integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -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.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-scope@5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" @@ -3674,86 +4082,62 @@ eslint-scope@5.1.1: esprima@^4.0.0: version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^4.1.1: version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz" integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -eta@^1.12.1: - version "1.12.2" - resolved "https://registry.yarnpkg.com/eta/-/eta-1.12.2.tgz#ac4425d4f9478a8b4110c7d02c94f6d382cac517" - integrity sha512-Z05sK2DRWAfBhG/2cwAOWuMoQIYaVYJCQrz2g2O/ekUjzWHNBv9L1pnblVDoDkKSb/AZ5tWZ0N/v4iaIU4+HjA== +eta@^1.12.3: + version "1.12.3" + resolved "https://registry.npmjs.org/eta/-/eta-1.12.3.tgz" + integrity sha512-qHixwbDLtekO/d51Yr4glcaUJCIjGVJyTzuqV4GPlgZo1YpgOKG+avQynErZIYrfM6JIJdtiG2Kox8tbb+DoGg== etag@~1.8.1: version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= -eval@^0.1.4: - version "0.1.6" - resolved "https://registry.yarnpkg.com/eval/-/eval-0.1.6.tgz#9620d7d8c85515e97e6b47c5814f46ae381cb3cc" - integrity sha512-o0XUw+5OGkXw4pJZzQoXUk+H87DHuC+7ZE//oSrRGtatTmr12oTnLfg6QOq9DyTt0c/p4TwzgmkKrBzWTSizyQ== +eval@^0.1.8: + version "0.1.8" + resolved "https://registry.npmjs.org/eval/-/eval-0.1.8.tgz" + integrity sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw== dependencies: + "@types/node" "*" require-like ">= 0.1.1" eventemitter3@^4.0.0: version "4.0.7" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= - events@^3.2.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -eventsource@^1.0.7: - version "1.1.0" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.0.tgz#00e8ca7c92109e94b0ddf32dac677d841028cfaf" - integrity sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg== - dependencies: - original "^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" - execa@^5.0.0: version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" @@ -3766,147 +4150,112 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.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= +express@^4.17.3: + version "4.18.1" + resolved "https://registry.npmjs.org/express/-/express-4.18.1.tgz" + integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q== 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" - -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" + accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" + body-parser "1.20.0" + content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.4.0" + cookie "0.5.0" cookie-signature "1.0.6" debug "2.6.9" - depd "~1.1.2" + depd "2.0.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "~1.1.2" + finalhandler "1.2.0" fresh "0.5.2" + http-errors "2.0.0" merge-descriptors "1.0.1" methods "~1.1.2" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" + proxy-addr "~2.0.7" + qs "6.10.3" 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" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" extend-shallow@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz" 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.0: version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" 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" - -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.1.1, fast-glob@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" - integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== +fast-glob@^3.1.1, fast-glob@^3.2.7, fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" + glob-parent "^5.1.2" merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" + 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" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-url-parser@1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" + resolved "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz" integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= dependencies: punycode "^1.3.2" fastq@^1.6.0: version "1.11.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz" integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== dependencies: reusify "^1.0.4" faye-websocket@^0.11.3: version "0.11.4" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + resolved "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz" integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== dependencies: websocket-driver ">=0.5.1" fbemitter@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/fbemitter/-/fbemitter-3.0.0.tgz#00b2a1af5411254aab416cd75f9e6289bee4bff3" + resolved "https://registry.npmjs.org/fbemitter/-/fbemitter-3.0.0.tgz" integrity sha512-KWKaceCwKQU0+HPoop6gn4eOHk50bBv/VxjJtGMfwmJt3D29JpN4H4eisCtIPA+a8GVBam+ldMMpMjJUvpDyHw== dependencies: fbjs "^3.0.0" fbjs-css-vars@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8" + resolved "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz" integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== fbjs@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.0.tgz#0907067fb3f57a78f45d95f1eacffcacd623c165" + resolved "https://registry.npmjs.org/fbjs/-/fbjs-3.0.0.tgz" integrity sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg== dependencies: cross-fetch "^3.0.4" @@ -3919,93 +4268,71 @@ fbjs@^3.0.0: feed@^4.2.2: version "4.2.2" - resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.2.tgz#865783ef6ed12579e2c44bbef3c9113bc4956a7e" + resolved "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz" integrity sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ== dependencies: xml-js "^1.6.11" -figures@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - file-loader@^6.2.0: version "6.2.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d" + resolved "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz" integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== dependencies: loader-utils "^2.0.0" schema-utils "^3.0.0" -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== - -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@^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" +filesize@^8.0.6: + version "8.0.7" + resolved "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz" + integrity sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ== fill-range@^7.0.1: version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" 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== +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" - statuses "~1.5.0" + statuses "2.0.1" unpipe "~1.0.0" find-cache-dir@^3.3.1: version "3.3.1" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" + resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz" integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== dependencies: commondir "^1.0.1" make-dir "^3.0.2" pkg-dir "^4.1.0" -find-up@4.1.0, find-up@^4.0.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@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz" integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + find-up@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -4013,79 +4340,80 @@ find-up@^5.0.0: flux@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/flux/-/flux-4.0.1.tgz#7843502b02841d4aaa534af0b373034a1f75ee5c" + resolved "https://registry.npmjs.org/flux/-/flux-4.0.1.tgz" integrity sha512-emk4RCvJ8RzNP2lNpphKnG7r18q8elDYNAPx7xn+bDeOIo9FFfxEfIQ2y6YbQNmnsGD3nH1noxtLE64Puz1bRQ== dependencies: fbemitter "^3.0.0" fbjs "^3.0.0" -follow-redirects@^1.0.0, follow-redirects@^1.10.0: - version "1.14.8" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" - integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== +follow-redirects@^1.0.0, follow-redirects@^1.14.7: + version "1.14.9" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz" + integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== -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= - -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== +fork-ts-checker-webpack-plugin@^6.5.0: + version "6.5.2" + resolved "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz" + integrity sha512-m5cUmF30xkZ7h4tWUgTAcEaKmUW7tfyUyTqNNOz7OxWJ0v1VWKTcOvH8FWHUwSjlW/356Ijc9vi3XfcPstpQKA== dependencies: - "@babel/code-frame" "^7.5.5" - chalk "^2.4.1" - micromatch "^3.1.10" + "@babel/code-frame" "^7.8.3" + "@types/json-schema" "^7.0.5" + chalk "^4.1.0" + chokidar "^3.4.2" + cosmiconfig "^6.0.0" + deepmerge "^4.2.2" + fs-extra "^9.0.0" + glob "^7.1.6" + memfs "^3.1.2" minimatch "^3.0.4" - semver "^5.6.0" + schema-utils "2.7.0" + semver "^7.3.2" tapable "^1.0.0" - worker-rpc "^0.1.0" forwarded@0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== -fraction.js@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.1.tgz#ac4e520473dae67012d618aab91eda09bcb400ff" - integrity sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg== - -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" +fraction.js@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz" + integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== fresh@0.5.2: version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= -fs-extra@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" - integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== +fs-extra@^10.0.1: + version "10.1.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^9.0.0: + version "9.1.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz" + 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-monkey@1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz" + integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== + fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" 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" - fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" @@ -4093,22 +4421,17 @@ fsevents@~2.3.2: function-bind@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== gensync@^1.0.0-beta.1, 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" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== dependencies: function-bind "^1.1.1" @@ -4117,70 +4440,55 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + resolved "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz" integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== -get-stream@^4.0.0, get-stream@^4.1.0: +get-stream@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== dependencies: pump "^3.0.0" get-stream@^5.1.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== dependencies: pump "^3.0.0" get-stream@^6.0.0: version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -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= - -github-slugger@^1.3.0: - 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" +github-slugger@^1.4.0: + 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== -glob-parent@^5.1.0, glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" -glob-parent@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.1.tgz#42054f685eb6a44e7a7d189a96efa40a54971aa7" - integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: - is-glob "^4.0.1" + is-glob "^4.0.3" glob-to-regexp@^0.4.1: version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.0.0, glob@^7.0.3, glob@^7.1.3: +glob@^7.0.0, glob@^7.1.3: version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== dependencies: fs.realpath "^1.0.0" @@ -4190,23 +4498,35 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.6: + version "7.2.0" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" + 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" + global-dirs@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" + resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz" integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== dependencies: ini "2.0.0" -global-modules@2.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" + resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz" 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" + resolved "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz" integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== dependencies: ini "^1.3.5" @@ -4215,13 +4535,13 @@ global-prefix@^3.0.0: globals@^11.1.0: version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" 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== +globby@^11.0.1, globby@^11.0.4: + version "11.0.4" + resolved "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -4230,32 +4550,33 @@ globby@11.0.1: merge2 "^1.3.0" slash "^3.0.0" -globby@^11.0.1, globby@^11.0.2, globby@^11.0.3, globby@^11.0.4: - version "11.0.4" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" - integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" slash "^3.0.0" -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= +globby@^12.0.2: + version "12.2.0" + resolved "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz" + integrity sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA== dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" + array-union "^3.0.1" + dir-glob "^3.0.1" + fast-glob "^3.2.7" + ignore "^5.1.9" + merge2 "^1.4.1" + slash "^4.0.0" got@^9.6.0: version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz" integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== dependencies: "@sindresorhus/is" "^0.14.0" @@ -4270,14 +4591,19 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== +graceful-fs@^4.2.6, graceful-fs@^4.2.9: + version "4.2.10" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + gray-matter@^4.0.3: version "4.0.3" - resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798" + resolved "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz" integrity sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q== dependencies: js-yaml "^3.13.1" @@ -4285,92 +4611,53 @@ gray-matter@^4.0.3: section-matter "^1.0.0" strip-bom-string "^1.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" - gzip-size@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" + resolved "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz" integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== dependencies: duplexer "^0.1.2" handle-thing@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + resolved "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== has-bigints@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz" 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" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" 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" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== -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-yarn@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" + resolved "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz" integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== has@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" hast-to-hyperscript@^9.0.0: version "9.0.1" - resolved "https://registry.yarnpkg.com/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz#9b67fd188e4c81e8ad66f803855334173920218d" + resolved "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz" integrity sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA== dependencies: "@types/unist" "^2.0.3" @@ -4383,7 +4670,7 @@ hast-to-hyperscript@^9.0.0: hast-util-from-parse5@^5.0.0: version "5.0.3" - resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz#3089dc0ee2ccf6ec8bc416919b51a54a589e097c" + resolved "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz" integrity sha512-gOc8UB99F6eWVWFtM9jUikjN7QkWxB3nY0df5Z0Zq1/Nkwl5V4hAAsl0tmwlgWl/1shlTF8DnNYLO8X6wRV9pA== dependencies: ccount "^1.0.3" @@ -4394,7 +4681,7 @@ hast-util-from-parse5@^5.0.0: hast-util-from-parse5@^6.0.0: version "6.0.1" - resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz#554e34abdeea25ac76f5bd950a1f0180e0b3bc2a" + resolved "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz" integrity sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA== dependencies: "@types/parse5" "^5.0.0" @@ -4406,12 +4693,12 @@ hast-util-from-parse5@^6.0.0: hast-util-parse-selector@^2.0.0: version "2.2.5" - resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a" + resolved "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz" integrity sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ== hast-util-raw@6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/hast-util-raw/-/hast-util-raw-6.0.1.tgz#973b15930b7529a7b66984c98148b46526885977" + resolved "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.1.tgz" integrity sha512-ZMuiYA+UF7BXBtsTBNcLBF5HzXzkyE6MLzJnL605LKE8GJylNjGc4jjxazAHUtcwT5/CEt6afRKViYB4X66dig== dependencies: "@types/hast" "^2.0.0" @@ -4427,7 +4714,7 @@ hast-util-raw@6.0.1: hast-util-to-parse5@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz#1ec44650b631d72952066cea9b1445df699f8479" + resolved "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz" integrity sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ== dependencies: hast-to-hyperscript "^9.0.0" @@ -4438,7 +4725,7 @@ hast-util-to-parse5@^6.0.0: hastscript@^5.0.0: version "5.1.2" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.1.2.tgz#bde2c2e56d04c62dd24e8c5df288d050a355fb8a" + resolved "https://registry.npmjs.org/hastscript/-/hastscript-5.1.2.tgz" integrity sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ== dependencies: comma-separated-tokens "^1.0.0" @@ -4448,7 +4735,7 @@ hastscript@^5.0.0: hastscript@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640" + resolved "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz" integrity sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w== dependencies: "@types/hast" "^2.0.0" @@ -4459,17 +4746,12 @@ hastscript@^6.0.0: he@^1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -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== - history@^4.9.0: version "4.10.1" - resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" + resolved "https://registry.npmjs.org/history/-/history-4.10.1.tgz" integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== dependencies: "@babel/runtime" "^7.1.2" @@ -4481,14 +4763,14 @@ history@^4.9.0: hoist-non-react-statics@^3.1.0: version "3.3.2" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== dependencies: react-is "^16.7.0" hpack.js@^2.1.6: version "2.1.6" - resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + resolved "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz" integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= dependencies: inherits "^2.0.1" @@ -4496,58 +4778,48 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" -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-entities@^1.3.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" - integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== +html-entities@^2.3.2: + version "2.3.3" + resolved "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz" + integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== -html-minifier-terser@^5.0.1, html-minifier-terser@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054" - integrity sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg== +html-minifier-terser@^6.0.2, html-minifier-terser@^6.1.0: + version "6.1.0" + resolved "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz" + integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== dependencies: - camel-case "^4.1.1" - clean-css "^4.2.3" - commander "^4.1.1" + camel-case "^4.1.2" + clean-css "^5.2.2" + commander "^8.3.0" he "^1.2.0" - param-case "^3.0.3" + param-case "^3.0.4" relateurl "^0.2.7" - terser "^4.6.3" + terser "^5.10.0" html-tags@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140" + resolved "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz" integrity sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg== html-void-elements@^1.0.0: version "1.0.5" - resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.5.tgz#ce9159494e86d95e45795b166c2021c2cfca4483" + resolved "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz" integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w== -html-webpack-plugin@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-5.3.2.tgz#7b04bf80b1f6fe84a6d3f66c8b79d64739321b08" - integrity sha512-HvB33boVNCz2lTyBsSiMffsJ+m0YLIQ+pskblXgN9fnjS1BgEcuAfdInfXfGrkdXV406k9FiDi86eVCDBgJOyQ== +html-webpack-plugin@^5.5.0: + version "5.5.0" + resolved "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz" + integrity sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw== dependencies: - "@types/html-minifier-terser" "^5.0.0" - html-minifier-terser "^5.0.1" + "@types/html-minifier-terser" "^6.0.0" + html-minifier-terser "^6.0.2" lodash "^4.17.21" - pretty-error "^3.0.4" + pretty-error "^4.0.0" tapable "^2.0.0" htmlparser2@^3.9.1: version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz" integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== dependencies: domelementtype "^1.3.1" @@ -4559,7 +4831,7 @@ htmlparser2@^3.9.1: htmlparser2@^6.1.0: version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz" integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== dependencies: domelementtype "^2.0.1" @@ -4569,28 +4841,28 @@ htmlparser2@^6.1.0: http-cache-semantics@^4.0.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== http-deceiver@^1.2.7: version "1.2.7" - resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= -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== +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" http-errors@~1.6.2: version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= dependencies: depd "~1.1.2" @@ -4598,35 +4870,25 @@ http-errors@~1.6.2: setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" -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.3" - resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" + resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz" integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== -http-proxy-middleware@0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" - integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== +http-proxy-middleware@^2.0.3: + version "2.0.6" + resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz" + integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== dependencies: - http-proxy "^1.17.0" - is-glob "^4.0.0" - lodash "^4.17.11" - micromatch "^3.1.10" + "@types/http-proxy" "^1.17.8" + http-proxy "^1.18.1" + is-glob "^4.0.1" + is-plain-obj "^3.0.0" + micromatch "^4.0.2" -http-proxy@^1.17.0: +http-proxy@^1.18.1: version "1.18.1" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz" integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== dependencies: eventemitter3 "^4.0.0" @@ -4635,34 +4897,41 @@ http-proxy@^1.17.0: human-signals@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== iconv-lite@0.4.24: version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" + resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -ignore@^5.1.4: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +ignore@^5.1.4, ignore@^5.1.9, ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -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== +image-size@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/image-size/-/image-size-1.0.1.tgz" + integrity sha512-VAwkvNSNGClRw9mDHhc5Efax8PLlsOGcUTh0T/LIriC8vPA3U5PdqXWqkz406MoYHMKW8Uf9gWr05T/rYB44kQ== + dependencies: + queue "6.0.2" + +immer@^9.0.7: + version "9.0.12" + resolved "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz" + integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== -import-fresh@^3.2.1, import-fresh@^3.2.2, import-fresh@^3.3.0: +import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -4670,300 +4939,192 @@ import-fresh@^3.2.1, import-fresh@^3.2.2, import-fresh@^3.3.0: import-lazy@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= indent-string@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -infima@0.2.0-alpha.29: - version "0.2.0-alpha.29" - resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.29.tgz#4ccf27c4c696e9a0884b333ad9ced5f65b7ae5f3" - integrity sha512-b6XX4QJekAYBPz2Y0XcXrDRaX/+96V95/WKWedY4zAWZ6xlzdxCrnyUgNaC4575aHcA2bfarLlTsP8FHFhjZFQ== +infima@0.2.0-alpha.38: + version "0.2.0-alpha.38" + resolved "https://registry.npmjs.org/infima/-/infima-0.2.0-alpha.38.tgz" + integrity sha512-1WsmqSMI5IqzrUx3goq+miJznHBonbE3aoqZ1AR/i/oHhroxNeSV6Awv5VoVfXBhfTzLSnxkHaRI2qpAMYcCzw== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.0, 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" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" 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" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz" integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== ini@^1.3.5, ini@~1.3.0: version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== inline-style-parser@0.1.1: version "0.1.1" - resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1" + resolved "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz" integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== -internal-ip@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" - integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== - dependencies: - default-gateway "^4.2.0" - ipaddr.js "^1.9.0" - interpret@^1.0.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -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= - -ip@^1.1.0, ip@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" -ipaddr.js@1.9.1, ipaddr.js@^1.9.0: +ipaddr.js@1.9.1: version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-absolute-url@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" - integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== - -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" +ipaddr.js@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz" + integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== is-alphabetical@1.0.4, is-alphabetical@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" + resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz" integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== is-alphanumerical@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" + resolved "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz" integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== dependencies: is-alphabetical "^1.0.0" is-decimal "^1.0.0" -is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== - dependencies: - call-bind "^1.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" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-bigint@^1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" + resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz" integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== -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-binary-path@~2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" is-boolean-object@^1.1.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" + resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz" integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== dependencies: call-bind "^1.0.2" -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-buffer@^2.0.0: version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== is-callable@^1.1.4, is-callable@^1.2.3: version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== is-ci@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + resolved "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz" integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== dependencies: ci-info "^2.0.0" -is-color-stop@^1.1.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.2.0: version "2.4.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz" integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== 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.4" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" + resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz" integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== is-decimal@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" + resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz" integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== -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-docker@^2.0.0: +is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== -is-extendable@^0.1.0, is-extendable@^0.1.1: +is-extendable@^0.1.0: version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" 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: +is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -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-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -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, is-glob@~4.0.1: +is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-hexadecimal@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" + resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== is-installed-globally@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + resolved "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz" integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== dependencies: global-dirs "^3.0.0" @@ -4971,80 +5132,64 @@ is-installed-globally@^0.4.0: is-negative-zero@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz" integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== is-npm@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-5.0.0.tgz#43e8d65cc56e1b67f8d47262cf667099193f45a8" + resolved "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz" integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== is-number-object@^1.0.4: version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" + resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz" integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== -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@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-obj@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + resolved "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= is-obj@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + resolved "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-cwd@^2.0.0, is-path-cwd@^2.2.0: +is-path-cwd@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + resolved "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== -is-path-in-cwd@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" - integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== - dependencies: - is-path-inside "^2.1.0" - -is-path-inside@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" - integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== - dependencies: - path-is-inside "^1.0.2" - is-path-inside@^3.0.2: version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-plain-obj@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== -is-plain-object@^2.0.3, is-plain-object@^2.0.4: +is-plain-obj@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz" + integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== + +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" + resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" -is-regex@^1.0.4, is-regex@^1.1.3: +is-regex@^1.1.3: version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz" integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== dependencies: call-bind "^1.0.2" @@ -5052,197 +5197,177 @@ is-regex@^1.0.4, is-regex@^1.1.3: is-regexp@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= -is-resolvable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" - integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== - -is-root@2.1.0, is-root@^2.1.0: +is-root@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" + resolved "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== -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-stream@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== is-string@^1.0.5, is-string@^1.0.6: version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" + resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz" integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== 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" + resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz" 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" + resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-whitespace-character@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" + resolved "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz" integrity sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w== -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-word-character@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.4.tgz#ce0e73216f98599060592f62ff31354ddbeb0230" + resolved "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz" integrity sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA== -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= - -is-wsl@^2.1.1: +is-wsl@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== dependencies: is-docker "^2.0.0" is-yarn-global@^0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" + resolved "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== isarray@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= -isarray@1.0.0, isarray@~1.0.0: +isarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isexe@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" 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: +isobject@^3.0.1: version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= jest-worker@^27.0.2: version "27.0.2" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.2.tgz#4ebeb56cef48b3e7514552f80d0d80c0129f0b05" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.2.tgz" integrity sha512-EoBdilOTTyOgmHXtw/cPc+ZrCA0KJMrkXzkrPGNwLmnvvlN1nj7MPrxpT7m+otSv2e1TLaVffzDnE/LB14zJMg== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" -joi@^17.3.0, joi@^17.4.0: - version "17.4.0" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.4.0.tgz#b5c2277c8519e016316e49ababd41a1908d9ef20" - integrity sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg== +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +joi@^17.6.0: + version "17.6.0" + resolved "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz" + integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== dependencies: "@hapi/hoek" "^9.0.0" "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.0" + "@sideway/address" "^4.1.3" "@sideway/formula" "^3.0.0" "@sideway/pinpoint" "^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" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.0.0: +js-yaml@^4.1.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" jsesc@^2.5.1: version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== jsesc@~0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" 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" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= json-parse-better-errors@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-parse-even-better-errors@^2.3.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== 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" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json3@^3.3.3: - 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" +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== json5@^2.1.2: version "2.2.0" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz" integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== dependencies: minimist "^1.2.5" +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + jsonfile@^6.0.1: version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: universalify "^2.0.0" @@ -5251,98 +5376,70 @@ jsonfile@^6.0.1: keyv@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + resolved "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz" integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== dependencies: json-buffer "3.0.0" -killable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" - integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== - -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" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" 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" + resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -klona@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" - integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA== +klona@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz" + integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ== latest-version@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" + resolved "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz" integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== dependencies: package-json "^6.3.0" leven@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== lilconfig@^2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.3.tgz#68f3005e921dafbd2a2afb48379986aa6d2579fd" + resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.3.tgz" integrity sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg== lines-and-columns@^1.1.6: version "1.1.6" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= loader-runner@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" + resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz" integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== -loader-utils@2.0.0, loader-utils@^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" + resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz" integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== dependencies: big.js "^5.2.2" emojis-list "^3.0.0" json5 "^2.1.2" -loader-utils@^1.2.3, loader-utils@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" +loader-utils@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz" + integrity sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ== locate-path@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz" integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" @@ -5350,190 +5447,178 @@ locate-path@^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" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.assignin@^4.0.9: version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + resolved "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz" integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= lodash.curry@^4.0.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" + resolved "https://registry.npmjs.org/lodash.curry/-/lodash.curry-4.1.1.tgz" integrity sha1-JI42By7ekGUB11lmIAqG2riyMXA= lodash.debounce@^4.0.8: version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" 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" + resolved "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz" integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= lodash.flow@^3.3.0: version "3.5.0" - resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" + resolved "https://registry.npmjs.org/lodash.flow/-/lodash.flow-3.5.0.tgz" integrity sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o= lodash.foreach@^4.3.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + resolved "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" 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" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.pick@^4.2.1: version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + resolved "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz" 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" + resolved "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz" integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + lodash.toarray@^4.4.0: version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" + resolved "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz" integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= lodash.uniq@4.5.0, lodash.uniq@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -loglevel@^1.6.8: - version "1.7.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197" - integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw== - loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" lower-case@^2.0.2: version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz" integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== dependencies: tslib "^2.0.3" lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== lowercase-keys@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.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-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-escapes@^1.0.0: version "1.0.4" - resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" + resolved "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz" integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== mdast-squeeze-paragraphs@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz#7c4c114679c3bee27ef10b58e2e015be79f1ef97" + resolved "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz" integrity sha512-zxdPn69hkQ1rm4J+2Cs2j6wDEv7O17TfXTJ33tl/+JPIoEmtV9t2ZzBM5LPHE8QlHsmVD8t3vPKCyY3oH+H8MQ== dependencies: unist-util-remove "^2.0.0" mdast-util-definitions@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz#c5c1a84db799173b4dcf7643cda999e440c24db2" + resolved "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz" integrity sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ== dependencies: unist-util-visit "^2.0.0" mdast-util-to-hast@10.0.1: version "10.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz#0cfc82089494c52d46eb0e3edb7a4eb2aea021eb" + resolved "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz" integrity sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA== dependencies: "@types/mdast" "^3.0.0" @@ -5547,270 +5632,213 @@ mdast-util-to-hast@10.0.1: mdast-util-to-string@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b" + resolved "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz" integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w== mdn-data@2.0.14: version "2.0.14" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" + resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz" 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" + resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz" integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== mdurl@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= media-typer@0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= +memfs@^3.1.2, memfs@^3.4.1: + version "3.4.1" + resolved "https://registry.npmjs.org/memfs/-/memfs-3.4.1.tgz" + integrity sha512-1c9VPVvW5P7I85c35zAdEr1TD5+F11IToIHIlrVIcflfnzPkJa0ZoYEoEdYDP8KgPFoSZ/opDrUsAoZWym3mtw== dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" + fs-monkey "1.0.3" merge-descriptors@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= merge-stream@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" 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" + resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" 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" - micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.4" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== dependencies: braces "^3.0.1" picomatch "^2.2.3" +micromatch@^4.0.5: + version "4.0.5" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + mime-db@1.48.0, "mime-db@>= 1.43.0 < 2": version "1.48.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz" integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + mime-db@~1.33.0: version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz" integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== mime-types@2.1.18: version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz" integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== dependencies: mime-db "~1.33.0" mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.24: version "2.1.31" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz" integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg== dependencies: mime-db "1.48.0" +mime-types@^2.1.31, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + 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" + resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.3.1, mime@^2.4.4: +mime@^2.3.1: version "2.5.2" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" + resolved "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz" integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== mimic-fn@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== mini-create-react-context@^0.4.0: version "0.4.1" - resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz#072171561bfdc922da08a60c2197a497cc2d1d5e" + resolved "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz" integrity sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ== dependencies: "@babel/runtime" "^7.12.1" tiny-warning "^1.0.3" -mini-css-extract-plugin@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz#83172b4fd812f8fc4a09d6f6d16f924f53990ca8" - integrity sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q== +mini-css-extract-plugin@^2.6.0: + version "2.6.0" + resolved "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.0.tgz" + integrity sha512-ndG8nxCEnAemsg4FSgS+yNyHKgkTB4nPKqCOgh65j3/30qqC5RaSQQXMm++Y6sb6E1zRSxPkztj9fqxhS1Eo6w== dependencies: - loader-utils "^2.0.0" - schema-utils "^3.0.0" - webpack-sources "^1.1.0" + schema-utils "^4.0.0" minimalistic-assert@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== minimatch@3.0.4, minimatch@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" 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.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" + version "1.2.6" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== -mkdirp@^0.5.1, mkdirp@^0.5.5, 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" + resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -module-alias@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/module-alias/-/module-alias-2.2.2.tgz#151cdcecc24e25739ff0aa6e51e1c5716974c0e0" - integrity sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q== - ms@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" 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: version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@2.1.3, ms@^2.1.1: version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multicast-dns-service-types@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" - integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= - -multicast-dns@^6.0.1: - version "6.2.3" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" - integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== +multicast-dns@^7.2.4: + version "7.2.4" + resolved "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.4.tgz" + integrity sha512-XkCYOU+rr2Ft3LI6w4ye51M3VK31qJXFIxu0XLw169PtKG0Zx47OrXeVW/GCYOfpC9s1yyyf1S+L8/4LY0J9Zw== dependencies: - dns-packet "^1.3.1" + dns-packet "^5.2.2" thunky "^1.0.2" -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== - -nanoid@^3.1.23: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== - -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" +nanoid@^3.3.3: + version "3.3.3" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== negotiator@0.6.2: version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + neo-async@^2.6.2: version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -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== - no-case@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz" integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== dependencies: lower-case "^2.0.2" @@ -5818,128 +5846,102 @@ no-case@^3.0.4: node-emoji@^1.10.0: version "1.10.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da" + resolved "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz" integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw== dependencies: lodash.toarray "^4.4.0" -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" -node-forge@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.10.0.tgz#32dea2afb3e9926f02ee5ce8794902691a676bf3" - integrity sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA== +node-forge@^1: + version "1.3.1" + resolved "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== -node-releases@^1.1.61, node-releases@^1.1.71: +node-releases@^1.1.71: version "1.1.73" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz" integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== -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" +node-releases@^2.0.3: + version "2.0.4" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz" + integrity sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" 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" + resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= normalize-url@^4.1.0: version "4.5.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" + resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== normalize-url@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.0.1.tgz#a4f27f58cf8c7b287b440b8a8201f42d0b00d256" + resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-6.0.1.tgz" integrity sha512-VU4pzAuh7Kip71XEmO9aNREYAdMHFGTVj/i+CaTImS8x0i1d3jUZkXhqluy/PRgjPLMgsLQulYY3PJ/aSbSjpQ== -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" - npm-run-path@^4.0.1: version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" nprogress@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1" + resolved "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz" integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E= 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" + resolved "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz" integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== dependencies: boolbase "~1.0.0" -nth-check@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125" - integrity sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q== +nth-check@^2.0.0, nth-check@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz" + integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== dependencies: boolbase "^1.0.0" -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.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" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" 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.10.3: version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz" integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== -object-is@^1.0.1: - 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-inspect@^1.9.0: + 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== 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" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" 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" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz" integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: call-bind "^1.0.0" @@ -5949,23 +5951,16 @@ object.assign@^4.1.0, object.assign@^4.1.2: object.getownpropertydescriptors@^2.1.0: version "2.1.2" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + resolved "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz" integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" es-abstract "^1.18.0-next.2" -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.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" + resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz" integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== dependencies: call-bind "^1.0.2" @@ -5974,134 +5969,112 @@ object.values@^1.1.0: obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + resolved "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -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= +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" on-headers@~1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + resolved "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== 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" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" onetime@^5.1.2: version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" -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== +open@^8.0.9, open@^8.4.0: + version "8.4.0" + resolved "https://registry.npmjs.org/open/-/open-8.4.0.tgz" + integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== dependencies: - is-docker "^2.0.0" - is-wsl "^2.1.1" + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" opener@^1.5.2: version "1.5.2" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" + resolved "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -opn@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" - integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== - dependencies: - is-wsl "^1.1.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" - p-cancelable@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== -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-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" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" -p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@^3.0.2: version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.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" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz" 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" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - p-map@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: aggregate-error "^3.0.0" -p-retry@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" - integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w== +p-retry@^4.5.0: + version "4.6.2" + resolved "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz" + integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== dependencies: - retry "^0.12.0" + "@types/retry" "0.12.0" + retry "^0.13.1" p-try@^2.0.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== package-json@^6.3.0: version "6.5.0" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0" + resolved "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz" integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== dependencies: got "^9.6.0" @@ -6109,9 +6082,9 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -param-case@^3.0.3: +param-case@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" + resolved "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz" integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== dependencies: dot-case "^3.0.4" @@ -6119,14 +6092,14 @@ param-case@^3.0.3: parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-entities@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" + resolved "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz" integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== dependencies: character-entities "^1.0.0" @@ -6138,7 +6111,7 @@ parse-entities@^2.0.0: parse-json@^5.0.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -6146,295 +6119,258 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse-numeric-range@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.2.0.tgz#aa70b00f29624ed13e9f943e9461b306e386b0fa" - integrity sha512-1q2tXpAOplPxcl8vrIGPWz1dJxxfmdRkCFcpxxMBerDnGuuHalOWF/xj9L8Nn5XoTUoB/6F0CeQBp2fMgkOYFg== +parse-numeric-range@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz" + integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== + +parse5-htmlparser2-tree-adapter@^6.0.1: + 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== + dependencies: + parse5 "^6.0.1" parse5@^5.0.0: version "5.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + resolved "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== -parse5@^6.0.0: +parse5@^6.0.0, parse5@^6.0.1: version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== pascal-case@^3.1.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + resolved "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz" integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== dependencies: no-case "^3.0.4" tslib "^2.0.3" -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@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" 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" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" 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" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@1.0.2, path-is-inside@^1.0.2: +path-is-inside@1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= -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.0.0, path-key@^3.1.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6: version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" 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" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= path-to-regexp@2.2.1: version "2.2.1" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz" integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== path-to-regexp@^1.7.0: version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz" integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== dependencies: isarray "0.0.1" path-type@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -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= - -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" +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pkg-dir@^4.1.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" -pkg-up@3.1.0: +pkg-up@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz" integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== dependencies: find-up "^3.0.0" -portfinder@^1.0.26: +portfinder@^1.0.28: version "1.0.28" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778" + resolved "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz" 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@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.0.0.tgz#a05b87aacd132740a5db09462a3612453e5df90a" - integrity sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g== +postcss-calc@^8.2.3: + version "8.2.4" + resolved "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz" + integrity sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q== dependencies: - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.0.2" + postcss-selector-parser "^6.0.9" + postcss-value-parser "^4.2.0" -postcss-colormin@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.2.0.tgz#2b620b88c0ff19683f3349f4cf9e24ebdafb2c88" - integrity sha512-+HC6GfWU3upe5/mqmxuqYZ9B2Wl4lcoUUNkoaX59nEWV4EtADCMiBqui111Bu8R8IvaZTmqmxrqOAqjbHIwXPw== +postcss-colormin@^5.3.0: + version "5.3.0" + resolved "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz" + integrity sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg== dependencies: browserslist "^4.16.6" caniuse-api "^3.0.0" - colord "^2.0.1" - postcss-value-parser "^4.1.0" + colord "^2.9.1" + postcss-value-parser "^4.2.0" -postcss-convert-values@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz#4ec19d6016534e30e3102fdf414e753398645232" - integrity sha512-C3zR1Do2BkKkCgC0g3sF8TS0koF2G+mN8xxayZx3f10cIRmTaAnpgpRQZjNekTZxM2ciSPoh2IWJm0VZx8NoQg== +postcss-convert-values@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.0.tgz" + integrity sha512-GkyPbZEYJiWtQB0KZ0X6qusqFHUepguBCNFi9t5JJc7I2OTXG7C0twbTLvCfaKOLl3rSXmpAwV7W5txd91V84g== dependencies: - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-discard-comments@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz#9eae4b747cf760d31f2447c27f0619d5718901fe" - integrity sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg== +postcss-discard-comments@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.1.tgz" + integrity sha512-5JscyFmvkUxz/5/+TB3QTTT9Gi9jHkcn8dcmmuN68JQcv3aQg4y88yEHHhwFB52l/NkaJ43O0dbksGMAo49nfQ== -postcss-discard-duplicates@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz#68f7cc6458fe6bab2e46c9f55ae52869f680e66d" - integrity sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA== +postcss-discard-duplicates@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz" + integrity sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw== -postcss-discard-empty@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz#ee136c39e27d5d2ed4da0ee5ed02bc8a9f8bf6d8" - integrity sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw== +postcss-discard-empty@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz" + integrity sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A== -postcss-discard-overridden@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz#454b41f707300b98109a75005ca4ab0ff2743ac6" - integrity sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q== +postcss-discard-overridden@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz" + integrity sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw== -postcss-discard-unused@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-5.0.1.tgz#63e35a74a154912f93d4e75a1e6ff3cc146f934b" - integrity sha512-tD6xR/xyZTwfhKYRw0ylfCY8wbfhrjpKAMnDKRTLMy2fNW5hl0hoV6ap5vo2JdCkuHkP3CHw72beO4Y8pzFdww== +postcss-discard-unused@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-5.1.0.tgz" + integrity sha512-KwLWymI9hbwXmJa0dkrzpRbSJEh0vVUd7r8t0yOGPcfKzyJJxFM8kLyC5Ev9avji6nY95pOp1W6HqIrfT+0VGw== dependencies: postcss-selector-parser "^6.0.5" -postcss-loader@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-5.3.0.tgz#1657f869e48d4fdb018a40771c235e499ee26244" - integrity sha512-/+Z1RAmssdiSLgIZwnJHwBMnlABPgF7giYzTN2NOfr9D21IJZ4mQC1R2miwp80zno9M4zMD/umGI8cR+2EL5zw== +postcss-loader@^6.2.1: + version "6.2.1" + resolved "https://registry.npmjs.org/postcss-loader/-/postcss-loader-6.2.1.tgz" + integrity sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q== dependencies: cosmiconfig "^7.0.0" - klona "^2.0.4" - semver "^7.3.4" + klona "^2.0.5" + semver "^7.3.5" -postcss-merge-idents@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-5.0.1.tgz#6b5856fc28f2571f28ecce49effb9b0e64be9437" - integrity sha512-xu8ueVU0RszbI2gKkxR6mluupsOSSLvt8q4gA2fcKFkA+x6SlH3cb4cFHpDvcRCNFbUmCR/VUub+Y6zPOjPx+Q== +postcss-merge-idents@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-5.1.1.tgz" + integrity sha512-pCijL1TREiCoog5nQp7wUe+TUonA2tC2sQ54UGeMmryK3UFGIYKqDyjnqd6RcuI4znFn9hWSLNN8xKE/vWcUQw== dependencies: - cssnano-utils "^2.0.1" - postcss-value-parser "^4.1.0" + cssnano-utils "^3.1.0" + postcss-value-parser "^4.2.0" -postcss-merge-longhand@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.0.2.tgz#277ada51d9a7958e8ef8cf263103c9384b322a41" - integrity sha512-BMlg9AXSI5G9TBT0Lo/H3PfUy63P84rVz3BjCFE9e9Y9RXQZD3+h3YO1kgTNsNJy7bBc1YQp8DmSnwLIW5VPcw== +postcss-merge-longhand@^5.1.4: + version "5.1.4" + resolved "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.4.tgz" + integrity sha512-hbqRRqYfmXoGpzYKeW0/NCZhvNyQIlQeWVSao5iKWdyx7skLvCfQFGIUsP9NUs3dSbPac2IC4Go85/zG+7MlmA== dependencies: - css-color-names "^1.0.1" - postcss-value-parser "^4.1.0" - stylehacks "^5.0.1" + postcss-value-parser "^4.2.0" + stylehacks "^5.1.0" -postcss-merge-rules@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz#d6e4d65018badbdb7dcc789c4f39b941305d410a" - integrity sha512-5K+Md7S3GwBewfB4rjDeol6V/RZ8S+v4B66Zk2gChRqLTCC8yjnHQ601omj9TKftS19OPGqZ/XzoqpzNQQLwbg== +postcss-merge-rules@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.1.tgz" + integrity sha512-8wv8q2cXjEuCcgpIB1Xx1pIy8/rhMPIQqYKNzEdyx37m6gpq83mQQdCxgIkFgliyEnKvdwJf/C61vN4tQDq4Ww== dependencies: browserslist "^4.16.6" caniuse-api "^3.0.0" - cssnano-utils "^2.0.1" + cssnano-utils "^3.1.0" postcss-selector-parser "^6.0.5" - vendors "^1.0.3" -postcss-minify-font-values@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz#a90cefbfdaa075bd3dbaa1b33588bb4dc268addf" - integrity sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA== +postcss-minify-font-values@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz" + integrity sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA== dependencies: - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-minify-gradients@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-5.0.1.tgz#2dc79fd1a1afcb72a9e727bc549ce860f93565d2" - integrity sha512-odOwBFAIn2wIv+XYRpoN2hUV3pPQlgbJ10XeXPq8UY2N+9ZG42xu45lTn/g9zZ+d70NKSQD6EOi6UiCMu3FN7g== +postcss-minify-gradients@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz" + integrity sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw== dependencies: - cssnano-utils "^2.0.1" - is-color-stop "^1.1.0" - postcss-value-parser "^4.1.0" + colord "^2.9.1" + cssnano-utils "^3.1.0" + postcss-value-parser "^4.2.0" -postcss-minify-params@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz#371153ba164b9d8562842fdcd929c98abd9e5b6c" - integrity sha512-4RUC4k2A/Q9mGco1Z8ODc7h+A0z7L7X2ypO1B6V8057eVK6mZ6xwz6QN64nHuHLbqbclkX1wyzRnIrdZehTEHw== +postcss-minify-params@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.2.tgz" + integrity sha512-aEP+p71S/urY48HWaRHasyx4WHQJyOYaKpQ6eXl8k0kxg66Wt/30VR6/woh8THgcpRbonJD5IeD+CzNhPi1L8g== dependencies: - alphanum-sort "^1.0.2" - browserslist "^4.16.0" - cssnano-utils "^2.0.1" - postcss-value-parser "^4.1.0" - uniqs "^2.0.0" + browserslist "^4.16.6" + cssnano-utils "^3.1.0" + postcss-value-parser "^4.2.0" -postcss-minify-selectors@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz#4385c845d3979ff160291774523ffa54eafd5a54" - integrity sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og== +postcss-minify-selectors@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.0.tgz" + integrity sha512-vYxvHkW+iULstA+ctVNx0VoRAR4THQQRkG77o0oa4/mBS0OzGvvzLIvHDv/nNEM0crzN2WIyFU5X7wZhaUK3RA== dependencies: - alphanum-sort "^1.0.2" postcss-selector-parser "^6.0.5" postcss-modules-extract-imports@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz#cda1f047c0ae80c97dbe28c3e76a43b88025741d" + resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz" integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== postcss-modules-local-by-default@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz#ebbb54fae1598eecfdf691a02b3ff3b390a5a51c" + resolved "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz" integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== dependencies: icss-utils "^5.0.0" @@ -6443,235 +6379,219 @@ postcss-modules-local-by-default@^4.0.0: postcss-modules-scope@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" + resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz" integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== dependencies: postcss-selector-parser "^6.0.4" postcss-modules-values@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz#d7c5e7e68c3bb3c9b27cbf48ca0bb3ffb4602c9c" + resolved "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz" integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== dependencies: icss-utils "^5.0.0" -postcss-normalize-charset@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz#121559d1bebc55ac8d24af37f67bd4da9efd91d0" - integrity sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg== +postcss-normalize-charset@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz" + integrity sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg== -postcss-normalize-display-values@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz#62650b965981a955dffee83363453db82f6ad1fd" - integrity sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ== +postcss-normalize-display-values@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz" + integrity sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA== dependencies: - cssnano-utils "^2.0.1" - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-normalize-positions@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz#868f6af1795fdfa86fbbe960dceb47e5f9492fe5" - integrity sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg== +postcss-normalize-positions@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz" + integrity sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ== dependencies: - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-normalize-repeat-style@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz#cbc0de1383b57f5bb61ddd6a84653b5e8665b2b5" - integrity sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w== +postcss-normalize-repeat-style@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz" + integrity sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw== dependencies: - cssnano-utils "^2.0.1" - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-normalize-string@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz#d9eafaa4df78c7a3b973ae346ef0e47c554985b0" - integrity sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA== +postcss-normalize-string@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz" + integrity sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w== dependencies: - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-normalize-timing-functions@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz#8ee41103b9130429c6cbba736932b75c5e2cb08c" - integrity sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q== +postcss-normalize-timing-functions@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz" + integrity sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg== dependencies: - cssnano-utils "^2.0.1" - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-normalize-unicode@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz#82d672d648a411814aa5bf3ae565379ccd9f5e37" - integrity sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA== +postcss-normalize-unicode@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz" + integrity sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ== dependencies: - browserslist "^4.16.0" - postcss-value-parser "^4.1.0" + browserslist "^4.16.6" + postcss-value-parser "^4.2.0" -postcss-normalize-url@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz#ddcdfb7cede1270740cf3e4dfc6008bd96abc763" - integrity sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ== +postcss-normalize-url@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz" + integrity sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew== dependencies: - is-absolute-url "^3.0.3" normalize-url "^6.0.1" - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-normalize-whitespace@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz#b0b40b5bcac83585ff07ead2daf2dcfbeeef8e9a" - integrity sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA== +postcss-normalize-whitespace@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz" + integrity sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA== dependencies: - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-ordered-values@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz#1f351426977be00e0f765b3164ad753dac8ed044" - integrity sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ== +postcss-ordered-values@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.1.tgz" + integrity sha512-7lxgXF0NaoMIgyihL/2boNAEZKiW0+HkMhdKMTD93CjW8TdCy2hSdj8lsAo+uwm7EDG16Da2Jdmtqpedl0cMfw== dependencies: - cssnano-utils "^2.0.1" - postcss-value-parser "^4.1.0" + cssnano-utils "^3.1.0" + postcss-value-parser "^4.2.0" -postcss-reduce-idents@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-5.0.1.tgz#99b49ce8ee6f9c179447671cc9693e198e877bb7" - integrity sha512-6Rw8iIVFbqtaZExgWK1rpVgP7DPFRPh0DDFZxJ/ADNqPiH10sPCoq5tgo6kLiTyfh9sxjKYjXdc8udLEcPOezg== +postcss-reduce-idents@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-5.2.0.tgz" + integrity sha512-BTrLjICoSB6gxbc58D5mdBK8OhXRDqud/zodYfdSi52qvDHdMwk+9kB9xsM8yJThH/sZU5A6QVSmMmaN001gIg== dependencies: - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" -postcss-reduce-initial@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz#9d6369865b0f6f6f6b165a0ef5dc1a4856c7e946" - integrity sha512-zlCZPKLLTMAqA3ZWH57HlbCjkD55LX9dsRyxlls+wfuRfqCi5mSlZVan0heX5cHr154Dq9AfbH70LyhrSAezJw== +postcss-reduce-initial@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz" + integrity sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw== dependencies: - browserslist "^4.16.0" + browserslist "^4.16.6" caniuse-api "^3.0.0" -postcss-reduce-transforms@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz#93c12f6a159474aa711d5269923e2383cedcf640" - integrity sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA== +postcss-reduce-transforms@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz" + integrity sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ== dependencies: - cssnano-utils "^2.0.1" - postcss-value-parser "^4.1.0" + postcss-value-parser "^4.2.0" postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5: version "6.0.6" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea" + resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz" integrity sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss-sort-media-queries@^3.10.11: - version "3.11.12" - resolved "https://registry.yarnpkg.com/postcss-sort-media-queries/-/postcss-sort-media-queries-3.11.12.tgz#bfc449fadedfe2765ca4566c30b24694635ad182" - integrity sha512-PNhEOWR/btZ0bNNRqqdW4TWxBPQ1mu2I6/Zpco80vBUDSyEjtduUAorY0Vm68rvDlGea3+sgEnQ36iQ1A/gG8Q== +postcss-selector-parser@^6.0.9: + version "6.0.10" + resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz" + integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + +postcss-sort-media-queries@^4.2.1: + version "4.2.1" + resolved "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.2.1.tgz" + integrity sha512-9VYekQalFZ3sdgcTjXMa0dDjsfBVHXlraYJEMiOJ/2iMmI2JGCMavP16z3kWOaRu8NSaJCTgVpB/IVpH5yT9YQ== dependencies: - sort-css-media-queries "1.5.4" + sort-css-media-queries "2.0.4" -postcss-svgo@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-5.0.2.tgz#bc73c4ea4c5a80fbd4b45e29042c34ceffb9257f" - integrity sha512-YzQuFLZu3U3aheizD+B1joQ94vzPfE6BNUcSYuceNxlVnKKsOtdo6hL9/zyC168Q8EwfLSgaDSalsUGa9f2C0A== +postcss-svgo@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz" + integrity sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA== dependencies: - postcss-value-parser "^4.1.0" - svgo "^2.3.0" + postcss-value-parser "^4.2.0" + svgo "^2.7.0" -postcss-unique-selectors@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz#3be5c1d7363352eff838bd62b0b07a0abad43bfc" - integrity sha512-gwi1NhHV4FMmPn+qwBNuot1sG1t2OmacLQ/AX29lzyggnjd+MnVD5uqQmpXO3J17KGL2WAxQruj1qTd3H0gG/w== +postcss-unique-selectors@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz" + integrity sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA== dependencies: - alphanum-sort "^1.0.2" postcss-selector-parser "^6.0.5" - uniqs "^2.0.0" -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-zindex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-5.0.1.tgz#c585724beb69d356af8c7e68847b28d6298ece03" - integrity sha512-nwgtJJys+XmmSGoYCcgkf/VczP8Mp/0OfSv3v0+fw0uABY4yxw+eFs0Xp9nAZHIKnS5j+e9ywQ+RD+ONyvl5pA== +postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.2.15, postcss@^8.2.4: - version "8.3.5" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.5.tgz#982216b113412bc20a86289e91eb994952a5b709" - integrity sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA== - dependencies: - colorette "^1.2.2" - nanoid "^3.1.23" - source-map-js "^0.6.2" +postcss-zindex@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-5.1.0.tgz" + integrity sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A== -postcss@^8.3.5: - version "8.3.6" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" - integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== +postcss@^8.3.11, postcss@^8.3.5, postcss@^8.4.12, postcss@^8.4.7: + version "8.4.13" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.13.tgz" + integrity sha512-jtL6eTBrza5MPzy8oJLFuUscHDXTV5KcLlqAWHl5q5WYRfnNRGSmOZmOZ1T6Gy7A99mOZfqungmZMpMmCVJ8ZA== dependencies: - colorette "^1.2.2" - nanoid "^3.1.23" - source-map-js "^0.6.2" + nanoid "^3.3.3" + picocolors "^1.0.0" + source-map-js "^1.0.2" prepend-http@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -pretty-error@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-3.0.4.tgz#94b1d54f76c1ed95b9c604b9de2194838e5b574e" - integrity sha512-ytLFLfv1So4AO1UkoBF6GXQgJRaKbiSiGFICaOPNwQ3CMvBvXpLRubeQWyPGnsbV/t9ml9qto6IeCsho0aEvwQ== +pretty-error@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz" + integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== dependencies: lodash "^4.17.20" - renderkid "^2.0.6" + renderkid "^3.0.0" pretty-time@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e" + resolved "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz" integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== -prism-react-renderer@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.2.1.tgz#392460acf63540960e5e3caa699d851264e99b89" - integrity sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg== +prism-react-renderer@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-1.3.1.tgz" + integrity sha512-xUeDMEz074d0zc5y6rxiMp/dlC7C+5IDDlaEUlcBOFE2wddz7hz5PNupb087mPwTt7T9BrFmewObfCBuf/LKwQ== -prismjs@^1.23.0: - version "1.27.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" - integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== +prismjs@^1.27.0: + version "1.28.0" + resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.28.0.tgz" + integrity sha512-8aaXdYvl1F7iC7Xm1spqSaY/OJBpYW3v+KJ+F17iYxvdc8sfjW194COK5wVhMZX45tGteiBQgdvD/nhxcRwylw== 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" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== promise@^7.1.1: version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + resolved "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz" integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== dependencies: asap "~2.0.3" -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" - -prompts@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61" - integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ== +prompts@^2.4.2: + version "2.4.2" + resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.5.0, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== dependencies: loose-envify "^1.4.0" @@ -6680,114 +6600,103 @@ prop-types@^15.5.0, prop-types@^15.6.2, prop-types@^15.7.2: property-information@^5.0.0, property-information@^5.3.0: version "5.6.0" - resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.6.0.tgz#61675545fb23002f245c6540ec46077d4da3ed69" + resolved "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz" integrity sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA== dependencies: xtend "^4.0.0" -proxy-addr@~2.0.5: +proxy-addr@~2.0.7: version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== dependencies: forwarded "0.2.0" ipaddr.js "1.9.1" -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - pump@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" once "^1.3.1" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - punycode@^1.3.2: version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= punycode@^2.1.0: version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== pupa@^2.1.1: version "2.1.1" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" + resolved "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz" integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== dependencies: escape-goat "^2.0.0" pure-color@^1.2.0: version "1.3.0" - resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" + resolved "https://registry.npmjs.org/pure-color/-/pure-color-1.3.0.tgz" integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= q@^1.1.2: version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz" 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== - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -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== +qs@6.10.3: + version "6.10.3" + resolved "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" queue-microtask@^1.2.2: version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +queue@6.0.2: + version "6.0.2" + resolved "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz" + integrity sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA== + dependencies: + inherits "~2.0.3" + randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" range-parser@1.2.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" 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== +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== dependencies: - bytes "3.1.0" - http-errors "1.7.2" + bytes "3.1.2" + http-errors "2.0.0" iconv-lite "0.4.24" unpipe "1.0.0" rc@^1.2.8: version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" @@ -6797,7 +6706,7 @@ rc@^1.2.8: react-base16-styling@^0.6.0: version "0.6.0" - resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.6.0.tgz#ef2156d66cf4139695c8a167886cb69ea660792c" + resolved "https://registry.npmjs.org/react-base16-styling/-/react-base16-styling-0.6.0.tgz" integrity sha1-7yFW1mz0E5aVyKFniGy2nqZgeSw= dependencies: base16 "^1.0.0" @@ -6805,73 +6714,74 @@ react-base16-styling@^0.6.0: lodash.flow "^3.3.0" pure-color "^1.2.0" -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-dev-utils@^12.0.0: + version "12.0.1" + resolved "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz" + integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ== + dependencies: + "@babel/code-frame" "^7.16.0" + address "^1.1.2" + browserslist "^4.18.1" + chalk "^4.1.2" + cross-spawn "^7.0.3" + detect-port-alt "^1.1.6" + escape-string-regexp "^4.0.0" + filesize "^8.0.6" + find-up "^5.0.0" + fork-ts-checker-webpack-plugin "^6.5.0" + global-modules "^2.0.0" + globby "^11.0.4" + gzip-size "^6.0.0" + immer "^9.0.7" + is-root "^2.1.0" + loader-utils "^3.2.0" + open "^8.4.0" + pkg-up "^3.1.0" + prompts "^2.4.2" + react-error-overlay "^6.0.11" + recursive-readdir "^2.2.2" + shell-quote "^1.7.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" react-dom@^17.0.1: version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" scheduler "^0.20.2" -react-error-overlay@^6.0.9: - version "6.0.9" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a" - integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew== +react-error-overlay@^6.0.11: + version "6.0.11" + resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz" + integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== -react-fast-compare@^3.1.1: +react-fast-compare@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" + resolved "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz" integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== -react-helmet@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.1.0.tgz#a750d5165cb13cf213e44747502652e794468726" - integrity sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw== +react-helmet-async@*, react-helmet-async@^1.2.3: + version "1.3.0" + resolved "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz" + integrity sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg== dependencies: - object-assign "^4.1.1" + "@babel/runtime" "^7.12.5" + invariant "^2.2.4" prop-types "^15.7.2" - react-fast-compare "^3.1.1" - react-side-effect "^2.1.0" + react-fast-compare "^3.2.0" + shallowequal "^1.1.0" react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1: version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== react-json-view@^1.21.3: version "1.21.3" - resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.21.3.tgz#f184209ee8f1bf374fb0c41b0813cff54549c475" + resolved "https://registry.npmjs.org/react-json-view/-/react-json-view-1.21.3.tgz" integrity sha512-13p8IREj9/x/Ye4WI/JpjhoIwuzEgUAtgJZNBJckfzJt1qyh24BdTm6UQNGnyTq9dapQdrqvquZTo3dz1X6Cjw== dependencies: flux "^4.0.1" @@ -6881,33 +6791,26 @@ react-json-view@^1.21.3: react-lifecycles-compat@^3.0.4: version "3.0.4" - resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== react-loadable-ssr-addon-v5-slorber@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.1.tgz#2cdc91e8a744ffdf9e3556caabeb6e4278689883" + resolved "https://registry.npmjs.org/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.1.tgz" integrity sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A== dependencies: "@babel/runtime" "^7.10.3" -react-loadable@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/react-loadable/-/react-loadable-5.5.0.tgz#582251679d3da86c32aae2c8e689c59f1196d8c4" - integrity sha512-C8Aui0ZpMd4KokxRdVAm2bQtI03k2RMRNzOB+IipV3yxFTSVICv7WoUr5L9ALB5BmKO1iHgZtWM8EvYG83otdg== - dependencies: - prop-types "^15.5.0" - react-router-config@^5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/react-router-config/-/react-router-config-5.1.1.tgz#0f4263d1a80c6b2dc7b9c1902c9526478194a988" + resolved "https://registry.npmjs.org/react-router-config/-/react-router-config-5.1.1.tgz" integrity sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg== dependencies: "@babel/runtime" "^7.1.2" react-router-dom@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.2.0.tgz#9e65a4d0c45e13289e66c7b17c7e175d0ea15662" + resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz" integrity sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== dependencies: "@babel/runtime" "^7.1.2" @@ -6920,7 +6823,7 @@ react-router-dom@^5.2.0: react-router@5.2.0, react-router@^5.2.0: version "5.2.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293" + resolved "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz" integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw== dependencies: "@babel/runtime" "^7.1.2" @@ -6934,14 +6837,9 @@ react-router@5.2.0, react-router@^5.2.0: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-side-effect@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.1.tgz#66c5701c3e7560ab4822a4ee2742dee215d72eb3" - integrity sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ== - react-textarea-autosize@^8.3.2: version "8.3.3" - resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.3.tgz#f70913945369da453fd554c168f6baacd1fa04d8" + resolved "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.3.3.tgz" integrity sha512-2XlHXK2TDxS6vbQaoPbMOfQ8GK7+irc2fVK6QFIcC8GOnH3zI/v481n+j1L0WaPVvKxwesnY93fEfH++sus2rQ== dependencies: "@babel/runtime" "^7.10.2" @@ -6950,15 +6848,15 @@ react-textarea-autosize@^8.3.2: react@^17.0.1: version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" + resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" -readable-stream@^2.0.1, readable-stream@^2.0.2: +readable-stream@^2.0.1: version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" @@ -6971,91 +6869,73 @@ readable-stream@^2.0.1, readable-stream@^2.0.2: readable-stream@^3.0.6, readable-stream@^3.1.1: version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" 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" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" readdirp@~3.6.0: version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" -reading-time@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reading-time/-/reading-time-1.3.0.tgz#d13e74431589a4a9038669f24d5acbc08bbb015d" - integrity sha512-RJ8J5O6UvrclfZpcPSPuKusrdRfoY7uXXoYOOdeswZNtSkQaewT3919yz6RyloDBR+iwcUyz5zGOUjhgvfuv3g== +reading-time@^1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz" + integrity sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg== rechoir@^0.6.2: version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + resolved "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= dependencies: resolve "^1.1.6" -recursive-readdir@2.2.2: +recursive-readdir@^2.2.2: version "2.2.2" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + resolved "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz" integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== dependencies: minimatch "3.0.4" +regenerate-unicode-properties@^10.0.1: + version "10.0.1" + resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz" + integrity sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw== + dependencies: + regenerate "^1.4.2" + 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" + resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz" integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== dependencies: regenerate "^1.4.0" -regenerate@^1.4.0: +regenerate@^1.4.0, regenerate@^1.4.2: version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" 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" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz" 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== +regenerator-transform@^0.15.0: + version "0.15.0" + resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz" + 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" - -regexp.prototype.flags@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" - integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - regexpu-core@^4.7.1: version "4.7.1" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" + resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz" integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== dependencies: regenerate "^1.4.0" @@ -7065,35 +6945,59 @@ regexpu-core@^4.7.1: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.2.0" +regexpu-core@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz" + 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" + registry-auth-token@^4.0.0: version "4.2.1" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250" + resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz" integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw== dependencies: rc "^1.2.8" registry-url@^5.0.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009" + resolved "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz" integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== dependencies: rc "^1.2.8" regjsgen@^0.5.1: version "0.5.2" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" + resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz" integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== +regjsgen@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz" + integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA== + regjsparser@^0.6.4: version "0.6.9" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.9.tgz#b489eef7c9a2ce43727627011429cf833a7183e6" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz" integrity sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ== dependencies: jsesc "~0.5.0" +regjsparser@^0.8.2: + version "0.8.4" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz" + integrity sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA== + dependencies: + jsesc "~0.5.0" + rehype-parse@^6.0.2: version "6.0.2" - resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-6.0.2.tgz#aeb3fdd68085f9f796f1d3137ae2b85a98406964" + resolved "https://registry.npmjs.org/rehype-parse/-/rehype-parse-6.0.2.tgz" integrity sha512-0S3CpvpTAgGmnz8kiCyFLGuW5yA4OQhyNTm/nwPopZ7+PI11WnGl1TTWTGv/2hPEe/g2jRLlhVVSsoDH8waRug== dependencies: hast-util-from-parse5 "^5.0.0" @@ -7102,12 +7006,12 @@ rehype-parse@^6.0.2: relateurl@^0.2.7: version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + resolved "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz" integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= remark-admonitions@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/remark-admonitions/-/remark-admonitions-1.2.1.tgz#87caa1a442aa7b4c0cafa04798ed58a342307870" + resolved "https://registry.npmjs.org/remark-admonitions/-/remark-admonitions-1.2.1.tgz" integrity sha512-Ji6p68VDvD+H1oS95Fdx9Ar5WA2wcDA4kwrrhVU7fGctC6+d3uiMICu7w7/2Xld+lnU7/gi+432+rRbup5S8ow== dependencies: rehype-parse "^6.0.2" @@ -7116,7 +7020,7 @@ remark-admonitions@^1.2.1: remark-emoji@^2.1.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/remark-emoji/-/remark-emoji-2.2.0.tgz#1c702090a1525da5b80e15a8f963ef2c8236cac7" + resolved "https://registry.npmjs.org/remark-emoji/-/remark-emoji-2.2.0.tgz" integrity sha512-P3cj9s5ggsUvWw5fS2uzCHJMGuXYRb0NnZqYlNecewXt8QBU9n5vW3DUUKOhepS8F9CwdMx9B8a3i7pqFWAI5w== dependencies: emoticon "^3.2.0" @@ -7125,12 +7029,12 @@ remark-emoji@^2.1.0: remark-footnotes@2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/remark-footnotes/-/remark-footnotes-2.0.0.tgz#9001c4c2ffebba55695d2dd80ffb8b82f7e6303f" + resolved "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz" integrity sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ== remark-mdx@1.6.22: version "1.6.22" - resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-1.6.22.tgz#06a8dab07dcfdd57f3373af7f86bd0e992108bbd" + resolved "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.22.tgz" integrity sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ== dependencies: "@babel/core" "7.12.9" @@ -7144,7 +7048,7 @@ remark-mdx@1.6.22: remark-parse@8.0.3: version "8.0.3" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-8.0.3.tgz#9c62aa3b35b79a486454c690472906075f40c7e1" + resolved "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz" integrity sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q== dependencies: ccount "^1.0.0" @@ -7166,87 +7070,55 @@ remark-parse@8.0.3: remark-squeeze-paragraphs@4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-4.0.0.tgz#76eb0e085295131c84748c8e43810159c5653ead" + resolved "https://registry.npmjs.org/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-4.0.0.tgz" integrity sha512-8qRqmL9F4nuLPIgl92XUuxI3pFxize+F1H0e/W3llTk0UsjJaj01+RrirkMw7P21RKe4X6goQhYRSvNWX+70Rw== dependencies: mdast-squeeze-paragraphs "^4.0.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= - -renderkid@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.7.tgz#464f276a6bdcee606f4a15993f9b29fc74ca8609" - integrity sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ== +renderkid@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz" + integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== dependencies: css-select "^4.1.3" dom-converter "^0.2.0" htmlparser2 "^6.1.0" lodash "^4.17.21" - strip-ansi "^3.0.1" + strip-ansi "^6.0.1" -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.4, repeat-string@^1.6.1: +repeat-string@^1.5.4: version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== "require-like@>= 0.1.1": version "0.1.2" - resolved "https://registry.yarnpkg.com/require-like/-/require-like-0.1.2.tgz#ad6f30c13becd797010c468afa775c0c0a6b47fa" + resolved "https://registry.npmjs.org/require-like/-/require-like-0.1.2.tgz" integrity sha1-rW8wwTvs15cBDEaK+ndcDAprR/o= -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - requires-port@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -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-from@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-pathname@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" + resolved "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== -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.14.2, resolve@^1.3.2: version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== dependencies: is-core-module "^2.2.0" @@ -7254,127 +7126,97 @@ resolve@^1.1.6, resolve@^1.14.2, resolve@^1.3.2: responselike@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + resolved "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz" 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== - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== reusify@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" 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.6.3: - 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" - rimraf@^3.0.2: version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" -rtl-detect@^1.0.3: +rtl-detect@^1.0.4: version "1.0.4" - resolved "https://registry.yarnpkg.com/rtl-detect/-/rtl-detect-1.0.4.tgz#40ae0ea7302a150b96bc75af7d749607392ecac6" + resolved "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.0.4.tgz" integrity sha512-EBR4I2VDSSYr7PkBmFy04uhycIpDKp+21p/jARYXlCSjQksTBQcJ0HFUPOO79EPPH5JS6VAhiIQbycf0O3JAxQ== -rtlcss@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/rtlcss/-/rtlcss-3.2.0.tgz#2139734ac45302891182f23f13448c51c07fccaf" - integrity sha512-nV3UmaTmA5TkP2dYOR16ULu6FkMOqZRbiXbFZnmWIN9coPfx3gin31VGOPV7vrVMPjNds7pCS2UYy0mwQUdFCQ== +rtlcss@^3.5.0: + version "3.5.0" + resolved "https://registry.npmjs.org/rtlcss/-/rtlcss-3.5.0.tgz" + integrity sha512-wzgMaMFHQTnyi9YOwsx9LjOxYXJPzS8sYnFaKm6R5ysvTkwzHiB0vxnbHwchHQT65PTdBjDG21/kQBWI7q9O7A== dependencies: - chalk "^4.1.0" find-up "^5.0.0" - mkdirp "^1.0.4" - postcss "^8.2.4" + picocolors "^1.0.0" + postcss "^8.3.11" strip-json-comments "^3.1.1" run-parallel@^1.1.9: version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" -rxjs@^6.6.3: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== +rxjs@^7.5.4: + version "7.5.5" + resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz" + integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw== dependencies: - tslib "^1.9.0" + tslib "^2.1.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" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -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": version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" 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" + resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== scheduler@^0.20.2: version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz" integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== +schema-utils@2.7.0: + version "2.7.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz" + integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" + "@types/json-schema" "^7.0.4" + ajv "^6.12.2" + ajv-keywords "^3.4.1" schema-utils@^2.6.5: version "2.7.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz" integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== dependencies: "@types/json-schema" "^7.0.5" @@ -7383,25 +7225,35 @@ schema-utils@^2.6.5: schema-utils@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.0.0.tgz#67502f6aa2b66a2d4032b4279a2944978a0913ef" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz" integrity sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== dependencies: "@types/json-schema" "^7.0.6" ajv "^6.12.5" ajv-keywords "^3.5.2" -schema-utils@^3.1.0: +schema-utils@^3.1.0, schema-utils@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz" integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== dependencies: "@types/json-schema" "^7.0.8" ajv "^6.12.5" ajv-keywords "^3.5.2" +schema-utils@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz" + integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.8.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.0.0" + section-matter@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/section-matter/-/section-matter-1.0.0.tgz#e9041953506780ec01d59f292a19c7b850b84167" + resolved "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz" integrity sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA== dependencies: extend-shallow "^2.0.1" @@ -7409,74 +7261,81 @@ section-matter@^1.0.0: select-hose@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + resolved "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= -selfsigned@^1.10.8: - version "1.10.11" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.11.tgz#24929cd906fe0f44b6d01fb23999a739537acbe9" - integrity sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA== +selfsigned@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz" + integrity sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ== dependencies: - node-forge "^0.10.0" + node-forge "^1" semver-diff@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" + resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz" integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== dependencies: semver "^6.3.0" semver@7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: +semver@^5.4.1: version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.2: + version "7.3.7" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + semver@^7.3.4, semver@^7.3.5: version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== +send@0.18.0: + version "0.18.0" + resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== dependencies: debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" + depd "2.0.0" + destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "~1.7.2" + http-errors "2.0.0" mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" + ms "2.1.3" + on-finished "2.4.1" range-parser "~1.2.1" - statuses "~1.5.0" + statuses "2.0.1" serialize-javascript@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" serve-handler@^6.1.3: version "6.1.3" - resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" + resolved "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz" integrity sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w== dependencies: bytes "3.0.0" @@ -7490,7 +7349,7 @@ serve-handler@^6.1.3: serve-index@^1.9.1: version "1.9.1" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + resolved "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz" integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= dependencies: accepts "~1.3.4" @@ -7501,99 +7360,86 @@ serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -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== +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.17.1" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -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" + send "0.18.0" setimmediate@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= setprototypeof@1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" + 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" + resolved "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz" 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" +shallowequal@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" 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" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" 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== +shell-quote@^1.7.3: + version "1.7.3" + resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz" + integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== -shelljs@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" - integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== +shelljs@^0.8.5: + version "0.8.5" + resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" rechoir "^0.6.2" -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== sirv@^1.0.7: version "1.0.12" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.12.tgz#d816c882b35489b3c63290e2f455ae3eccd5f652" + resolved "https://registry.npmjs.org/sirv/-/sirv-1.0.12.tgz" integrity sha512-+jQoCxndz7L2tqQL4ZyzfDhky0W/4ZJip3XoOuxyQWnAwMxindLl3Xv1qT4x1YX/re0leShvTm8Uk0kQspGhBg== dependencies: "@polka/url" "^1.0.0-next.15" @@ -7602,137 +7448,86 @@ sirv@^1.0.7: sisteransi@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== -sitemap@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-7.0.0.tgz#022bef4df8cba42e38e1fe77039f234cab0372b6" - integrity sha512-Ud0jrRQO2k7fEtPAM+cQkBKoMvxQyPKNXKDLn8tRVHxRCsdDQ2JZvw+aZ5IRYYQVAV9iGxEar6boTwZzev+x3g== +sitemap@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz" + integrity sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg== dependencies: - "@types/node" "^15.0.1" + "@types/node" "^17.0.5" "@types/sax" "^1.2.1" arg "^5.0.0" sax "^1.2.4" slash@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" 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" - -sockjs-client@^1.5.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.5.1.tgz#256908f6d5adfb94dabbdbd02c66362cca0f9ea6" - integrity sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ== - dependencies: - debug "^3.2.6" - eventsource "^1.0.7" - faye-websocket "^0.11.3" - inherits "^2.0.4" - json3 "^3.3.3" - url-parse "^1.5.1" +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== sockjs@^0.3.21: version "0.3.21" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.21.tgz#b34ffb98e796930b60a0cfa11904d6a339a7d417" + resolved "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz" integrity sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw== dependencies: faye-websocket "^0.11.3" uuid "^3.4.0" websocket-driver "^0.7.4" -sort-css-media-queries@1.5.4: - version "1.5.4" - resolved "https://registry.yarnpkg.com/sort-css-media-queries/-/sort-css-media-queries-1.5.4.tgz#24182b12002a13d01ba943ddf74f5098d7c244ce" - integrity sha512-YP5W/h4Sid/YP7Lp87ejJ5jP13/Mtqt2vx33XyhO+IAugKlufRPbOrPlIiEUuxmpNBSBd3EeeQpFhdu3RfI2Ag== +sort-css-media-queries@2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/sort-css-media-queries/-/sort-css-media-queries-2.0.4.tgz" + integrity sha512-PAIsEK/XupCQwitjv7XxoMvYhT7EAfyzI3hsy/MyDgTvc+Ft55ctdkctJLOy6cQejaIC+zjpUL4djFVm2ivOOw== source-list-map@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + resolved "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-js@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e" - integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug== - -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-js@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map-support@~0.5.12, source-map-support@~0.5.19: - 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== +source-map-support@~0.5.20: + 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== 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: +source-map@^0.5.0: version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= source-map@^0.6.0, source-map@^0.6.1, 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" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@~0.7.2: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== +source-map@~0.8.0-beta.0: + version "0.8.0-beta.0" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz" + integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== + dependencies: + whatwg-url "^7.0.0" space-separated-tokens@^1.0.0: version "1.1.5" - resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899" + resolved "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz" integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA== spdy-transport@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + resolved "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz" integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== dependencies: debug "^4.1.0" @@ -7744,7 +7539,7 @@ spdy-transport@^3.0.0: spdy@^4.0.2: version "4.0.2" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + resolved "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz" integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== dependencies: debug "^4.1.0" @@ -7753,69 +7548,57 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" -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" + resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= stable@^0.1.8: version "0.1.8" - resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + resolved "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== state-toggle@^1.0.0: version "1.0.3" - resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" + resolved "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz" integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== -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@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: +"statuses@>= 1.4.0 < 2": version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -std-env@^2.2.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-2.3.0.tgz#66d4a4a4d5224242ed8e43f5d65cfa9095216eee" - integrity sha512-4qT5B45+Kjef2Z6pE0BkskzsH0GO7GrND0wGlTM1ioUe3v0dGYx9ZJH0Aro/YyA8fqQ5EyIKDRjZojJYMFTflw== - dependencies: - ci-info "^3.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" +std-env@^3.0.1: + version "3.1.1" + resolved "https://registry.npmjs.org/std-env/-/std-env-3.1.1.tgz" + integrity sha512-/c645XdExBypL01TpFKiG/3RAa/Qmu+zRi0MwAmrdEkwHNuN0ebo8ccAXBBDa5Z0QOJgBskUIbuCK91x0sCVEw== string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz" integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^5.0.1: + version "5.1.2" + resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.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" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz" integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== dependencies: call-bind "^1.0.2" @@ -7823,7 +7606,7 @@ string.prototype.trimend@^1.0.4: 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" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz" integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== dependencies: call-bind "^1.0.2" @@ -7831,124 +7614,112 @@ string.prototype.trimstart@^1.0.4: string_decoder@^1.1.1: version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" 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" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" stringify-object@^3.3.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz" integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== dependencies: get-own-enumerable-property-symbols "^3.0.0" is-obj "^1.0.1" is-regexp "^1.0.0" -strip-ansi@6.0.0, strip-ansi@^6.0.0: +strip-ansi@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz" integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== dependencies: ansi-regex "^5.0.0" -strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - ansi-regex "^2.0.0" + ansi-regex "^5.0.1" -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== +strip-ansi@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz" + integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== dependencies: - ansi-regex "^4.1.0" + ansi-regex "^6.0.1" strip-bom-string@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" + resolved "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz" integrity sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI= -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-final-newline@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-json-comments@~2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= style-to-object@0.3.0, style-to-object@^0.3.0: version "0.3.0" - resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.3.0.tgz#b1b790d205991cc783801967214979ee19a76e46" + resolved "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz" integrity sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA== dependencies: inline-style-parser "0.1.1" -stylehacks@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.0.1.tgz#323ec554198520986806388c7fdaebc38d2c06fb" - integrity sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA== +stylehacks@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz" + integrity sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q== dependencies: - browserslist "^4.16.0" + browserslist "^4.16.6" postcss-selector-parser "^6.0.4" supports-color@^5.3.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" 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" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-color@^8.0.0: version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" svg-parser@^2.0.2: version "2.0.4" - resolved "https://registry.yarnpkg.com/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5" + resolved "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz" integrity sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ== svgo@^1.2.2: version "1.3.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" + resolved "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz" integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== dependencies: chalk "^2.4.1" @@ -7965,179 +7736,147 @@ svgo@^1.2.2: unquote "~1.1.1" util.promisify "~1.0.0" -svgo@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-2.3.0.tgz#6b3af81d0cbd1e19c83f5f63cec2cb98c70b5373" - integrity sha512-fz4IKjNO6HDPgIQxu4IxwtubtbSfGEAJUq/IXyTPIkGhWck/faiiwfkvsB8LnBkKLvSoyNNIY6d13lZprJMc9Q== +svgo@^2.5.0, svgo@^2.7.0: + version "2.8.0" + resolved "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz" + integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg== dependencies: - "@trysound/sax" "0.1.1" - chalk "^4.1.0" - commander "^7.1.0" - css-select "^3.1.2" - css-tree "^1.1.2" + "@trysound/sax" "0.2.0" + commander "^7.2.0" + css-select "^4.1.3" + css-tree "^1.1.3" csso "^4.2.0" + picocolors "^1.0.0" stable "^0.1.8" tapable@^1.0.0: version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + resolved "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" + resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== -terser-webpack-plugin@^5.1.3: - version "5.1.4" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz#c369cf8a47aa9922bd0d8a94fe3d3da11a7678a1" - integrity sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA== +terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.3.1: + version "5.3.1" + resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz" + integrity sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g== dependencies: - jest-worker "^27.0.2" - p-limit "^3.1.0" - schema-utils "^3.0.0" + jest-worker "^27.4.5" + schema-utils "^3.1.1" serialize-javascript "^6.0.0" source-map "^0.6.1" - terser "^5.7.0" - -terser@^4.6.3: - version "4.8.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" + terser "^5.7.2" -terser@^5.7.0: - version "5.7.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693" - integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g== +terser@^5.10.0, terser@^5.7.2: + version "5.13.1" + resolved "https://registry.npmjs.org/terser/-/terser-5.13.1.tgz" + integrity sha512-hn4WKOfwnwbYfe48NgrQjqNOH9jzLqRcIfbYytOXCOv46LBfWr9bDS17MQqOi+BWGD0sJK3Sj5NC/gJjiojaoA== dependencies: + acorn "^8.5.0" commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.19" + source-map "~0.8.0-beta.0" + source-map-support "~0.5.20" -text-table@0.2.0, text-table@^0.2.0: +text-table@^0.2.0: version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= thunky@^1.0.2: version "1.1.0" - resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + resolved "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz" integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== -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-invariant@^1.0.2: version "1.1.0" - resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" + resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz" integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== tiny-warning@^1.0.0, tiny-warning@^1.0.3: version "1.0.3" - resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" + resolved "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== 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" + resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" 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-readable-stream@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + resolved "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz" integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== -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" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" 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.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== totalist@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" + resolved "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz" integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + trim-trailing-lines@^1.0.0: version "1.1.4" - resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz#bd4abbec7cc880462f10b2c8b5ce1d8d1ec7c2c0" + resolved "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz" integrity sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ== trim@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" + resolved "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz" integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= trough@^1.0.0: version "1.0.5" - resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" + resolved "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== ts-essentials@^2.0.3: version "2.0.12" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" + resolved "https://registry.npmjs.org/ts-essentials/-/ts-essentials-2.0.12.tgz" integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== -tslib@^1.9.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" - integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== +tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.1: + version "2.4.0" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== type-fest@^0.20.2: version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== +type-fest@^2.5.0: + version "2.12.2" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.12.2.tgz" + integrity sha512-qt6ylCGpLjZ7AaODxbpyBZSs9fCI9SkL3Z9q2oxMBQhs/uyY+VD8jHA8ULCGmWQJlBgqvO3EJeAngOHD8zQCrQ== -type-is@~1.6.17, type-is@~1.6.18: +type-is@~1.6.18: version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== dependencies: media-typer "0.3.0" @@ -8145,19 +7884,19 @@ type-is@~1.6.17, type-is@~1.6.18: typedarray-to-buffer@^3.1.5: version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== dependencies: is-typedarray "^1.0.0" ua-parser-js@^0.7.18: version "0.7.28" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.28.tgz#8ba04e653f35ce210239c64661685bf9121dec31" + resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz" integrity sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g== unbox-primitive@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz" integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== dependencies: function-bind "^1.1.1" @@ -8167,7 +7906,7 @@ unbox-primitive@^1.0.1: unherit@^1.0.4: version "1.1.3" - resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22" + resolved "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz" integrity sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ== dependencies: inherits "^2.0.0" @@ -8175,30 +7914,53 @@ unherit@^1.0.4: 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" + resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz" integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== +unicode-canonical-property-names-ecmascript@^2.0.0: + 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== + 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" + resolved "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz" 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-ecmascript@^2.0.0: + 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== + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + 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" + resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz" integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== +unicode-match-property-value-ecmascript@^2.0.0: + 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== + 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" + resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz" integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== +unicode-property-aliases-ecmascript@^2.0.0: + 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== + unified@9.2.0: version "9.2.0" - resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.0.tgz#67a62c627c40589edebbf60f53edfd4d822027f8" + resolved "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz" integrity sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg== dependencies: bail "^1.0.0" @@ -8210,7 +7972,7 @@ unified@9.2.0: unified@^8.4.2: version "8.4.2" - resolved "https://registry.yarnpkg.com/unified/-/unified-8.4.2.tgz#13ad58b4a437faa2751a4a4c6a16f680c500fff1" + resolved "https://registry.npmjs.org/unified/-/unified-8.4.2.tgz" integrity sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA== dependencies: bail "^1.0.0" @@ -8219,72 +7981,57 @@ unified@^8.4.2: trough "^1.0.0" vfile "^4.0.0" -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" - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= - unique-string@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" + resolved "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz" integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== dependencies: crypto-random-string "^2.0.0" unist-builder@2.0.3, unist-builder@^2.0.0: version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-2.0.3.tgz#77648711b5d86af0942f334397a33c5e91516436" + resolved "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz" integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw== unist-util-generated@^1.0.0: version "1.1.6" - resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.6.tgz#5ab51f689e2992a472beb1b35f2ce7ff2f324d4b" + resolved "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz" integrity sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg== unist-util-is@^4.0.0: version "4.1.0" - resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.1.0.tgz#976e5f462a7a5de73d94b706bac1b90671b57797" + resolved "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz" integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg== unist-util-position@^3.0.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-3.1.0.tgz#1c42ee6301f8d52f47d14f62bbdb796571fa2d47" + resolved "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz" integrity sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA== unist-util-remove-position@^2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz#5d19ca79fdba712301999b2b73553ca8f3b352cc" + resolved "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz" integrity sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA== dependencies: unist-util-visit "^2.0.0" unist-util-remove@^2.0.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/unist-util-remove/-/unist-util-remove-2.1.0.tgz#b0b4738aa7ee445c402fda9328d604a02d010588" + resolved "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-2.1.0.tgz" integrity sha512-J8NYPyBm4baYLdCbjmf1bhPu45Cr1MWTm77qd9istEkzWpnN6O9tMsEbB2JhNnBCqGENRqEWomQ+He6au0B27Q== dependencies: unist-util-is "^4.0.0" unist-util-stringify-position@^2.0.0: version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" + resolved "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz" integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== dependencies: "@types/unist" "^2.0.2" unist-util-visit-parents@^3.0.0: version "3.1.1" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz#65a6ce698f78a6b0f56aa0e88f13801886cdaef6" + resolved "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz" integrity sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg== dependencies: "@types/unist" "^2.0.0" @@ -8292,7 +8039,7 @@ unist-util-visit-parents@^3.0.0: unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist-util-visit@^2.0.2, unist-util-visit@^2.0.3: version "2.0.3" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.3.tgz#c3703893146df47203bb8a9795af47d7b971208c" + resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz" integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== dependencies: "@types/unist" "^2.0.0" @@ -8301,35 +8048,22 @@ unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist- universalify@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" 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" + resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= unquote@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + resolved "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz" 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== - update-notifier@^5.1.0: version "5.1.0" - resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" + resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz" integrity sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw== dependencies: boxen "^5.0.0" @@ -8349,19 +8083,14 @@ update-notifier@^5.1.0: uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" 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-loader@^4.1.1: version "4.1.1" - resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2" + resolved "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz" integrity sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA== dependencies: loader-utils "^2.0.0" @@ -8370,59 +8099,38 @@ url-loader@^4.1.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" + resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz" integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= dependencies: prepend-http "^2.0.0" -url-parse@^1.4.3, url-parse@^1.5.1: - version "1.5.10" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" - integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== - dependencies: - querystringify "^2.1.1" - requires-port "^1.0.0" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - use-composed-ref@^1.0.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.1.0.tgz#9220e4e94a97b7b02d7d27eaeab0b37034438bbc" + resolved "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.1.0.tgz" integrity sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg== dependencies: ts-essentials "^2.0.3" use-isomorphic-layout-effect@^1.0.0: version "1.1.1" - resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.1.tgz#7bb6589170cd2987a152042f9084f9effb75c225" + resolved "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.1.tgz" integrity sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ== use-latest@^1.0.0: version "1.2.0" - resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.0.tgz#a44f6572b8288e0972ec411bdd0840ada366f232" + resolved "https://registry.npmjs.org/use-latest/-/use-latest-1.2.0.tgz" integrity sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw== dependencies: use-isomorphic-layout-effect "^1.0.0" -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" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" 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" + resolved "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz" integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== dependencies: define-properties "^1.1.3" @@ -8432,47 +8140,42 @@ util.promisify@~1.0.0: utila@~0.4: version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + resolved "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz" integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= utility-types@^3.10.0: version "3.10.0" - resolved "https://registry.yarnpkg.com/utility-types/-/utility-types-3.10.0.tgz#ea4148f9a741015f05ed74fd615e1d20e6bed82b" + resolved "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz" integrity sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg== utils-merge@1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.3.2, uuid@^3.4.0: +uuid@^3.4.0: version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== value-equal@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" + resolved "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz" integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== vary@~1.1.2: version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= -vendors@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" - integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== - vfile-location@^3.0.0, vfile-location@^3.2.0: version "3.2.0" - resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-3.2.0.tgz#d8e41fbcbd406063669ebf6c33d56ae8721d0f3c" + resolved "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz" integrity sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA== vfile-message@^2.0.0: version "2.0.4" - resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.4.tgz#5b43b88171d409eae58477d13f23dd41d52c371a" + resolved "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz" integrity sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ== dependencies: "@types/unist" "^2.0.0" @@ -8480,7 +8183,7 @@ vfile-message@^2.0.0: vfile@^4.0.0: version "4.2.1" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.2.1.tgz#03f1dce28fc625c625bc6514350fbdb00fa9e624" + resolved "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz" integrity sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA== dependencies: "@types/unist" "^2.0.0" @@ -8488,150 +8191,149 @@ vfile@^4.0.0: unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" -wait-on@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-5.3.0.tgz#584e17d4b3fe7b46ac2b9f8e5e102c005c2776c7" - integrity sha512-DwrHrnTK+/0QFaB9a8Ol5Lna3k7WvUR4jzSKmz0YaPBpuN2sACyiPVKVfj6ejnjcajAcvn3wlbTyMIn9AZouOg== +wait-on@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/wait-on/-/wait-on-6.0.1.tgz" + integrity sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw== dependencies: - axios "^0.21.1" - joi "^17.3.0" + axios "^0.25.0" + joi "^17.6.0" lodash "^4.17.21" minimist "^1.2.5" - rxjs "^6.6.3" + rxjs "^7.5.4" -watchpack@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce" - integrity sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA== +watchpack@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz" + integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" - resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + resolved "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz" integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== dependencies: minimalistic-assert "^1.0.0" web-namespaces@^1.0.0, web-namespaces@^1.1.2: version "1.1.4" - resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec" + resolved "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz" integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw== -webpack-bundle-analyzer@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz#39898cf6200178240910d629705f0f3493f7d666" - integrity sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ== +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +webidl-conversions@^4.0.2: + 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== + +webpack-bundle-analyzer@^4.5.0: + version "4.5.0" + resolved "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.5.0.tgz" + integrity sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ== dependencies: acorn "^8.0.4" acorn-walk "^8.0.0" chalk "^4.1.0" - commander "^6.2.0" + commander "^7.2.0" gzip-size "^6.0.0" lodash "^4.17.20" opener "^1.5.2" sirv "^1.0.7" ws "^7.3.1" -webpack-dev-middleware@^3.7.2: - version "3.7.3" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz#0639372b143262e2b84ab95d3b91a7597061c2c5" - integrity sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== +webpack-dev-middleware@^5.3.1: + version "5.3.1" + resolved "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.1.tgz" + integrity sha512-81EujCKkyles2wphtdrnPg/QqegC/AtqNH//mQkBYSMqwFVCQrxM6ktB2O/SPlZy7LqeEfTbV3cZARGQz6umhg== dependencies: - memory-fs "^0.4.1" - mime "^2.4.4" - mkdirp "^0.5.1" + colorette "^2.0.10" + memfs "^3.4.1" + mime-types "^2.1.31" range-parser "^1.2.1" - webpack-log "^2.0.0" - -webpack-dev-server@^3.11.2: - version "3.11.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz#695ebced76a4929f0d5de7fd73fafe185fe33708" - integrity sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ== - dependencies: - ansi-html "0.0.7" - bonjour "^3.5.0" - chokidar "^2.1.8" + schema-utils "^4.0.0" + +webpack-dev-server@^4.7.4: + version "4.8.1" + resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.8.1.tgz" + integrity sha512-dwld70gkgNJa33czmcj/PlKY/nOy/BimbrgZRaR9vDATBQAYgLzggR0nxDtPLJiLrMgZwbE6RRfJ5vnBBasTyg== + dependencies: + "@types/bonjour" "^3.5.9" + "@types/connect-history-api-fallback" "^1.3.5" + "@types/express" "^4.17.13" + "@types/serve-index" "^1.9.1" + "@types/sockjs" "^0.3.33" + "@types/ws" "^8.5.1" + ansi-html-community "^0.0.8" + bonjour-service "^1.0.11" + chokidar "^3.5.3" + colorette "^2.0.10" compression "^1.7.4" connect-history-api-fallback "^1.6.0" - debug "^4.1.1" - del "^4.1.1" - express "^4.17.1" - html-entities "^1.3.1" - http-proxy-middleware "0.19.1" - import-local "^2.0.0" - internal-ip "^4.3.0" - ip "^1.1.5" - is-absolute-url "^3.0.3" - killable "^1.0.1" - loglevel "^1.6.8" - opn "^5.5.0" - p-retry "^3.0.1" - portfinder "^1.0.26" - schema-utils "^1.0.0" - selfsigned "^1.10.8" - semver "^6.3.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.3.2" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.0.1" + open "^8.0.9" + p-retry "^4.5.0" + portfinder "^1.0.28" + rimraf "^3.0.2" + schema-utils "^4.0.0" + selfsigned "^2.0.1" serve-index "^1.9.1" sockjs "^0.3.21" - sockjs-client "^1.5.0" spdy "^4.0.2" - strip-ansi "^3.0.1" - supports-color "^6.1.0" - url "^0.11.0" - webpack-dev-middleware "^3.7.2" - webpack-log "^2.0.0" - ws "^6.2.1" - yargs "^13.3.2" - -webpack-log@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" - integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - dependencies: - ansi-colors "^3.0.0" - uuid "^3.3.2" + webpack-dev-middleware "^5.3.1" + ws "^8.4.2" webpack-merge@^5.8.0: version "5.8.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" + resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz" integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== dependencies: clone-deep "^4.0.1" wildcard "^2.0.0" -webpack-sources@^1.1.0, webpack-sources@^1.4.3: +webpack-sources@^1.4.3: version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz" integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== dependencies: source-list-map "^2.0.0" source-map "~0.6.1" -webpack-sources@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.0.tgz#b16973bcf844ebcdb3afde32eda1c04d0b90f89d" - integrity sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw== +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.40.0: - version "5.47.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.47.1.tgz#20fb7d76f68912a2249a6dd7ff16faa178049ad2" - integrity sha512-cW+Mzy9SCDapFV4OrkHuP6EFV2mAsiQd+gOa3PKtHNoKg6qPqQXZzBlHH+CnQG1osplBCqwsJZ8CfGO6XWah0g== +webpack@^5.70.0: + version "5.72.0" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.72.0.tgz" + integrity sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w== dependencies: - "@types/eslint-scope" "^3.7.0" - "@types/estree" "^0.0.50" + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^0.0.51" "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/wasm-edit" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" acorn "^8.4.1" + acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.8.0" - es-module-lexer "^0.7.1" + enhanced-resolve "^5.9.2" + es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" - graceful-fs "^4.2.4" + graceful-fs "^4.2.9" json-parse-better-errors "^1.0.2" loader-runner "^4.2.0" mime-types "^2.1.27" @@ -8639,26 +8341,22 @@ webpack@^5.40.0: schema-utils "^3.1.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.3" - watchpack "^2.2.0" - webpack-sources "^3.1.1" + watchpack "^2.3.1" + webpack-sources "^3.2.3" -webpackbar@^5.0.0-3: - version "5.0.0-3" - resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-5.0.0-3.tgz#f4f96c8fb13001b2bb1348252db4c980ab93aaac" - integrity sha512-viW6KCYjMb0NPoDrw2jAmLXU2dEOhRrtku28KmOfeE1vxbfwCYuTbTaMhnkrCZLFAFyY9Q49Z/jzYO80Dw5b8g== +webpackbar@^5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz" + integrity sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ== dependencies: - ansi-escapes "^4.3.1" chalk "^4.1.0" - consola "^2.15.0" - figures "^3.2.0" + consola "^2.15.3" pretty-time "^1.1.0" - std-env "^2.2.1" - text-table "^0.2.0" - wrap-ansi "^7.0.0" + std-env "^3.0.1" websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" - resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== dependencies: http-parser-js ">=0.5.1" @@ -8667,12 +8365,29 @@ websocket-driver@>=0.5.1, websocket-driver@^0.7.4: websocket-extensions@>=0.1.1: version "0.1.4" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + resolved "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz" + 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" + resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz" integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== dependencies: is-bigint "^1.0.1" @@ -8681,70 +8396,65 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@^1.2.9, which@^1.3.1: +which@^1.3.1: version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" 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" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" widest-line@^3.1.0: version "3.1.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== dependencies: string-width "^4.0.0" +widest-line@^4.0.1: + version "4.0.1" + resolved "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz" + integrity sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig== + dependencies: + string-width "^5.0.1" + wildcard@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + resolved "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== -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" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.0.1: + version "8.0.1" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz" + integrity sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^3.0.0: version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== dependencies: imurmurhash "^0.1.4" @@ -8752,80 +8462,49 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -ws@^6.2.1: - version "6.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" - integrity sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw== - dependencies: - async-limiter "~1.0.0" - ws@^7.3.1: version "7.5.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz" integrity sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw== +ws@^8.4.2: + version "8.6.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.6.0.tgz" + integrity sha512-AzmM3aH3gk0aX7/rZLYvjdvZooofDu3fFOzGqcSnQ1tOcTWwhM/o+q++E8mAyVVIyUdajrkzWUGftaVSDLn1bw== + xdg-basedir@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" + resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== xml-js@^1.6.11: version "1.6.11" - resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" + resolved "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz" integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g== dependencies: sax "^1.2.4" xtend@^4.0.0, xtend@^4.0.1: version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0, yaml@^1.10.2: +yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: version "1.10.2" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs@^13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zwitch@^1.0.0: version "1.0.5" - resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.5.tgz#d11d7381ffed16b742f6af7b3f223d5cd9fe9920" + resolved "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz" integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw== From d79ed2e082ccf1762d23f92e1b25558ab1a044ae Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Tue, 3 May 2022 10:36:44 +0200 Subject: [PATCH 28/50] WS server example --- .../es/weso/rdfshape/server/Server.scala | 25 ++++-- .../routes/schema/service/SchemaService.scala | 78 +++++++++++++++++-- 2 files changed, 91 insertions(+), 12 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala index 820677f5..8790f8be 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/Server.scala @@ -120,7 +120,7 @@ private class Server( /* WebSocketBuilder was deprecated and must be obtained here, from the * server builder */ .withHttpWebSocketApp((wsBuilder: WebSocketBuilder[IO]) => - createApp(client) + createApp(client, wsBuilder) ) sslContext match { @@ -132,12 +132,17 @@ private class Server( /** Create an http4s application object * * @param client Http4s' client in charge of the application + * @param wsBuilder WebSocket builder to allow the underlying services + * to establish websocket connections * @return Http4s' application with the given client and a request-logging middleware * @note All application services are mounted behind the "api/" prefix */ - private def createApp(client: Client[IO]): HttpApp[IO] = { + private def createApp( + client: Client[IO], + wsBuilder: WebSocketBuilder[IO] + ): HttpApp[IO] = { // Mount all routes behind "api/" - val app = Router(`api` -> routesService(client)).orNotFound + val app = Router(`api` -> routesService(client, wsBuilder)).orNotFound // Http4s logger middleware settings Logger.httpApp(logHeaders = true, logBody = false)(app) } @@ -201,16 +206,22 @@ object Server { /** Application's global service composed of all routes and CORS configuration */ - private def routesService(client: Client[IO]): HttpRoutes[IO] = { - corsConfiguration.apply(allRoutes(client)) + private def routesService( + client: Client[IO], + wsBuilder: WebSocketBuilder[IO] + ): HttpRoutes[IO] = { + corsConfiguration.apply(allRoutes(client, wsBuilder)) } /** All Rho route functions composed into one with swagger middleware */ - private def allRoutes(client: Client[IO]): HttpRoutes[IO] = + private def allRoutes( + client: Client[IO], + wsBuilder: WebSocketBuilder[IO] + ): HttpRoutes[IO] = (BaseService(client).routes and DataService(client).routes and - SchemaService(client).routes and + SchemaService(client, wsBuilder).routes and ShapeMapService(client).routes and WikibaseService(client).routes and PermalinkService(client).routes and diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 6498e070..c862a85c 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -1,6 +1,7 @@ package es.weso.rdfshape.server.api.routes.schema.service import cats.effect._ +import cats.effect.std.Queue import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.definitions.ApiDefinitions import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.{ @@ -31,21 +32,39 @@ import es.weso.schema.{ } import io.circe.Json import io.circe.syntax.EncoderOps +import fs2._ import org.http4s.circe._ import org.http4s.client.Client import org.http4s.dsl.Http4sDsl import org.http4s.rho.RhoRoutes import org.http4s.rho.swagger.syntax.io._ +import org.http4s.server.websocket.WebSocketBuilder +import org.http4s.websocket.WebSocketFrame + +import scala.language.postfixOps /** API service to handle schema-related operations * - * @param client HTTP4S client object + * @param client HTTP4S client object + * @param wsBuilder Builder to operate WebSocket connections on this + * service */ -class SchemaService(client: Client[IO]) +class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) extends Http4sDsl[IO] with ApiService with LazyLogging { + /** Final WebSockets connection builder used in this service. + * Privately customize the WebSocket builder's ([[wsBuilder]]) responses + * on certain events + */ + private lazy val webSocketsBuilder = wsBuilder + .withOnNonWebSocketRequest( + BadRequest(SchemaServiceError.nonWebSocketRequestError) + ) + .withOnHandshakeFailure( + InternalServerError(SchemaServiceError.nonWebSocketHandshakeError) + ) override val verb: String = "schema" /** Describe the API routes handled by this service and the actions performed on each of them @@ -143,6 +162,45 @@ class SchemaService(client: Client[IO]) .flatMap(result => Ok(result.asJson)) .handleErrorWith(err => InternalServerError(err.getMessage)) } + + "WebSockets endpoint meant for streaming validations" ** + GET / `verb` / "ws" |>> { + /* Stream validations are done via WebSockets. The basic flow goes as + * follows: + * 1. The client starts a WebSocket connection. + * 2. The client sends a message to the server, saying that it wants the + * server to validate some data and passing that data to the server. + * 3. The server starts validating and returns the output validation + * stream as WebSocket messages. + * -------------------------------------------------------------------- + * Note that, to do this, we must connect the input and the output + * WebSocket messages (the server needs the information from the client + * message to start generating output messages). + * + * Therefore, we use a Queue scoped to each request, as follows: + * 1. Each client incoming message in enqueued. + * 2. The server dequeues the message in search for instructions to + * validate data: + * 2.1 If not found, an error response is returned + * 2.2 If found, the server starts to validate the data as requested + * (interrupting the current validation, if any) */ + + /* Inspired by the examples in: + * https://github.com/http4s/http4s/blob/756c8940ca0161e940b691adc5ea59060d444417/examples/blaze/src/main/scala/com/example/http4s/blaze/BlazeWebSocketExample.scala */ + Queue + .unbounded[IO, Option[WebSocketFrame]] + .flatMap { queue => + // Stream of messages from the server to the client + val toClient: Stream[IO, WebSocketFrame] = + Stream.fromQueueNoneTerminated(queue) + /* Pipe for processing the stream of messages from the client to the + * server */ + val fromClient: Pipe[IO, WebSocketFrame, Unit] = + _.enqueueNoneTerminated(queue) + + webSocketsBuilder.build(toClient, fromClient) + } + } } } @@ -151,11 +209,15 @@ object SchemaService { /** Service factory * - * @param client Underlying http4s client + * @param client Underlying http4s client + * @param wsBuilder Underlying webSockets builder * @return A new Schema Service */ - def apply(client: Client[IO]): SchemaService = - new SchemaService(client) + def apply( + client: Client[IO], + wsBuilder: WebSocketBuilder[IO] + ): SchemaService = + new SchemaService(client, wsBuilder) } /** Compendium of additional text constants used on service errors @@ -163,6 +225,12 @@ object SchemaService { private object SchemaServiceError { val couldNotValidateData = "Unknown error validating the data provided. Check the inputs." + + val nonWebSocketRequestError = + "A request was received but it was not a valid WebSocket request." + + val nonWebSocketHandshakeError = + "An error occurred during the WebSockets handshake process." } /** Compendium of additional text constants used to describe inline parameters From de8e9c0f5b089fd355a4d006e272a7ee93594f45 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Tue, 3 May 2022 17:22:49 +0200 Subject: [PATCH 29/50] Prepared params and decoders for future functionality --- .../rdfshape/server/api/format/Format.scala | 36 +++++- .../data/logic/aux/InferenceCodecs.scala | 2 +- .../schema/logic/trigger/TriggerMode.scala | 32 +++++ .../routes/schema/service/SchemaService.scala | 41 ++++++- .../stream/SchemaValidateStreamInput.scala | 31 +++++ .../StreamValidationConfiguration.scala | 68 +++++++++++ ...reamValidationExtractorConfiguration.scala | 111 ++++++++++++++++++ .../StreamValidationStreamConfiguration.scala | 66 +++++++++++ ...reamValidationValidatorConfiguration.scala | 102 ++++++++++++++++ .../IncomingRequestParameters.scala | 107 +++++++++++++++++ .../rdfshape/server/utils/other/package.scala | 4 +- 11 files changed, 594 insertions(+), 6 deletions(-) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/SchemaValidateStreamInput.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala index aafc14f4..c4c72dc8 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/format/Format.scala @@ -1,11 +1,13 @@ package es.weso.rdfshape.server.api.format import cats.effect.IO +import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging -import es.weso.rdfshape.server.api.format.dataFormats.DataFormat +import es.weso.rdfshape.server.api.format.dataFormats._ import es.weso.rdfshape.server.api.utils.parameters.PartsMap import io.circe.{Decoder, Encoder, HCursor, Json} import org.http4s.MediaType +import org.ragna.comet.data.{DataFormat => DataFormatComet} /** Generic interface for any format any data transmitted to/from the API may have */ @@ -46,6 +48,33 @@ object Format extends FormatCompanion[Format] { */ trait FormatCompanion[F <: Format] extends LazyLogging { + implicit class FormatOps(format: Format) { + + /** Given an RDFShape-domain data format, attempt to convert it to a data format + * used in the streaming validation library + * + * @return The equivalent of the input format in the stream-validation + * library, if available + */ + def toStreamingDataFormat: Either[String, DataFormatComet] = + format match { + case rdfFormat: RdfFormat => + rdfFormat match { + case Turtle => DataFormatComet.TURTLE.asRight + case NTriples => DataFormatComet.NTRIPLES.asRight + case Trig => DataFormatComet.TRIG.asRight + case JsonLd => DataFormatComet.JSONLD.asRight + case RdfXml => DataFormatComet.RDFXML.asRight + case RdfJson => DataFormatComet.RDFJSON.asRight + case _ => + Left( + s"Data format '${format.name}' is not supported for stream validations" + ) + } + + } + } + /** Default format to be used when none specified */ val default: F @@ -79,6 +108,11 @@ trait FormatCompanion[F <: Format] extends LazyLogging { format = fromString(formatStr) } yield format + /** Simplified version of the standard decoder, ignoring the produced errors + * and returning an option + */ + implicit val decoderOption: Decoder[Option[F]] = decoder.map(_.toOption) + /** Try to build a Format object from a request's parameters * * @param parameter Name of the parameter with the format name diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/aux/InferenceCodecs.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/aux/InferenceCodecs.scala index eadeac37..aca07cf6 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/aux/InferenceCodecs.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/data/logic/aux/InferenceCodecs.scala @@ -8,7 +8,7 @@ import io.circe.{Decoder, Encoder, HCursor, Json} /** Implicit encoders and decoders for [[es.weso.rdf.InferenceEngine]] instances, * used when encoding and decoding [[Data]] instances */ -private[data] object InferenceCodecs { +private[api] object InferenceCodecs { /** Auxiliary encoder for data inference. */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 8b247cdf..34afa387 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -2,12 +2,20 @@ package es.weso.rdfshape.server.api.routes.schema.logic.trigger import cats.implicits.catsSyntaxEitherId import com.typesafe.scalalogging.LazyLogging +import es.weso.rdfshape.server.api.format.dataFormats.Compact import es.weso.rdfshape.server.api.routes.data.logic.types.Data +import es.weso.rdfshape.server.api.routes.schema.logic.trigger import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerModeType._ import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.TypeParameter import es.weso.schema.ValidationTrigger import io.circe.{Decoder, DecodingFailure, Encoder, HCursor} +import org.ragna.comet.trigger.{ + ShapeMapFormat => ShapeMapFormatComet, + TriggerShapeMap => TriggerShapeMapComet, + TriggerTargetDeclarations => TriggerTargetDeclarationsComet, + ValidationTrigger => TriggerModeComet +} import scala.language.implicitConversions @@ -90,6 +98,30 @@ private[schema] trait TriggerModeCompanion[T <: TriggerMode] schema: Option[Schema] ): Decoder[Either[String, T]] + implicit class TriggerModeOps(triggerMode: TriggerMode) { + + /** Given an RDFShape-domain trigger, attempt to convert it to a trigger + * used in the streaming validation library + * + * @return The equivalent of the input trigger mode in the stream-validation + * library, if available + */ + def toStreamingTriggerMode: TriggerModeComet = { + triggerMode match { + case trigger.TriggerShapeMap(shapeMap, _, _) => + TriggerShapeMapComet( + shapeMap.raw, + shapeMap.format match { + case Compact => ShapeMapFormatComet.COMPACT + case _ => ShapeMapFormatComet.JSON + } + ) + case trigger.TriggerTargetDeclarations(_, _) => + TriggerTargetDeclarationsComet() + } + } + } + /** Encoder used to transform [[TriggerMode]] instances to JSON values */ implicit val encode: Encoder[T] diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index c862a85c..1fd2a922 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -164,7 +164,7 @@ class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) } "WebSockets endpoint meant for streaming validations" ** - GET / `verb` / "ws" |>> { + GET / `verb` / "validate" / "stream" |>> { /* Stream validations are done via WebSockets. The basic flow goes as * follows: * 1. The client starts a WebSocket connection. @@ -192,7 +192,44 @@ class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) .flatMap { queue => // Stream of messages from the server to the client val toClient: Stream[IO, WebSocketFrame] = - Stream.fromQueueNoneTerminated(queue) + Stream + .fromQueueNoneTerminated(queue) + // Force an error + .evalMap(_ => + IO.raiseError(new RuntimeException("Testing errors")) + ) + // Handle the error emitting an informational frame and + // a final closing frame + /* Beware of close codes: + * https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters */ + .handleErrorWith(error => { + Stream.evals { + val closingFrames: Seq[WebSocketFrame] = Seq( + // Informational frame + WebSocketFrame + .Text(s"An error occurred: ${error.getMessage}"), + /* Closing frame, if it fails to be created, resort to an + * empty one */ + WebSocketFrame + .Close(1000, s"Reason: ${error.getMessage}") + .getOrElse(WebSocketFrame.Close()) + ) + IO(closingFrames) + } + }) + /* Mapping [WebSocketFrame => JSON]: conversion that checks we + * received text and parses it to a JSON object. */ + /* Mapping [JSON => SchemaValidateStreamInput]: conversion that + * extracts all needed data from that JSON, using available decoders */ + /* Pipe[IO, SchemaValidateStreamInput, comet.ValidationResult]: + * pipe that creates the comet validation stream from the info and + * invokes it */ + /* Mapping [comet.ValidationResult => WebSocketFrame]: conversion + * that converts comet results to WebSocketFrames with JSON text + * that are be sent back to the client */ + /* Remember to catch all possible errors (decoding, halting, etc.) + * using FS2's API */ + /* Pipe for processing the stream of messages from the client to the * server */ val fromClient: Pipe[IO, WebSocketFrame, Unit] = diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/SchemaValidateStreamInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/SchemaValidateStreamInput.scala new file mode 100644 index 00000000..0ba14935 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/SchemaValidateStreamInput.scala @@ -0,0 +1,31 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations.stream + +import es.weso.rdfshape.server.api.ServiceRouteOperation +import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration.StreamValidationConfiguration +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ +import io.circe.{Decoder, HCursor} + +/** Data class representing the inputs required when querying the server + * for a schema validation of a stream of data using Comet + * + * @param configuration Configuration object with all settings needed by Comet + * to fetch and validate a stream of data + */ +case class SchemaValidateStreamInput( + configuration: StreamValidationConfiguration +) + +object SchemaValidateStreamInput + extends ServiceRouteOperation[SchemaValidateStreamInput] { + + override implicit val decoder: Decoder[SchemaValidateStreamInput] = + (cursor: HCursor) => { + for { + // Decode all of the validation settings to a domain object, + // relying on the decoders of each underlying configuration class + validationConfig <- cursor + .downField(ConfigurationParameter.name) + .as[StreamValidationConfiguration] + } yield SchemaValidateStreamInput(validationConfig) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala new file mode 100644 index 00000000..00f977bb --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala @@ -0,0 +1,68 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration + +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + ExtractorParameter, + StreamParameter, + ValidatorParameter +} +import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult +import io.circe.{Decoder, HCursor} + +/** Broad configuration class containing all the child configurations required to + * perform a Stream validation with Comet + * + * @param validatorConfiguration Configuration used by the eventual validator + * @param extractorConfiguration Configuration used by the eventual extractor + * @param streamConfiguration Configuration used to fetch the input data stream + */ +sealed case class StreamValidationConfiguration( + validatorConfiguration: StreamValidationValidatorConfiguration, + extractorConfiguration: StreamValidationExtractorConfiguration, + streamConfiguration: StreamValidationStreamConfiguration +) + +object StreamValidationConfiguration { + + /** Custom decoder fetching the correct parameter names in the incoming + * JSON documents + */ + implicit val decoder: Decoder[StreamValidationConfiguration] = + (cursor: HCursor) => { + val decodeResult = for { + validatorConfig <- cursor + .downField(ValidatorParameter.name) + .as[Either[String, StreamValidationValidatorConfiguration]] + + extractorConfig <- cursor + .downField(ExtractorParameter.name) + .as[Either[String, StreamValidationExtractorConfiguration]] + + streamConfig <- cursor + .downField(StreamParameter.name) + .as[Either[String, StreamValidationStreamConfiguration]] + + // Cumulative eithers + configItems = for { + vc <- validatorConfig + ec <- extractorConfig + sc <- streamConfig + } yield (vc, ec, sc) + + } yield configItems.map { + case (validatorConfig, extractorConfig, streamConfig) => + StreamValidationConfiguration( + validatorConfig, + extractorConfig, + streamConfig + ) + } + + // Map any error to a DecodingFailure in the final step of decoding + mapEitherToDecodeResult(decodeResult) + } + + /** Generic error message used as placeholder when no error cause is available + */ + private[configuration] val unknownErrorMessage: String = + "Unknown error creating the configuration for stream validation" +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala new file mode 100644 index 00000000..ce9d8520 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala @@ -0,0 +1,111 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration + +import cats.implicits.toBifunctorOps +import es.weso.rdf.InferenceEngine +import es.weso.rdfshape.server.api.format.Format.FormatOps +import es.weso.rdfshape.server.api.format.dataFormats.{DataFormat, RdfFormat} +import es.weso.rdfshape.server.api.routes.data.logic.aux.InferenceCodecs.decodeInference +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + ConcurrentItemsParameter, + DataParameter, + FormatParameter, + InferenceParameter +} +import io.circe.{Decoder, HCursor} +import org.ragna.comet.data.{DataFormat => DataFormatComet} +import org.ragna.comet.stream.extractors.StreamExtractor + +import scala.concurrent.duration._ +import scala.util.Try + +/** Minor configuration class, containing the information required for a + * Comet extractor to run + * + * Everything but the data format is optional or has a default value + * + * Timeout is interpreted in milliseconds + * + * @see [[StreamExtractor]] + */ +final case class StreamValidationExtractorConfiguration( + dataFormat: DataFormat, + dataInference: Option[InferenceEngine], + concurrentItems: Option[Int], + timeout: Option[FiniteDuration] +) { + // Pre-requisites: + // 1. The data format supplied is available in the streaming library + private lazy val maybeCometDataFormat = dataFormat.toStreamingDataFormat + assume( + maybeCometDataFormat.isRight, + maybeCometDataFormat.left.getOrElse( + StreamValidationConfiguration.unknownErrorMessage + ) + ) + + /** Make the final data format used by the streaming library publicly available, + * now that its safe to access it + */ + val cometDataFormat: DataFormatComet = maybeCometDataFormat.toOption.get +} + +object StreamValidationExtractorConfiguration { + + /** Custom decoder fetching the correct parameter names in the incoming + * JSON documents + * + * Interprets the incoming timeout value as a number of milliseconds + */ + implicit val decoder + : Decoder[Either[String, StreamValidationExtractorConfiguration]] = + (cursor: HCursor) => { + val configInfo = for { + maybeDataFormat <- cursor + .downField(DataParameter.name) + .downField(FormatParameter.name) + .as[Either[String, RdfFormat]] + + optInference <- cursor + .downField(DataParameter.name) + .downField(InferenceParameter.name) + .as[Option[InferenceEngine]] + + optConcurrentItems <- cursor + .downField(ConcurrentItemsParameter.name) + .as[Option[Int]] + + optTimeoutMillis <- cursor + .downField(ConcurrentItemsParameter.name) + .as[Option[Long]] + } yield ( + maybeDataFormat, + optInference, + optConcurrentItems, + optTimeoutMillis + ) + + configInfo.map { + /* Destructure and try to build the object, catch the exception as error + * message if needed */ + case ( + maybeDataFormat, + optInference, + optConcurrentItems, + optTimeoutMillis + ) => + for { + dataFormat <- maybeDataFormat + finalConfig <- Try { + StreamValidationExtractorConfiguration( + dataFormat, + optInference, + optConcurrentItems, + optTimeoutMillis.map(FiniteDuration(_, MILLISECONDS)) + ) + }.toEither.leftMap(err => + s"Could not build the extractor configuration from user data:\n ${err.getMessage}" + ) + } yield finalConfig + } + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala new file mode 100644 index 00000000..dea0dfe1 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala @@ -0,0 +1,66 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration + +import cats.implicits.toBifunctorOps +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + GroupIdParameter, + PortParameter, + ServerParameter, + TopicParameter +} +import io.circe.{Decoder, HCursor} +import org.ragna.comet.stream.extractors.kafka.{ + KafkaExtractor, + KafkaExtractorConfiguration +} + +import scala.util.Try + +/** Minor configuration class, containing the information required for a + * Comet Kafka extractor to fetch an incoming stream + * + * Everything but the server and topic is optional or has a default value + * + * @see [[KafkaExtractor]] + * @see [[KafkaExtractorConfiguration]] + */ +final case class StreamValidationStreamConfiguration( + server: String, + port: Option[Int], + topic: String, + groupId: Option[String] +) { + // Pre-requisites: None +} + +object StreamValidationStreamConfiguration { + + /** Custom decoder fetching the correct parameter names in the incoming + * JSON documents + */ + implicit val decoder + : Decoder[Either[String, StreamValidationStreamConfiguration]] = + (cursor: HCursor) => + for { + server <- cursor + .downField(ServerParameter.name) + .as[String] + + optPort <- cursor + .downField(PortParameter.name) + .as[Option[Int]] + + topic <- cursor + .downField(TopicParameter.name) + .as[String] + + groupId <- cursor + .downField(GroupIdParameter.name) + .as[Option[String]] + } yield { + Try { + StreamValidationStreamConfiguration(server, optPort, topic, groupId) + }.toEither.leftMap(err => + s"Could not build the stream configuration from user data:\n ${err.getMessage}" + ) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala new file mode 100644 index 00000000..3f62f50e --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala @@ -0,0 +1,102 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration + +import cats.effect.unsafe.implicits.global +import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerMode +import es.weso.rdfshape.server.api.routes.schema.logic.types.Schema +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ +import es.weso.schema.{Schema => SchemaW} +import io.circe.{Decoder, HCursor} +import org.ragna.comet.trigger.{ValidationTrigger => ValidationTriggerComet} +import org.ragna.comet.validation.Validator +import org.ragna.comet.validation.configuration.ValidatorConfiguration + +/** Minor configuration class, containing the information required for a + * Comet validator to run + * + * The conversion from RDFShape Schemas ([[Schema]]) to SHAclEX schemas + * ([[SchemaW]]) is attempted whilst decoding the configuration instances + * from client data, the same goes for ValidationTriggers + * + * @see [[Validator]] + * @see [[ValidatorConfiguration]] + */ +final case class StreamValidationValidatorConfiguration( + schema: SchemaW, + trigger: ValidationTriggerComet, + haltOnInvalid: Option[Boolean], + haltOnErrored: Option[Boolean], + concurrentItems: Option[Int] +) { + // Pre-requisites: + + // 1. A SHAclEX can be built from the Schema model formed from user data + +} + +object StreamValidationValidatorConfiguration { + + /** Custom decoder fetching the correct parameter names in the incoming + * JSON documents + * + * Interprets the incoming timeout value as a number of milliseconds + */ + implicit val decoder + : Decoder[Either[String, StreamValidationValidatorConfiguration]] = + (cursor: HCursor) => { + val configInfo = for { + maybeSchema <- cursor + .downField(SchemaParameter.name) + .as[Either[String, Schema]] + + maybeTriggerMode <- cursor + .downField(TriggerModeParameter.name) + .as[Either[String, TriggerMode]]( + TriggerMode.decode(None, maybeSchema.toOption) + ) + + optHaltInvalid <- cursor + .downField(HaltOnInvalidParameter.name) + .as[Option[Boolean]] + + optHaltErrored <- cursor + .downField(HaltOnErroredParameter.name) + .as[Option[Boolean]] + + optConcurrentItems <- cursor + .downField(ConcurrentItemsParameter.name) + .as[Option[Int]] + + } yield ( + maybeSchema, + maybeTriggerMode, + optHaltInvalid, + optHaltErrored, + optConcurrentItems + ) + + configInfo.map { + case ( + maybeSchema, + maybeTriggerMode, + optHaltInvalid, + optHaltErrored, + optConcurrentItems + ) => + for { + rdfShapeSchema <- maybeSchema + rdfShapeTrigger <- maybeTriggerMode + // Form final schema trigger used in the stream validation + // Unsafe run due to SHAclEX API limitations + cometSchema <- rdfShapeSchema.getSchema.unsafeRunSync() + // Form final validation trigger used in the stream validation + cometTrigger = rdfShapeTrigger.toStreamingTriggerMode + } yield StreamValidationValidatorConfiguration( + cometSchema, + cometTrigger, + optHaltInvalid, + optHaltErrored, + optConcurrentItems + ) + } + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala index 88931e30..01800a46 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala @@ -52,6 +52,22 @@ object IncomingRequestParameters { lazy val shapeMapSource = "shapeMapSource" lazy val querySource = "querySource" + lazy val configuration = "configuration" + + lazy val validator = "validator" + lazy val haltOnInvalid = "haltOnInvalid" + lazy val haltOnErrored = "haltOnErrored" + lazy val concurrentItems = "concurrentItems" + + lazy val extractor = "extractor" + lazy val timeout = "timeout" + + lazy val stream = "stream" + lazy val server = "server" + lazy val port = "port" + lazy val topic = "topic" + lazy val groupId = "groupId" + lazy val wdEntity = "wdEntity" lazy val wdSchema = "wdSchema" @@ -378,4 +394,95 @@ object IncomingRequestParameters { val name: String = continue } + /** Parameter expected to contain a nested configuration object + */ + object ConfigurationParameter + extends OptionalQueryParamDecoderMatcher[String](configuration) { + val name: String = configuration + } + + /** Parameter expected to contain a validator information in stream validations + */ + object ValidatorParameter + extends OptionalQueryParamDecoderMatcher[String](validator) { + val name: String = validator + } + + /** Parameter expected to contain whether if stream validations should halt + * when an item turns out invalid + */ + object HaltOnInvalidParameter + extends OptionalQueryParamDecoderMatcher[Boolean](haltOnInvalid) { + val name: String = haltOnInvalid + } + + /** Parameter expected to contain whether if stream validations should halt + * when an error occurs during item validation + */ + object HaltOnErroredParameter + extends OptionalQueryParamDecoderMatcher[Boolean](haltOnErrored) { + val name: String = haltOnErrored + } + + /** Parameter expected to contain how many items should be processed in parallel + * in stream validations + */ + object ConcurrentItemsParameter + extends OptionalQueryParamDecoderMatcher[Int](concurrentItems) { + val name: String = concurrentItems + } + + /** Parameter expected to contain a extractor information in stream validations + */ + object ExtractorParameter + extends OptionalQueryParamDecoderMatcher[String](extractor) { + val name: String = extractor + } + + /** Parameter expected to contain a numeric amount of time expressing a timeout + */ + object TimeoutParameter + extends OptionalQueryParamDecoderMatcher[String](extractor) { + val name: String = extractor + } + + /** Parameter expected to contain the input stream information in stream validations + */ + object StreamParameter + extends OptionalQueryParamDecoderMatcher[String](stream) { + val name: String = stream + } + + /** Parameter expected to contain a server address/hostname + */ + object ServerParameter + extends OptionalQueryParamDecoderMatcher[String](server) { + val name: String = server + } + + /** Parameter expected to contain a server port + */ + object PortParameter extends OptionalQueryParamDecoderMatcher[Int](port) { + val name: String = port + } + + /** Parameter expected to contain a certain topic + * + * In stream validations, defines the topic in which data is expected to come + * from + */ + object TopicParameter extends OptionalQueryParamDecoderMatcher[Int](topic) { + val name: String = topic + } + + /** Parameter expected to contain a certain group identifier + * + * In stream validations, defines the group in which data is expected to be + * consumed + */ + object GroupIdParameter + extends OptionalQueryParamDecoderMatcher[Int](groupId) { + val name: String = groupId + } + } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala index 233224d9..29156926 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/other/package.scala @@ -19,9 +19,9 @@ package object other { def mapEitherToDecodeResult[L, R]( input: Either[DecodingFailure, Either[L, R]] ): Either[DecodingFailure, R] = { - input.map { + input.flatMap { case Left(err) => DecodingFailure(err.toString, Nil).asLeft case Right(value) => value.asRight - }.flatten + } } } From 05c3182397c21c3e3aa8bf84c6cb4285ff287a93 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Wed, 4 May 2022 18:09:53 +0200 Subject: [PATCH 30/50] Untested code for stream validations --- build.sbt | 2 +- .../CometTransformations.scala | 150 ++++++++++++ .../ValidationResultTransformations.scala | 30 +++ .../WebSocketTransformations.scala | 36 +++ .../schema/logic/trigger/TriggerMode.scala | 16 +- .../routes/schema/logic/types/Schema.scala | 20 +- .../routes/schema/service/SchemaService.scala | 224 ++++++++++++++---- .../StreamValidationConfiguration.scala | 17 +- ...reamValidationExtractorConfiguration.scala | 20 +- .../StreamValidationStreamConfiguration.scala | 4 +- ...reamValidationValidatorConfiguration.scala | 7 +- .../api/routes/shapemap/logic/ShapeMap.scala | 7 +- .../UnexpectedWebSocketFrameException.scala | 35 +++ version.sbt | 2 +- 14 files changed, 487 insertions(+), 83 deletions(-) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/CometTransformations.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/WebSocketTransformations.scala create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/UnexpectedWebSocketFrameException.scala diff --git a/build.sbt b/build.sbt index f40c916d..f2f6f82b 100644 --- a/build.sbt +++ b/build.sbt @@ -289,7 +289,7 @@ lazy val MUnitFramework = new TestFramework("munit.Framework") lazy val http4sVersion = "1.0.0-M30" lazy val rhoVersion = "0.23.0-M1" lazy val catsVersion = "2.7.0" -lazy val cometVersion = "0.1.1" +lazy val cometVersion = "0.1.5" /* ------------------------------------------------------------------------- */ lazy val mongodbVersion = "4.6.0" lazy val mongo4catsVersion = "0.4.7" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/CometTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/CometTransformations.scala new file mode 100644 index 00000000..eca6ec2a --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/CometTransformations.scala @@ -0,0 +1,150 @@ +package es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations + +import cats.effect.IO +import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.SchemaValidateStreamInput +import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration.{ + StreamValidationExtractorConfiguration, + StreamValidationStreamConfiguration, + StreamValidationValidatorConfiguration +} +import fs2.Pipe +import org.ragna.comet.exception.stream.timed.StreamTimeoutException +import org.ragna.comet.implicits.RDFElementImplicits._ +import org.ragna.comet.stream.extractors.StreamExtractor +import org.ragna.comet.stream.extractors.StreamExtractor.{ + Defaults => ExtractorDefaults +} +import org.ragna.comet.stream.extractors.kafka.KafkaExtractorConfiguration.{ + Defaults => KafkaExtractorDefaults +} +import org.ragna.comet.stream.extractors.kafka.{ + KafkaExtractor, + KafkaExtractorConfiguration +} +import org.ragna.comet.validation.Validator +import org.ragna.comet.validation.configuration.ValidatorConfiguration +import org.ragna.comet.validation.configuration.ValidatorConfiguration.{ + Defaults => ValidatorDefaults +} +import org.ragna.comet.validation.result.ValidationResult + +import scala.concurrent.duration._ +import scala.language.postfixOps + +/** Object containing additional utilities to get a comet validation + * stream running from client data + * + * @note Some things are taken for granted for this demo/WIP: + * - The webserver is meant to receive data from Kafka streams, + * thus a [[KafkaExtractor]] will be used + * - The incoming Kafka Stream will have its keys ignored and is + * expected to transmit RDF data serialized as raw strings + * @note A timeout is enforced so that the validation stream is + * halted when no items are received (even if the client does not disconnect), + * thus server resources are not wasted + */ +private[schema] object CometTransformations { + + /** Time that the server will wait without receiving any items for the input + * stream before raising a [[StreamTimeoutException]] + */ + private lazy val timeout = 1.5 minutes + + /** Stream transformation pipe: + * 1. Use the configuration to a stream validation operation as input + * 2. Build a comet validator/extractor it according the configuration + * 3. Start the validator, returning its output stream + * + * @return A Stream of [[ValidationResult]]s, generated by a comet instance + * programmed according to a [[SchemaValidateStreamInput]] + */ + def toValidationStream + : Pipe[IO, SchemaValidateStreamInput, ValidationResult] = + _.flatMap { streamValidationInput => + // 0. De-structure the required configurations from client input + val baseConfig = streamValidationInput.configuration + // 1. Build comet kafka extractor + val extractor = mkKafkaExtractor( + baseConfig.extractorConfiguration, + baseConfig.streamConfiguration + ) + // 2. Build comet validator: + val validator = + mkStreamValidator(baseConfig.validatorConfiguration, extractor) + + // 3. Initiate the validator, returning its stream + validator.validate + } + + /** Given the client's provided extractor and stream configuration, build the + * equivalent configuration for comet's kafka extractor + * + * @param extractorConfiguration Configurations on how to build the extractor, + * received from clients + * @param streamConfiguration Configurations on how to find/handle a stream, + * received from clients + * @return A complying [[KafkaExtractorConfiguration]] usable in streaming + * validations + * @see [[StreamExtractor]] + */ + private def mkKafkaExtractor( + extractorConfiguration: StreamValidationExtractorConfiguration, + streamConfiguration: StreamValidationStreamConfiguration + ): KafkaExtractor[Unit, String] = { + val finalConfiguration = KafkaExtractorConfiguration( + topic = streamConfiguration.topic, + server = streamConfiguration.server, + port = streamConfiguration.port.getOrElse( + KafkaExtractorDefaults.defaultServerPort + ), + groupId = streamConfiguration.groupId.getOrElse( + KafkaExtractorDefaults.defaultConsumerGroupId + ) + ) + + KafkaExtractor[Unit, String]( + configuration = finalConfiguration, + format = extractorConfiguration.cometDataFormat, + inference = extractorConfiguration.dataInference.getOrElse( + ExtractorDefaults.defaultInferenceEngine + ), + concurrentItems = extractorConfiguration.concurrentItems.getOrElse( + ExtractorDefaults.defaultConcurrentParsing + ), + itemTimeout = Some(timeout) + ) + } + + /** Given the client's provided validator configuration and an extractor, + * build a stream validator + * + * @param validatorConfiguration Configurations on how the validator should work, + * received from clients + * @param extractor The extractor from which this validator will pull its data + * @tparam A Type of the items that the underlying extractor is expected to + * receive (for this demo, these items will be Strings) + * @return A comet Validator pre-configured to get data from an extractor + * and start emitting validation results + */ + private def mkStreamValidator[A]( + validatorConfiguration: StreamValidationValidatorConfiguration, + extractor: StreamExtractor[A] + ): Validator[A] = { + val finalConfiguration = ValidatorConfiguration( + schema = validatorConfiguration.schema, + trigger = validatorConfiguration.trigger, + haltOnInvalid = validatorConfiguration.haltOnInvalid.getOrElse( + ValidatorDefaults.defaultHaltOnInvalid + ), + haltOnErrored = validatorConfiguration.haltOnErrored.getOrElse( + ValidatorDefaults.defaultHaltOnErrored + ), + concurrentItems = validatorConfiguration.concurrentItems.getOrElse( + ValidatorDefaults.defaultConcurrentValidations + ) + ) + + new Validator(finalConfiguration, extractor) + } + +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala new file mode 100644 index 00000000..2458283f --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala @@ -0,0 +1,30 @@ +package es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations + +import io.circe.generic.auto.exportEncoder +import io.circe.syntax.EncoderOps +import org.http4s.websocket.WebSocketFrame +import org.ragna.comet.validation.result.ValidationResult + +/** Object containing additional utilities added to the [[ValidationResult]] + * class + */ +object ValidationResultTransformations { + + /** Implicit class providing extension methods for [[ValidationResult]] + * instances + * + * @param validationResult Result being operated on + */ + implicit class ValidationResultOps(validationResult: ValidationResult) { + + /** From a given comet validation result, generate its JSON representation + * and form a WebSocket frame containing it as text + * @return A textual [[WebSocketFrame]] with the JSON representation of + * a [[ValidationResult]] + */ + def toWebSocketFrame: WebSocketFrame.Text = { + WebSocketFrame.Text(validationResult.asJson.spaces2) + } + + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/WebSocketTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/WebSocketTransformations.scala new file mode 100644 index 00000000..ee7fe683 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/WebSocketTransformations.scala @@ -0,0 +1,36 @@ +package es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations + +import es.weso.rdfshape.server.utils.error.exceptions.UnexpectedWebSocketFrameException +import io.circe.{Encoder, Json, ParsingFailure, parser} +import org.http4s.websocket.WebSocketFrame + +/** Object containing additional utilities added to the [[WebSocketFrame]] + * class + */ +object WebSocketTransformations { + + /** Custom encoder Encoder [[WebSocketFrame]] => [[Json]] + * + * If the frame contains a text message: attempt to parse to a JSON object, + * else return an error + * + * @return A Circe Json object, parsed from the text inside the WebSockets + * message + * @throws UnexpectedWebSocketFrameException when the WebSocket message + * received is not a text message + * @throws ParsingFailure when the WebSocket message can't + * be parsed to a JSON object + */ + implicit val encoder: Encoder[WebSocketFrame] = { + case textMessage: WebSocketFrame.Text => + parser.parse(textMessage.str) match { + case Left(err) => throw err + case Right(jsonObj) => jsonObj + } + case otherFrameType => + throw UnexpectedWebSocketFrameException( + Some(otherFrameType.getClass), + Some(WebSocketFrame.Text.getClass) + ) + } +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala index 34afa387..9e8802ed 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/trigger/TriggerMode.scala @@ -58,16 +58,18 @@ object TriggerMode extends TriggerModeCompanion[TriggerMode] { .downField(TypeParameter.name) .as[TriggerModeType] - decoded <- triggerType match { - case SHAPEMAP => TriggerShapeMap.decode(data, schema)(cursor) - case TARGET_DECLARATIONS => + decoded <- + if(triggerType.equalsIgnoreCase(SHAPEMAP)) + TriggerShapeMap.decode(data, schema)(cursor) + else if(triggerType.equalsIgnoreCase(TARGET_DECLARATIONS)) TriggerTargetDeclarations.decode(data, schema)(cursor) - case _ => + else DecodingFailure( - s"Invalid trigger mode type '$triggerType'", + s"Invalid trigger mode type '$triggerType': use one of '${TriggerModeType.values + .mkString(", ")}'", Nil ).asLeft - } + } yield decoded } @@ -89,7 +91,7 @@ object TriggerMode extends TriggerModeCompanion[TriggerMode] { private[schema] trait TriggerModeCompanion[T <: TriggerMode] extends LazyLogging { - /** @param data Optional data accompanying the ShapeMap + /** @param data Optional data accompanying the ShapeMap * @param schema Optional schema accompanying the ShapeMap * @return Decoding function used to extract [[TriggerMode]] instances from JSON values */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala index 5e3c7e03..ad342883 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/types/Schema.scala @@ -85,13 +85,21 @@ object Schema extends SchemaCompanion[Schema] { source <- cursor .downField(SourceParameter.name) .as[SchemaSource] + .map(_.toLowerCase) + + decoded <- + if( + SchemaSource.values + .map(_.toLowerCase) + .contains(source.toLowerCase) + ) SchemaSimple.decodeSchema(cursor) + else + DecodingFailure( + s"Invalid schema source '$source': use one of '${SchemaSource.values + .mkString(", ")}'", + Nil + ).asLeft - decoded <- source match { - case _ if SchemaSource.values.contains(source) => - SchemaSimple.decodeSchema(cursor) - case _ => - DecodingFailure(s"Invalid schema source '$source'", Nil).asLeft - } } yield decoded } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 1fd2a922..01ccf8b3 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -14,7 +14,12 @@ import es.weso.rdfshape.server.api.routes.schema.logic.operations.{ SchemaInfo, SchemaValidate } +import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.CometTransformations.toValidationStream +import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.ValidationResultTransformations.ValidationResultOps +import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.WebSocketTransformations.encoder +import es.weso.rdfshape.server.api.routes.schema.service.WebSocketClosures._ import es.weso.rdfshape.server.api.routes.schema.service.operations.SchemaConvertInput.decoder +import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.SchemaValidateStreamInput import es.weso.rdfshape.server.api.routes.schema.service.operations.{ SchemaConvertInput, SchemaInfoInput, @@ -30,8 +35,8 @@ import es.weso.schema.{ ShaclexSchema, Schema => SchemaW } -import io.circe.Json import io.circe.syntax.EncoderOps +import io.circe.{DecodingFailure, Json, ParsingFailure} import fs2._ import org.http4s.circe._ import org.http4s.client.Client @@ -40,8 +45,12 @@ import org.http4s.rho.RhoRoutes import org.http4s.rho.swagger.syntax.io._ import org.http4s.server.websocket.WebSocketBuilder import org.http4s.websocket.WebSocketFrame - -import scala.language.postfixOps +import org.ragna.comet.exception.stream.timed.StreamTimeoutException +import org.ragna.comet.exception.stream.validations.{ + StreamErroredItemException, + StreamInvalidItemException, + StreamValidationException +} /** API service to handle schema-related operations * @@ -165,6 +174,7 @@ class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) "WebSockets endpoint meant for streaming validations" ** GET / `verb` / "validate" / "stream" |>> { + /* Stream validations are done via WebSockets. The basic flow goes as * follows: * 1. The client starts a WebSocket connection. @@ -178,12 +188,10 @@ class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) * message to start generating output messages). * * Therefore, we use a Queue scoped to each request, as follows: - * 1. Each client incoming message in enqueued. + * 1. Each client incoming message is enqueued. * 2. The server dequeues the message in search for instructions to - * validate data: - * 2.1 If not found, an error response is returned - * 2.2 If found, the server starts to validate the data as requested - * (interrupting the current validation, if any) */ + * validate data, errors are handled at the end of the stream and cause + * the connection to close (error reason is attached) */ /* Inspired by the examples in: * https://github.com/http4s/http4s/blob/756c8940ca0161e940b691adc5ea59060d444417/examples/blaze/src/main/scala/com/example/http4s/blaze/BlazeWebSocketExample.scala */ @@ -193,45 +201,68 @@ class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) // Stream of messages from the server to the client val toClient: Stream[IO, WebSocketFrame] = Stream + /* 0. Get input data stream. + * Poll the queue to see if new messages arrived from the client */ .fromQueueNoneTerminated(queue) - // Force an error - .evalMap(_ => - IO.raiseError(new RuntimeException("Testing errors")) - ) - // Handle the error emitting an informational frame and - // a final closing frame - /* Beware of close codes: - * https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters */ - .handleErrorWith(error => { - Stream.evals { - val closingFrames: Seq[WebSocketFrame] = Seq( - // Informational frame - WebSocketFrame - .Text(s"An error occurred: ${error.getMessage}"), - /* Closing frame, if it fails to be created, resort to an - * empty one */ - WebSocketFrame - .Close(1000, s"Reason: ${error.getMessage}") - .getOrElse(WebSocketFrame.Close()) - ) - IO(closingFrames) - } + /* 1. WebSocketFrame => JSON. + * Mapping: attempt to parse JSON out of the client message */ + .map(_.asJson) + /* 2. JSON => SchemaValidateStreamInput. + * Mapping: attempt to get the validation settings from the + * client's JSON message. + * If decoding errors arise: throw */ + .evalMap(_.as[SchemaValidateStreamInput] match { + case Left(err) => IO.raiseError(err) + case Right(value) => IO.pure(value) }) - /* Mapping [WebSocketFrame => JSON]: conversion that checks we - * received text and parses it to a JSON object. */ - /* Mapping [JSON => SchemaValidateStreamInput]: conversion that - * extracts all needed data from that JSON, using available decoders */ - /* Pipe[IO, SchemaValidateStreamInput, comet.ValidationResult]: - * pipe that creates the comet validation stream from the info and - * invokes it */ - /* Mapping [comet.ValidationResult => WebSocketFrame]: conversion - * that converts comet results to WebSocketFrames with JSON text - * that are be sent back to the client */ - /* Remember to catch all possible errors (decoding, halting, etc.) - * using FS2's API */ + /* 3. Stream[IO, SchemaValidateStreamInput] => + * Stream[IO,ValidationResult]. + * Pipe: create a comet validation stream from the parsed + * configuration. + * If the validation begins, a stream of results will be + * returned */ + .through(toValidationStream) + /* 4. ValidationResult => WebSocketFrame. + * Mapping: convert each validation result to a WebSocketFrame + * object containing the results in its text */ + .map(_.toWebSocketFrame) + /* 5. Error processing. + * Catch all known exceptions and generate a closing frame + * depending on the error. + * Close the WebSockets stream with custom error codes. */ + .handleErrorWith(err => + Stream.eval(IO { + // Print debug info + println(err) + err.printStackTrace() + err match { + case _: ParsingFailure => + invalidJsonClosure.closingFrame + case _: DecodingFailure => + invalidConfigurationClosure.closingFrame + case sve: StreamValidationException => + sve match { + case _: StreamInvalidItemException => + invalidItemClosure.closingFrame + case _: StreamErroredItemException => + erroredItemClosure.closingFrame + } + case _: StreamTimeoutException => + timeoutClosure.closingFrame + // Other, unknown error + case _ => + unknownErrorClosure.closingFrame + } + }) + /* 6. Graceful stop. + * If the validations stream comes to an end, concatenate a + * graceful closing frame */ + ) ++ Stream.eval(IO(standardClosure.closingFrame)) /* Pipe for processing the stream of messages from the client to the - * server */ + * server: + * - Put all incoming client messages into the queue so that the + * server processes them */ val fromClient: Pipe[IO, WebSocketFrame, Unit] = _.enqueueNoneTerminated(queue) @@ -260,16 +291,123 @@ object SchemaService { /** Compendium of additional text constants used on service errors */ private object SchemaServiceError { + + /** Placeholder error message used when an unknown error occurred + * in a data validation + */ val couldNotValidateData = "Unknown error validating the data provided. Check the inputs." + /** Error message used when the WebSockets endpoint is contacted with a + * non-websockets request + */ val nonWebSocketRequestError = "A request was received but it was not a valid WebSocket request." + /** Error message used when the WebSockets handshake fails + */ val nonWebSocketHandshakeError = "An error occurred during the WebSockets handshake process." } +/** Set of constants/utils used for closing connections + * in the WebSockets service endpoint + */ +private object WebSocketClosures { + + /** Generate a closing frame with the default code for success + * and an informational message + */ + def standardClosure: WebSocketClosure = + WebSocketClosure(1000, "Connection finished") + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when data sent by the client was not readable as JSON + */ + def invalidJsonClosure: WebSocketClosure = + WebSocketClosure(3000, "The client message did not contain valid JSON data") + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when data sent by the client was readable but its contents + * were not valid + */ + def invalidConfigurationClosure: WebSocketClosure = + WebSocketClosure( + 3001, + "The client message did not contain a valid configuration" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because an item was invalid + * and was configured to do so + */ + def invalidItemClosure: WebSocketClosure = + WebSocketClosure( + 3002, + "Connection closed because an item was invalid" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because an item validation + * threw an error and was configured to do so + */ + def erroredItemClosure: WebSocketClosure = + WebSocketClosure( + 3003, + "Connection closed because an error occurred while validating an item" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because no items were + * validated for some time + */ + def timeoutClosure: WebSocketClosure = + WebSocketClosure( + 3004, + "Connection closed because no items were received for a while" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when an unexpected error occurred + */ + def unknownErrorClosure: WebSocketClosure = + WebSocketClosure( + 4999, + "Connection closed due to an unknown error" + ) + + /** Data required to create a WebSocket closing frame, specially used for + * erroring connection closures + * + * @param code Code sent when closing the connection + * @param reason Reason why the connection is closed + * @note [[reason]] should be kept as short as possible due to size limitations + * @see [[https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters]] + */ + case class WebSocketClosure(code: Int, reason: String) { + + /** Create a WebSocket closing frame with this instance's code and reason. + * + * In case of errors, resort to the default closing frame. + */ + lazy val closingFrame: WebSocketFrame.Close = WebSocketFrame + .Close(code, reason) + .getOrElse(WebSocketFrame.Close()) + } +} + /** Compendium of additional text constants used to describe inline parameters * (query and path parameters) in Swagger */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala index 00f977bb..4dcd669d 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala @@ -6,7 +6,7 @@ import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ ValidatorParameter } import es.weso.rdfshape.server.utils.other.mapEitherToDecodeResult -import io.circe.{Decoder, HCursor} +import io.circe.{Decoder, Error, HCursor} /** Broad configuration class containing all the child configurations required to * perform a Stream validation with Comet @@ -65,4 +65,19 @@ object StreamValidationConfiguration { */ private[configuration] val unknownErrorMessage: String = "Unknown error creating the configuration for stream validation" + + /** Error message used when a valid configuration can not be extracted from + * the provided JSON data + * + * @param reason Error why the JSON decoding of the configuration failed + * @return An informational text message containing some context and the + * provided error + */ + private[schema] def invalidStreamValidationConfigurationReceived( + reason: Option[Error] + ) = { + val formattedReasonText = + reason.map(r => s": ${r.getMessage}").getOrElse("") + s"Invalid configuration received for the stream validation$formattedReasonText" + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala index ce9d8520..82eae376 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala @@ -15,7 +15,6 @@ import io.circe.{Decoder, HCursor} import org.ragna.comet.data.{DataFormat => DataFormatComet} import org.ragna.comet.stream.extractors.StreamExtractor -import scala.concurrent.duration._ import scala.util.Try /** Minor configuration class, containing the information required for a @@ -23,15 +22,15 @@ import scala.util.Try * * Everything but the data format is optional or has a default value * - * Timeout is interpreted in milliseconds + * Extractor timeout is configured by the server to avoid abusing + * the API * * @see [[StreamExtractor]] */ final case class StreamValidationExtractorConfiguration( dataFormat: DataFormat, dataInference: Option[InferenceEngine], - concurrentItems: Option[Int], - timeout: Option[FiniteDuration] + concurrentItems: Option[Int] ) { // Pre-requisites: // 1. The data format supplied is available in the streaming library @@ -73,15 +72,10 @@ object StreamValidationExtractorConfiguration { optConcurrentItems <- cursor .downField(ConcurrentItemsParameter.name) .as[Option[Int]] - - optTimeoutMillis <- cursor - .downField(ConcurrentItemsParameter.name) - .as[Option[Long]] } yield ( maybeDataFormat, optInference, - optConcurrentItems, - optTimeoutMillis + optConcurrentItems ) configInfo.map { @@ -90,8 +84,7 @@ object StreamValidationExtractorConfiguration { case ( maybeDataFormat, optInference, - optConcurrentItems, - optTimeoutMillis + optConcurrentItems ) => for { dataFormat <- maybeDataFormat @@ -99,8 +92,7 @@ object StreamValidationExtractorConfiguration { StreamValidationExtractorConfiguration( dataFormat, optInference, - optConcurrentItems, - optTimeoutMillis.map(FiniteDuration(_, MILLISECONDS)) + optConcurrentItems ) }.toEither.leftMap(err => s"Could not build the extractor configuration from user data:\n ${err.getMessage}" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala index dea0dfe1..ac28e692 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala @@ -28,9 +28,7 @@ final case class StreamValidationStreamConfiguration( port: Option[Int], topic: String, groupId: Option[String] -) { - // Pre-requisites: None -} +) object StreamValidationStreamConfiguration { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala index 3f62f50e..06349cc6 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala @@ -26,12 +26,7 @@ final case class StreamValidationValidatorConfiguration( haltOnInvalid: Option[Boolean], haltOnErrored: Option[Boolean], concurrentItems: Option[Int] -) { - // Pre-requisites: - - // 1. A SHAclEX can be built from the Schema model formed from user data - -} +) object StreamValidationValidatorConfiguration { diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala index 4429626f..2079a319 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/shapemap/logic/ShapeMap.scala @@ -58,6 +58,10 @@ sealed case class ShapeMap private ( /** Inner shapemap structure of the data in this instance * * @return A ShapeMap instance used by WESO libraries in validation + * + * @note If no data prefix map is given (for example, in streaming + * validations where data has not arrived yet), resort to + * the schema's prefix map instead */ lazy val innerShapeMap: Either[String, ShapeMapW] = { if(raw.isBlank) "Cannot extract the ShapeMap from an empty instance".asLeft @@ -67,11 +71,12 @@ sealed case class ShapeMap private ( raw, format.name, base = None, - nodesPrefixMap, + if(nodesPrefixMap.isEmpty) shapesPrefixMap else nodesPrefixMap, shapesPrefixMap ) match { case Left(errorList) => errorList.toList.mkString("\n").asLeft case Right(shapeMap) => shapeMap.asRight + } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/UnexpectedWebSocketFrameException.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/UnexpectedWebSocketFrameException.scala new file mode 100644 index 00000000..e67b2682 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/exceptions/UnexpectedWebSocketFrameException.scala @@ -0,0 +1,35 @@ +package es.weso.rdfshape.server.utils.error.exceptions + +/** Custom exception thrown when a failure occurs because certain information + * was expected via WebSockets but other arrived instead + * + * @param message Reason/explanation of why the exception occurred + */ +final case class UnexpectedWebSocketFrameException( + private val message: String +) extends RuntimeException(message) + +object UnexpectedWebSocketFrameException { + + /** Factory of [[UnexpectedWebSocketFrameException]] + * + * @param received Optionally, the received frame that caused the exception + * @param expected Optionally, the expected class of the received frame + * @return A new [[UnexpectedWebSocketFrameException]] with a customized + * error message + */ + def apply[A, B]( + received: Option[Class[A]], + expected: Option[Class[B]] + ): UnexpectedWebSocketFrameException = { + // Format the final messages to adapt to the cases where options are empty + val formattedList = List(received, expected).map( + _.map(_.getSimpleName).getOrElse("unspecified") + ) + val (expectedText, receivedText) = (formattedList.head, formattedList(1)) + + new UnexpectedWebSocketFrameException( + s"Expected a WebSocket frame '$expectedText' but got '$receivedText'" + ) + } +} diff --git a/version.sbt b/version.sbt index 5d3a24f9..3cdf5447 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.7" +ThisBuild / version := "0.2.8" From 5f4a5ce54b08fed16682bf38c0ed355cf23d0539 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 5 May 2022 11:33:43 +0200 Subject: [PATCH 31/50] Working with comet. Moved main code away from the service. --- build.sbt | 2 +- .../ValidationResultTransformations.scala | 15 +- .../routes/schema/service/SchemaService.scala | 174 +---------- .../stream/ops/StreamValidationOps.scala | 277 ++++++++++++++++++ .../IncomingRequestParameters.scala | 18 ++ 5 files changed, 313 insertions(+), 173 deletions(-) create mode 100644 modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala diff --git a/build.sbt b/build.sbt index f2f6f82b..c1a8aac3 100644 --- a/build.sbt +++ b/build.sbt @@ -289,7 +289,7 @@ lazy val MUnitFramework = new TestFramework("munit.Framework") lazy val http4sVersion = "1.0.0-M30" lazy val rhoVersion = "0.23.0-M1" lazy val catsVersion = "2.7.0" -lazy val cometVersion = "0.1.5" +lazy val cometVersion = "0.1.6" /* ------------------------------------------------------------------------- */ lazy val mongodbVersion = "4.6.0" lazy val mongo4catsVersion = "0.4.7" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala index 2458283f..5ecc4bc9 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala @@ -1,6 +1,10 @@ package es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations -import io.circe.generic.auto.exportEncoder +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + ContentParameter, + TypeParameter +} +import io.circe.Json import io.circe.syntax.EncoderOps import org.http4s.websocket.WebSocketFrame import org.ragna.comet.validation.result.ValidationResult @@ -19,11 +23,18 @@ object ValidationResultTransformations { /** From a given comet validation result, generate its JSON representation * and form a WebSocket frame containing it as text + * * @return A textual [[WebSocketFrame]] with the JSON representation of * a [[ValidationResult]] */ def toWebSocketFrame: WebSocketFrame.Text = { - WebSocketFrame.Text(validationResult.asJson.spaces2) + val messageJson = Json.fromFields( + List( + (TypeParameter.name, "result".asJson), + (ContentParameter.name, validationResult.asJson) + ) + ) + WebSocketFrame.Text(messageJson.spaces2) } } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 01ccf8b3..08da9b46 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -14,12 +14,8 @@ import es.weso.rdfshape.server.api.routes.schema.logic.operations.{ SchemaInfo, SchemaValidate } -import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.CometTransformations.toValidationStream -import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.ValidationResultTransformations.ValidationResultOps -import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.WebSocketTransformations.encoder -import es.weso.rdfshape.server.api.routes.schema.service.WebSocketClosures._ import es.weso.rdfshape.server.api.routes.schema.service.operations.SchemaConvertInput.decoder -import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.SchemaValidateStreamInput +import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.ops.StreamValidationOps.mkValidationStream import es.weso.rdfshape.server.api.routes.schema.service.operations.{ SchemaConvertInput, SchemaInfoInput, @@ -35,8 +31,8 @@ import es.weso.schema.{ ShaclexSchema, Schema => SchemaW } +import io.circe.Json import io.circe.syntax.EncoderOps -import io.circe.{DecodingFailure, Json, ParsingFailure} import fs2._ import org.http4s.circe._ import org.http4s.client.Client @@ -45,12 +41,6 @@ import org.http4s.rho.RhoRoutes import org.http4s.rho.swagger.syntax.io._ import org.http4s.server.websocket.WebSocketBuilder import org.http4s.websocket.WebSocketFrame -import org.ragna.comet.exception.stream.timed.StreamTimeoutException -import org.ragna.comet.exception.stream.validations.{ - StreamErroredItemException, - StreamInvalidItemException, - StreamValidationException -} /** API service to handle schema-related operations * @@ -198,66 +188,8 @@ class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) Queue .unbounded[IO, Option[WebSocketFrame]] .flatMap { queue => - // Stream of messages from the server to the client - val toClient: Stream[IO, WebSocketFrame] = - Stream - /* 0. Get input data stream. - * Poll the queue to see if new messages arrived from the client */ - .fromQueueNoneTerminated(queue) - /* 1. WebSocketFrame => JSON. - * Mapping: attempt to parse JSON out of the client message */ - .map(_.asJson) - /* 2. JSON => SchemaValidateStreamInput. - * Mapping: attempt to get the validation settings from the - * client's JSON message. - * If decoding errors arise: throw */ - .evalMap(_.as[SchemaValidateStreamInput] match { - case Left(err) => IO.raiseError(err) - case Right(value) => IO.pure(value) - }) - /* 3. Stream[IO, SchemaValidateStreamInput] => - * Stream[IO,ValidationResult]. - * Pipe: create a comet validation stream from the parsed - * configuration. - * If the validation begins, a stream of results will be - * returned */ - .through(toValidationStream) - /* 4. ValidationResult => WebSocketFrame. - * Mapping: convert each validation result to a WebSocketFrame - * object containing the results in its text */ - .map(_.toWebSocketFrame) - /* 5. Error processing. - * Catch all known exceptions and generate a closing frame - * depending on the error. - * Close the WebSockets stream with custom error codes. */ - .handleErrorWith(err => - Stream.eval(IO { - // Print debug info - println(err) - err.printStackTrace() - err match { - case _: ParsingFailure => - invalidJsonClosure.closingFrame - case _: DecodingFailure => - invalidConfigurationClosure.closingFrame - case sve: StreamValidationException => - sve match { - case _: StreamInvalidItemException => - invalidItemClosure.closingFrame - case _: StreamErroredItemException => - erroredItemClosure.closingFrame - } - case _: StreamTimeoutException => - timeoutClosure.closingFrame - // Other, unknown error - case _ => - unknownErrorClosure.closingFrame - } - }) - /* 6. Graceful stop. - * If the validations stream comes to an end, concatenate a - * graceful closing frame */ - ) ++ Stream.eval(IO(standardClosure.closingFrame)) + /* Stream of messages from the server to the client */ + val toClient: Stream[IO, WebSocketFrame] = mkValidationStream(queue) /* Pipe for processing the stream of messages from the client to the * server: @@ -310,104 +242,6 @@ private object SchemaServiceError { "An error occurred during the WebSockets handshake process." } -/** Set of constants/utils used for closing connections - * in the WebSockets service endpoint - */ -private object WebSocketClosures { - - /** Generate a closing frame with the default code for success - * and an informational message - */ - def standardClosure: WebSocketClosure = - WebSocketClosure(1000, "Connection finished") - - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when data sent by the client was not readable as JSON - */ - def invalidJsonClosure: WebSocketClosure = - WebSocketClosure(3000, "The client message did not contain valid JSON data") - - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when data sent by the client was readable but its contents - * were not valid - */ - def invalidConfigurationClosure: WebSocketClosure = - WebSocketClosure( - 3001, - "The client message did not contain a valid configuration" - ) - - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when the validation stopped because an item was invalid - * and was configured to do so - */ - def invalidItemClosure: WebSocketClosure = - WebSocketClosure( - 3002, - "Connection closed because an item was invalid" - ) - - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when the validation stopped because an item validation - * threw an error and was configured to do so - */ - def erroredItemClosure: WebSocketClosure = - WebSocketClosure( - 3003, - "Connection closed because an error occurred while validating an item" - ) - - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when the validation stopped because no items were - * validated for some time - */ - def timeoutClosure: WebSocketClosure = - WebSocketClosure( - 3004, - "Connection closed because no items were received for a while" - ) - - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when an unexpected error occurred - */ - def unknownErrorClosure: WebSocketClosure = - WebSocketClosure( - 4999, - "Connection closed due to an unknown error" - ) - - /** Data required to create a WebSocket closing frame, specially used for - * erroring connection closures - * - * @param code Code sent when closing the connection - * @param reason Reason why the connection is closed - * @note [[reason]] should be kept as short as possible due to size limitations - * @see [[https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters]] - */ - case class WebSocketClosure(code: Int, reason: String) { - - /** Create a WebSocket closing frame with this instance's code and reason. - * - * In case of errors, resort to the default closing frame. - */ - lazy val closingFrame: WebSocketFrame.Close = WebSocketFrame - .Close(code, reason) - .getOrElse(WebSocketFrame.Close()) - } -} - /** Compendium of additional text constants used to describe inline parameters * (query and path parameters) in Swagger */ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala new file mode 100644 index 00000000..d0d5b437 --- /dev/null +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala @@ -0,0 +1,277 @@ +package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.ops + +import cats.effect.IO +import cats.effect.std.Queue +import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.CometTransformations.toValidationStream +import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.ValidationResultTransformations.ValidationResultOps +import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.WebSocketTransformations.encoder +import es.weso.rdfshape.server.api.routes.schema.service.SchemaService +import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.SchemaValidateStreamInput +import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.ops.StreamValidationOps.WebSocketClosures._ +import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ + ContentParameter, + MessageParameter, + ReasonParameter, + TypeParameter +} +import io.circe.syntax.EncoderOps +import io.circe.{DecodingFailure, Json, ParsingFailure} +import fs2._ +import org.apache.kafka.common.KafkaException +import org.http4s.websocket.WebSocketFrame +import org.ragna.comet.exception.stream.timed.StreamTimeoutException +import org.ragna.comet.exception.stream.validations.{ + StreamErroredItemException, + StreamInvalidItemException, + StreamValidationException +} +import org.ragna.comet.validation.result.ValidationResult + +object StreamValidationOps { + + /** Given an input queue with WebSocket messages, parse these messages in search + * for instructions to validate data and, if available, start running a + * Comet validation stream whose output will be sent to the WebSockets client. + * + * This is the core of the [[SchemaService]] stream validation service and + * further info can be found there. + * + * @param queue Queue structure from which this stream will read WebSocket + * messages + * @return A Stream of WebSocket frames sent back to the client, each of + * them containing the results of a validation in JSON format. + * @note The workflow is defined in the in-line comments + */ + def mkValidationStream( + queue: Queue[IO, Option[WebSocketFrame]] + ): Stream[IO, WebSocketFrame] = { + Stream + /* 0. Get input data stream. + * Poll the queue to see if new messages arrived from the client */ + .fromQueueNoneTerminated(queue) + /* 1. WebSocketFrame => JSON. + * Mapping: attempt to parse JSON out of the client message */ + .map(_.asJson) + /* 2. JSON => SchemaValidateStreamInput. + * Mapping: attempt to get the validation settings from the client's JSON + * message. + * If decoding errors arise: throw */ + .evalMap(_.as[SchemaValidateStreamInput] match { + case Left(err) => IO.raiseError(err) + case Right(value) => IO.pure(value) + }) + /* 3. Stream[IO, SchemaValidateStreamInput] => + * Stream[IO,ValidationResult]. + * Pipe: create a comet validation stream from the parsed configuration. + * If the validation begins, a stream of results will be returned */ + .through(toValidationStream) + /* 4. ValidationResult => WebSocketFrame. + * Mapping: convert each validation result to a WebSocketFrame object + * containing the results in its text */ + .map(_.toWebSocketFrame) + /* 5. Error processing. + * Catch all known exceptions and generate two frames: + * 1. A text frame with the detailed error cause. + * 2. A closing frame with code and reason dependant on the error. */ + .handleErrorWith(err => { + Stream.evalSeq(IO { + List(mkReasonFrame(err), mkClosingFrame(err)) + }) + /* 6. Graceful stop. + * If the validations stream comes to an end, concatenate a graceful + * closing frame */ + }) ++ Stream.eval(IO(standardClosure.closingFrame)) + } + + /** Given an error/exception, produce a WebSockets frame explaining it + * + * The possibility to send messages with a detailed error cause is because + * closing frames are too limited in size to attach the full error info + * + * @param error Input error + * @return WebSocket text frame with information about the input error + * @note If the error is a [[StreamInvalidItemException]], we try to include + * the invalid validation report instead of a generic message + */ + private def mkReasonFrame(error: Throwable): WebSocketFrame.Text = { + + val contentJson: Json = Json + .obj( + ( + MessageParameter.name, + s"${error.getClass.getSimpleName} - ${error.getMessage}".asJson + ), + ( + ReasonParameter.name, + /* If the error can give us further information, return here in + * "reason", else null value */ + error match { + case invalidErr: StreamInvalidItemException + if invalidErr.reason.isDefined => + invalidErr.reason + .map(ValidationResult.getValidationReportJson) + .get + case _ => Json.Null + } + ) + ) + .dropNullValues + + val messageJson = Json.fromFields( + List( + (TypeParameter.name, "reason".asJson), + (ContentParameter.name, contentJson) + ) + ) + + WebSocketFrame.Text(messageJson.spaces2) + } + + /** Given an error/exception, produce a WebSockets closing frame + * + * @param error Input error + * @return WebSocket closing frame whose code and reason are generated + * depending on the input error + */ + private def mkClosingFrame(error: Throwable): WebSocketFrame.Close = + error match { + case _: ParsingFailure => + invalidJsonClosure.closingFrame + case _: DecodingFailure => + invalidConfigurationClosure.closingFrame + case sve: StreamValidationException => + sve match { + case _: StreamInvalidItemException => + invalidItemClosure.closingFrame + case _: StreamErroredItemException => + erroredItemClosure.closingFrame + } + case _: StreamTimeoutException => + timeoutClosure.closingFrame + case _: IllegalArgumentException => + illegalArgumentClosure.closingFrame + case _: AssertionError => + assertionClosure.closingFrame + case _: KafkaException => + kafkaClosure.closingFrame + case _ => + unknownErrorClosure.closingFrame + } + + /** Set of constants/utils used for closing connections + * in the WebSockets streaming validation + */ + private[stream] object WebSocketClosures { + + /** Generate a closing frame with the default code for success + * and an informational message + */ + def standardClosure: WebSocketClosure = + WebSocketClosure(1000, "Connection finished") + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when data sent by the client was not readable as JSON + */ + def invalidJsonClosure: WebSocketClosure = + WebSocketClosure(3000, "The message did not contain valid JSON data") + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when data sent by the client was readable but its contents + * were not valid + */ + def invalidConfigurationClosure: WebSocketClosure = + WebSocketClosure( + 3001, + "The message did not contain a valid configuration" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because an item was invalid + * and was configured to do so + */ + def invalidItemClosure: WebSocketClosure = + WebSocketClosure( + 3002, + "An item was invalid" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because an item validation + * threw an error and was configured to do so + */ + def erroredItemClosure: WebSocketClosure = + WebSocketClosure( + 3003, + "An error occurred while validating an item" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because no items were + * validated for some time + */ + def timeoutClosure: WebSocketClosure = + WebSocketClosure( + 3004, + "No items were received for a while" + ) + + def illegalArgumentClosure: WebSocketClosure = + WebSocketClosure( + 3005, + "The configuration contained invalid values" + ) + + def assertionClosure: WebSocketClosure = + WebSocketClosure( + 3006, + "An invalid value was provided to the server" + ) + + def kafkaClosure: WebSocketClosure = + WebSocketClosure( + 3007, + "An error occurred connecting to the Kafka stream" + ) + + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when an unexpected error occurred + */ + def unknownErrorClosure: WebSocketClosure = + WebSocketClosure( + 4999, + "Connection closed due to an unknown error" + ) + + /** Data required to create a WebSocket closing frame, specially used for + * erroring connection closures + * + * @param code Code sent when closing the connection + * @param reason Reason why the connection is closed + * @note [[reason]] should be kept as short as possible due to size limitations + * @see [[https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters]] + */ + case class WebSocketClosure(code: Int, reason: String) { + + /** Create a WebSocket closing frame with this instance's code and reason. + * + * In case of errors, resort to the default closing frame. + */ + lazy val closingFrame: WebSocketFrame.Close = WebSocketFrame + .Close(code, reason) + .getOrElse(WebSocketFrame.Close()) + } + } + +} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala index 01800a46..c7d95865 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala @@ -37,6 +37,10 @@ object IncomingRequestParameters { lazy val content = "content" + lazy val message = "message" + + lazy val reason = "reason" + lazy val format = "format" lazy val engine = "engine" @@ -97,6 +101,20 @@ object IncomingRequestParameters { val name: String = content } + /** Parameter expected to contain a generic message + */ + object MessageParameter + extends OptionalQueryParamDecoderMatcher[String](message) { + val name: String = message + } + + /** Parameter expected to contain the reason or an explanation of something + */ + object ReasonParameter + extends OptionalQueryParamDecoderMatcher[String](reason) { + val name: String = reason + } + /** Parameter expected to contain the format of the content inputted by the user for a certain * operation */ From 19235994a11657ab24c9572bbae0d8bcec99df06 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 5 May 2022 17:10:20 +0200 Subject: [PATCH 32/50] Webdocs for streaming validations. --- build.sbt | 5 +- docs/api-usage/streaming.md | 192 ++++++++++++++++++ .../routes/schema/service/SchemaService.scala | 2 +- .../stream/ops/StreamValidationOps.scala | 6 +- version.sbt | 2 +- website/project/build.properties | 1 + website/sidebars.js | 13 +- website/yarn.lock | 13 +- 8 files changed, 212 insertions(+), 22 deletions(-) create mode 100644 docs/api-usage/streaming.md create mode 100644 website/project/build.properties diff --git a/build.sbt b/build.sbt index c1a8aac3..3cd943c7 100644 --- a/build.sbt +++ b/build.sbt @@ -100,7 +100,8 @@ lazy val mdocSettings = Seq( "CLIENT_REPO" -> "https://github.com/weso/rdfshape-client/", "CLIENT_URL" -> "https://rdfshape.weso.es/", "WESOLOCAL_URL" -> "https://github.com/weso/wesolocal/wiki/RDFShape", - "API-DOCS_URL" -> "https://app.swaggerhub.com/apis-docs/weso/RDFShape" + "API-DOCS_URL" -> "https://app.swaggerhub.com/apis-docs/weso/RDFShape", + "STREAMING_APP_NAME" -> "Comet" ), mdocExtraArguments := Seq("--no-link-hygiene"), /* When creating/publishing the docusaurus site, update the dynamic mdoc and @@ -289,7 +290,7 @@ lazy val MUnitFramework = new TestFramework("munit.Framework") lazy val http4sVersion = "1.0.0-M30" lazy val rhoVersion = "0.23.0-M1" lazy val catsVersion = "2.7.0" -lazy val cometVersion = "0.1.6" +lazy val cometVersion = "0.1.7" /* ------------------------------------------------------------------------- */ lazy val mongodbVersion = "4.6.0" lazy val mongo4catsVersion = "0.4.7" diff --git a/docs/api-usage/streaming.md b/docs/api-usage/streaming.md new file mode 100644 index 00000000..083598a8 --- /dev/null +++ b/docs/api-usage/streaming.md @@ -0,0 +1,192 @@ +--- +id: streaming +title: Streaming validations (beta) +--- + +# Streaming validations (beta) + +@APP_NAME@ features some tools for validating [Kafka](https://kafka.apache.org/) +streams of RDF data instead of static datasets. + +You may find more information and try it out using the +following [API endpoint](https://app.swaggerhub.com/apis-docs/weso/RDFShape/#/schema/getSchemaValidateStream) +. + +> **Notice this is just a beta version exposed in @APP_NAME@/Clients as a demo** + +## Motivation and tools + +The processing of streaming validations is part of one of WESO's student's +Master's theis, which involved the development +of [@STREAMING_APP_NAME@](https://ulitol97.github.io/comet/), a library capable +of validating streams of RDF data +using [SHaclEX](https://github.com/weso/shaclex) +under the hood. + +For purposes beyond this demo's limitations, we recommend trying +@STREAMING_APP_NAME@ out yourself. + +## Usage + +As it is streams we are dealing with, the communication with @APP_NAME@'s is +not done through HTTP requests anymore, but +through [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) +. + +The workflow (simplified) goes as follows: + +1. The client attempts to open a WebSockets connection with the server. +2. If the connection attempt succeeds, the server will remain waiting for the + client. +3. The client may then send a WebSockets message in JSON (see [_Data + Model_](#dataModel)) requesting the server to perform a certain validation on + an input RDF data stream. +4. If the client's request is correct, the server will begin the validation, + sending each output back to the client in separate WebSockets messages. + +## Data model + +### Request model + +For the server to start sending results to a client, it is the latter which has +to first send a request to the server. + +These requests are JSON-formatted WebSockets messages, telling the server how +the validation should be performed, including: + +- _configuration_: Parent object of the JSON tree. + - _validator_: Information on how the @STREAMING_APP_NAME@'s should operate. + - _schema_: Schema that the RDF data will be validated against. + Formatted as in the rest of API requests. + - _triggerMode_: Validation trigger that the RDF data will be validated + against. Formatted as in the rest of API requests. + - _haltOnInvalid (Optional)_: Whether if the streaming validation should + stop the moment an incoming item does not validate. Default: `false`. + - _haltOnErrored (Optional)_: Whether if the streaming validation should + stop the moment an error occurs during a validation, or just ignore + it. Default: `false`. + - _extractor_: Information on how @STREAMING_APP_NAME@'s Kafka extractor + should operate. + - _data_: Object with the properties that incoming RDF data is expected + to have. + - _format_: Format of the incoming RDF data (Turtle, JSONLD, etc.). + - _inference (Optional)_: Inference to be applied on the incoming + RDF data (turtle, JSONLD, etc.). Default: `NONE`. + - _stream_: Information for @STREAMING_APP_NAME@ to consume an incoming + Kafka stream. + - _server_: Hostname/IP address of the Kafka server streaming RDF data. + - _port_ (Optional): Port from which the Kafka server is streaming data. + Default: `9092`. + - _topic_: Topic on which the Kafka server is streaming data. + +```json title="Example client message requesting a streaming validation" +{ + "configuration": { + "validator": { + "haltOnInvalid": false, + "haltOnErrored": false, + "schema": { + "content": "PREFIX ex: \nPREFIX xsd: \n\n# Filters of a valid sensor reading\nex:ValidReading {\n ex:readingDatetime xsd:dateTime ; # Has a VALID timestamp\n ex:readingTemperature xsd:decimal MININCLUSIVE 18 MAXINCLUSIVE 20 + ; # 1+ readings in range 18-20\n ex:status [ \"OK\" \"RUNNING\" ] # Status must be one of \n}", + "engine": "ShEx", + "format": "ShExC", + "source": "byText" + }, + "triggerMode": { + "shapeMap": { + "content": "ex:reading@ex:ValidReading", + "format": "Compact", + "source": "byText" + }, + "type": "ShapeMap" + } + }, + "extractor": { + "data": { + "format": "Turtle", + "inference": "None" + }, + }, + "stream": { + "server": "localhost", + "port": 9092, + "topic": "rdf" + } + } +} +``` + +### Response model + +Though subject to change, results emitted from @APP_NAME@ to the client +have the following structure: + +- _type_: Metadata telling the client the type of content this message has. The + possible values are: + - result: the message contains a JSON-formatted validation result. + - error: the message contains a JSON-formatted error +- _content_: Contents of the message itself + - For results, these contents will be the validation results. + - For errors, these contents will be an error description. + +```json title="Example server response for a validation result" +{ + "type": "result", + "content": { + "valid": true, + "status": "valid", + "message": "Data validation was successful", + "instant": "2022-05-05T15:00:57.925050695Z", + "report": { + "valid": true, + "type": "Result", + "message": "Validated", + "shapeMap": [ ... ], + "errors": [], + "nodesPrefixMap": { ... }, + "shapesPrefixMap": { ... } + } + } +} +``` + +#### WebSockets stream closure + +If the WebSockets client does not disconnect, the streaming validation will keep +running unless: + +- An invalid/erroring validation takes places and the validator was configured + to stop on these cases. +- The validator does not receive any data to validate for a certain time period: + the WebSockets connection is closed to save resources. + +In the event of closure, two WebSocket frames are sent to the client: + +1. A standard WebSocket frame containing JSON-formatted text explaining the + error that prompted the connection to close, including: + * _type_: will be `error`. + * _content_: + * _message_: Simplified error message. + * _reason_: Detailed cause of the error, only available when the error + cause is not-validating RDF data, in which case the validation report + will be included here. +2. A closing WebSocket frame, with a short description of the closure reason and + its corresponding close code. + +```json title="Example last server response before closure" +{ + "type": "error", + "content": { + "message": "StreamInvalidItemException - Stream halted because an item was invalid", + "reason": { + "valid": false, + "type": "Result", + "message": "Validated with errors", + "shapeMap": [ ... ], + "errors": [ ... ], + "nodesPrefixMap": { ... }, + "shapesPrefixMap": { ... } + } + } +} +``` + diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 08da9b46..2c8bf29f 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -162,7 +162,7 @@ class SchemaService(client: Client[IO], wsBuilder: WebSocketBuilder[IO]) .handleErrorWith(err => InternalServerError(err.getMessage)) } - "WebSockets endpoint meant for streaming validations" ** + "WebSockets endpoint meant for streaming validations (see more at https://www.weso.es/rdfshape-api/docs/api-usage/streaming/)" ** GET / `verb` / "validate" / "stream" |>> { /* Stream validations are done via WebSockets. The basic flow goes as diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala index d0d5b437..c61eb0cf 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala @@ -75,7 +75,7 @@ object StreamValidationOps { * 2. A closing frame with code and reason dependant on the error. */ .handleErrorWith(err => { Stream.evalSeq(IO { - List(mkReasonFrame(err), mkClosingFrame(err)) + List(mkErrorFrame(err), mkClosingFrame(err)) }) /* 6. Graceful stop. * If the validations stream comes to an end, concatenate a graceful @@ -93,7 +93,7 @@ object StreamValidationOps { * @note If the error is a [[StreamInvalidItemException]], we try to include * the invalid validation report instead of a generic message */ - private def mkReasonFrame(error: Throwable): WebSocketFrame.Text = { + private def mkErrorFrame(error: Throwable): WebSocketFrame.Text = { val contentJson: Json = Json .obj( @@ -119,7 +119,7 @@ object StreamValidationOps { val messageJson = Json.fromFields( List( - (TypeParameter.name, "reason".asJson), + (TypeParameter.name, "error".asJson), (ContentParameter.name, contentJson) ) ) diff --git a/version.sbt b/version.sbt index 3cdf5447..b17b6165 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.8" +ThisBuild / version := "0.2.9" diff --git a/website/project/build.properties b/website/project/build.properties new file mode 100644 index 00000000..c8fcab54 --- /dev/null +++ b/website/project/build.properties @@ -0,0 +1 @@ +sbt.version=1.6.2 diff --git a/website/sidebars.js b/website/sidebars.js index 8770db44..46baf9b5 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -24,7 +24,7 @@ module.exports = { { type: "category", label: "API Usage", - items: ["api-usage/usage_cli"], + items: ["api-usage/usage_cli", "api-usage/streaming"], collapsed: false }, @@ -38,11 +38,12 @@ module.exports = { /* Category: documentation */ { - type: "category", label: "Additional documentation", items: [{ - type: "link", label: "Scaladoc", href: scalaDocUrl - }, { - type: "link", label: "API Docs (Swagger Hub)", href: apiDocsUrl - }], collapsed: false + type: "category", label: "Additional documentation", items: [ + { + type: "link", label: "Scaladoc", href: scalaDocUrl + }, { + type: "link", label: "API Docs (Swagger Hub)", href: apiDocsUrl + }], collapsed: false }, /* Webpage information */ diff --git a/website/yarn.lock b/website/yarn.lock index ce0c7b4c..b9dd3390 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -3027,15 +3027,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001219: - version "1.0.30001237" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz" - integrity sha512-pDHgRndit6p1NR2GhzMbQ6CkRrp4VKuSsqbcLeOQppYPKOYkKT/6ZvZDvKJUqcmtyWIAHuZq3SVS2vc1egCZzw== - -caniuse-lite@^1.0.30001332, caniuse-lite@^1.0.30001334: - version "1.0.30001335" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001335.tgz" - integrity sha512-ddP1Tgm7z2iIxu6QTtbZUv6HJxSaV/PZeSrWFZtbY4JZ69tOeNhBCl3HyRQgeNZKE5AOn1kpV7fhljigy0Ty3w== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001332, caniuse-lite@^1.0.30001334: + version "1.0.30001336" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001336.tgz" + integrity sha512-/YxSlBmL7iKXTbIJ48IQTnAOBk7XmWsxhBF1PZLOko5Dt9qc4Pl+84lfqG3Tc4EuavurRn1QLoVJGxY2iSycfw== ccount@^1.0.0, ccount@^1.0.3: version "1.1.0" From 7ef89969cbb9d7a49dc54a53be350d1a800c4d58 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Thu, 5 May 2022 17:18:45 +0200 Subject: [PATCH 33/50] Refactored class tree for streaming validations. --- build.sbt | 2 +- .../operations/stream/StreamValidation.scala} | 16 ++++++++-------- .../StreamValidationConfiguration.scala | 2 +- .../StreamValidationExtractorConfiguration.scala | 2 +- .../StreamValidationStreamConfiguration.scala | 2 +- .../StreamValidationValidatorConfiguration.scala | 2 +- .../transformations/CometTransformations.scala | 6 +++--- .../ValidationResultTransformations.scala | 2 +- .../WebSocketTransformations.scala | 2 +- .../routes/schema/service/SchemaService.scala | 2 +- .../{stream => }/SchemaValidateStreamInput.scala | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/{service/operations/stream/ops/StreamValidationOps.scala => logic/operations/stream/StreamValidation.scala} (93%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/{service => logic}/operations/stream/configuration/StreamValidationConfiguration.scala (97%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/{service => logic}/operations/stream/configuration/StreamValidationExtractorConfiguration.scala (97%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/{service => logic}/operations/stream/configuration/StreamValidationStreamConfiguration.scala (94%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/{service => logic}/operations/stream/configuration/StreamValidationValidatorConfiguration.scala (97%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/{ => operations}/stream/transformations/CometTransformations.scala (96%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/{ => operations}/stream/transformations/ValidationResultTransformations.scala (93%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/{ => operations}/stream/transformations/WebSocketTransformations.scala (93%) rename modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/{stream => }/SchemaValidateStreamInput.scala (89%) diff --git a/build.sbt b/build.sbt index 3cd943c7..16ab8239 100644 --- a/build.sbt +++ b/build.sbt @@ -295,7 +295,7 @@ lazy val cometVersion = "0.1.7" lazy val mongodbVersion = "4.6.0" lazy val mongo4catsVersion = "0.4.7" lazy val any23Version = "2.7" -lazy val rdf4jVersion = "3.7.6" +lazy val rdf4jVersion = "4.0.0" lazy val graphvizJavaVersion = "0.18.1" lazy val logbackVersion = "1.2.11" lazy val scalaLoggingVersion = "3.9.4" diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/StreamValidation.scala similarity index 93% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/StreamValidation.scala index c61eb0cf..6a3147d7 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/ops/StreamValidationOps.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/StreamValidation.scala @@ -1,22 +1,22 @@ -package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.ops +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream import cats.effect.IO import cats.effect.std.Queue -import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.CometTransformations.toValidationStream -import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.ValidationResultTransformations.ValidationResultOps -import es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations.WebSocketTransformations.encoder +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.StreamValidation.WebSocketClosures._ +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations.CometTransformations.toValidationStream +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations.ValidationResultTransformations.ValidationResultOps +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations.WebSocketTransformations.encoder import es.weso.rdfshape.server.api.routes.schema.service.SchemaService -import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.SchemaValidateStreamInput -import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.ops.StreamValidationOps.WebSocketClosures._ +import es.weso.rdfshape.server.api.routes.schema.service.operations.SchemaValidateStreamInput import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ ContentParameter, MessageParameter, ReasonParameter, TypeParameter } +import fs2.Stream import io.circe.syntax.EncoderOps import io.circe.{DecodingFailure, Json, ParsingFailure} -import fs2._ import org.apache.kafka.common.KafkaException import org.http4s.websocket.WebSocketFrame import org.ragna.comet.exception.stream.timed.StreamTimeoutException @@ -27,7 +27,7 @@ import org.ragna.comet.exception.stream.validations.{ } import org.ragna.comet.validation.result.ValidationResult -object StreamValidationOps { +object StreamValidation { /** Given an input queue with WebSocket messages, parse these messages in search * for instructions to validate data and, if available, start running a diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationConfiguration.scala similarity index 97% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationConfiguration.scala index 4dcd669d..f49938be 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationConfiguration.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.configuration import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ ExtractorParameter, diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationExtractorConfiguration.scala similarity index 97% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationExtractorConfiguration.scala index 82eae376..cb17c893 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationExtractorConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationExtractorConfiguration.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.configuration import cats.implicits.toBifunctorOps import es.weso.rdf.InferenceEngine diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationStreamConfiguration.scala similarity index 94% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationStreamConfiguration.scala index ac28e692..b4f43d4c 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationStreamConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationStreamConfiguration.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.configuration import cats.implicits.toBifunctorOps import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationValidatorConfiguration.scala similarity index 97% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationValidatorConfiguration.scala index 06349cc6..b8d58972 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/configuration/StreamValidationValidatorConfiguration.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/configuration/StreamValidationValidatorConfiguration.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.configuration import cats.effect.unsafe.implicits.global import es.weso.rdfshape.server.api.routes.schema.logic.trigger.TriggerMode diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/CometTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/CometTransformations.scala similarity index 96% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/CometTransformations.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/CometTransformations.scala index eca6ec2a..c8e7caaf 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/CometTransformations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/CometTransformations.scala @@ -1,12 +1,12 @@ -package es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations import cats.effect.IO -import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.SchemaValidateStreamInput -import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration.{ +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.configuration.{ StreamValidationExtractorConfiguration, StreamValidationStreamConfiguration, StreamValidationValidatorConfiguration } +import es.weso.rdfshape.server.api.routes.schema.service.operations.SchemaValidateStreamInput import fs2.Pipe import org.ragna.comet.exception.stream.timed.StreamTimeoutException import org.ragna.comet.implicits.RDFElementImplicits._ diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/ValidationResultTransformations.scala similarity index 93% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/ValidationResultTransformations.scala index 5ecc4bc9..b738f6aa 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/ValidationResultTransformations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/ValidationResultTransformations.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters.{ ContentParameter, diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/WebSocketTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/WebSocketTransformations.scala similarity index 93% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/WebSocketTransformations.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/WebSocketTransformations.scala index ee7fe683..8ac51623 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/stream/transformations/WebSocketTransformations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/WebSocketTransformations.scala @@ -1,4 +1,4 @@ -package es.weso.rdfshape.server.api.routes.schema.logic.stream.transformations +package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations import es.weso.rdfshape.server.utils.error.exceptions.UnexpectedWebSocketFrameException import io.circe.{Encoder, Json, ParsingFailure, parser} diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala index 2c8bf29f..f5d89eb1 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/SchemaService.scala @@ -9,13 +9,13 @@ import es.weso.rdfshape.server.api.format.dataFormats.schemaFormats.{ ShaclFormat } import es.weso.rdfshape.server.api.routes.ApiService +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.StreamValidation.mkValidationStream import es.weso.rdfshape.server.api.routes.schema.logic.operations.{ SchemaConvert, SchemaInfo, SchemaValidate } import es.weso.rdfshape.server.api.routes.schema.service.operations.SchemaConvertInput.decoder -import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.ops.StreamValidationOps.mkValidationStream import es.weso.rdfshape.server.api.routes.schema.service.operations.{ SchemaConvertInput, SchemaInfoInput, diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/SchemaValidateStreamInput.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaValidateStreamInput.scala similarity index 89% rename from modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/SchemaValidateStreamInput.scala rename to modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaValidateStreamInput.scala index 0ba14935..1ef1a6c0 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/stream/SchemaValidateStreamInput.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/service/operations/SchemaValidateStreamInput.scala @@ -1,7 +1,7 @@ -package es.weso.rdfshape.server.api.routes.schema.service.operations.stream +package es.weso.rdfshape.server.api.routes.schema.service.operations import es.weso.rdfshape.server.api.ServiceRouteOperation -import es.weso.rdfshape.server.api.routes.schema.service.operations.stream.configuration.StreamValidationConfiguration +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.configuration.StreamValidationConfiguration import es.weso.rdfshape.server.api.utils.parameters.IncomingRequestParameters._ import io.circe.{Decoder, HCursor} From 2f62f696e059f7bfae7c0081e1e9931d57142828 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Sat, 7 May 2022 09:56:12 +0200 Subject: [PATCH 34/50] Log messages describe the streaming validation process. --- .../operations/stream/StreamValidation.scala | 221 +++++++++--------- .../CometTransformations.scala | 4 +- .../server/utils/error/ExitCodes.scala | 4 + 3 files changed, 124 insertions(+), 105 deletions(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/StreamValidation.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/StreamValidation.scala index 6a3147d7..b82d0eeb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/StreamValidation.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/StreamValidation.scala @@ -2,7 +2,8 @@ package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream import cats.effect.IO import cats.effect.std.Queue -import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.StreamValidation.WebSocketClosures._ +import com.typesafe.scalalogging.LazyLogging +import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.WebSocketClosures._ import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations.CometTransformations.toValidationStream import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations.ValidationResultTransformations.ValidationResultOps import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations.WebSocketTransformations.encoder @@ -27,7 +28,7 @@ import org.ragna.comet.exception.stream.validations.{ } import org.ragna.comet.validation.result.ValidationResult -object StreamValidation { +object StreamValidation extends LazyLogging { /** Given an input queue with WebSocket messages, parse these messages in search * for instructions to validate data and, if available, start running a @@ -36,6 +37,8 @@ object StreamValidation { * This is the core of the [[SchemaService]] stream validation service and * further info can be found there. * + * Log messages are registered along the way. + * * @param queue Queue structure from which this stream will read WebSocket * messages * @return A Stream of WebSocket frames sent back to the client, each of @@ -49,6 +52,9 @@ object StreamValidation { /* 0. Get input data stream. * Poll the queue to see if new messages arrived from the client */ .fromQueueNoneTerminated(queue) + .evalTap(_ => + IO(logger.info("Begun streaming validation through WebSockets")) + ) /* 1. WebSocketFrame => JSON. * Mapping: attempt to parse JSON out of the client message */ .map(_.asJson) @@ -60,6 +66,9 @@ object StreamValidation { case Left(err) => IO.raiseError(err) case Right(value) => IO.pure(value) }) + .evalTap(_ => + IO(logger.debug("Decoded client's streaming validation request")) + ) /* 3. Stream[IO, SchemaValidateStreamInput] => * Stream[IO,ValidationResult]. * Pipe: create a comet validation stream from the parsed configuration. @@ -75,12 +84,17 @@ object StreamValidation { * 2. A closing frame with code and reason dependant on the error. */ .handleErrorWith(err => { Stream.evalSeq(IO { + logger.debug(s"Interrupted streaming validation due to err: $err") List(mkErrorFrame(err), mkClosingFrame(err)) }) /* 6. Graceful stop. * If the validations stream comes to an end, concatenate a graceful * closing frame */ - }) ++ Stream.eval(IO(standardClosure.closingFrame)) + }) ++ Stream + .eval(IO(standardClosure.closingFrame)) + .onFinalize( + IO(logger.info("Ended streaming validation through WebSockets")) + ) } /** Given an error/exception, produce a WebSockets frame explaining it @@ -157,121 +171,120 @@ object StreamValidation { case _ => unknownErrorClosure.closingFrame } +} + +/** Set of constants/utils used for closing connections + * in the WebSockets streaming validation + */ +private[stream] object WebSocketClosures { - /** Set of constants/utils used for closing connections - * in the WebSockets streaming validation + /** Generate a closing frame with the default code for success + * and an informational message */ - private[stream] object WebSocketClosures { + def standardClosure: WebSocketClosure = + WebSocketClosure(1000, "Connection finished") - /** Generate a closing frame with the default code for success - * and an informational message - */ - def standardClosure: WebSocketClosure = - WebSocketClosure(1000, "Connection finished") + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when data sent by the client was not readable as JSON + */ + def invalidJsonClosure: WebSocketClosure = + WebSocketClosure(3000, "The message did not contain valid JSON data") - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when data sent by the client was not readable as JSON - */ - def invalidJsonClosure: WebSocketClosure = - WebSocketClosure(3000, "The message did not contain valid JSON data") + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when data sent by the client was readable but its contents + * were not valid + */ + def invalidConfigurationClosure: WebSocketClosure = + WebSocketClosure( + 3001, + "The message did not contain a valid configuration" + ) - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when data sent by the client was readable but its contents - * were not valid - */ - def invalidConfigurationClosure: WebSocketClosure = - WebSocketClosure( - 3001, - "The message did not contain a valid configuration" - ) + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because an item was invalid + * and was configured to do so + */ + def invalidItemClosure: WebSocketClosure = + WebSocketClosure( + 3002, + "An item was invalid" + ) - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when the validation stopped because an item was invalid - * and was configured to do so - */ - def invalidItemClosure: WebSocketClosure = - WebSocketClosure( - 3002, - "An item was invalid" - ) + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because an item validation + * threw an error and was configured to do so + */ + def erroredItemClosure: WebSocketClosure = + WebSocketClosure( + 3003, + "An error occurred while validating an item" + ) - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when the validation stopped because an item validation - * threw an error and was configured to do so - */ - def erroredItemClosure: WebSocketClosure = - WebSocketClosure( - 3003, - "An error occurred while validating an item" - ) + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when the validation stopped because no items were + * validated for some time + */ + def timeoutClosure: WebSocketClosure = + WebSocketClosure( + 3004, + "No items were received for a while" + ) - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when the validation stopped because no items were - * validated for some time - */ - def timeoutClosure: WebSocketClosure = - WebSocketClosure( - 3004, - "No items were received for a while" - ) + def illegalArgumentClosure: WebSocketClosure = + WebSocketClosure( + 3005, + "The configuration contained invalid values" + ) - def illegalArgumentClosure: WebSocketClosure = - WebSocketClosure( - 3005, - "The configuration contained invalid values" - ) + def assertionClosure: WebSocketClosure = + WebSocketClosure( + 3006, + "An invalid value was provided to the server" + ) - def assertionClosure: WebSocketClosure = - WebSocketClosure( - 3006, - "An invalid value was provided to the server" - ) + def kafkaClosure: WebSocketClosure = + WebSocketClosure( + 3007, + "An error occurred connecting to the Kafka stream" + ) - def kafkaClosure: WebSocketClosure = - WebSocketClosure( - 3007, - "An error occurred connecting to the Kafka stream" - ) + /** Generate a closing frame with an assigned error code, + * and an informational message + * + * Meant to be used when an unexpected error occurred + */ + def unknownErrorClosure: WebSocketClosure = + WebSocketClosure( + 4999, + "Connection closed due to an unknown error" + ) - /** Generate a closing frame with an assigned error code, - * and an informational message - * - * Meant to be used when an unexpected error occurred - */ - def unknownErrorClosure: WebSocketClosure = - WebSocketClosure( - 4999, - "Connection closed due to an unknown error" - ) + /** Data required to create a WebSocket closing frame, specially used for + * erroring connection closures + * + * @param code Code sent when closing the connection + * @param reason Reason why the connection is closed + * @note [[reason]] should be kept as short as possible due to size limitations + * @see [[https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters]] + */ + case class WebSocketClosure(code: Int, reason: String) { - /** Data required to create a WebSocket closing frame, specially used for - * erroring connection closures + /** Create a WebSocket closing frame with this instance's code and reason. * - * @param code Code sent when closing the connection - * @param reason Reason why the connection is closed - * @note [[reason]] should be kept as short as possible due to size limitations - * @see [[https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters]] + * In case of errors, resort to the default closing frame. */ - case class WebSocketClosure(code: Int, reason: String) { - - /** Create a WebSocket closing frame with this instance's code and reason. - * - * In case of errors, resort to the default closing frame. - */ - lazy val closingFrame: WebSocketFrame.Close = WebSocketFrame - .Close(code, reason) - .getOrElse(WebSocketFrame.Close()) - } + lazy val closingFrame: WebSocketFrame.Close = WebSocketFrame + .Close(code, reason) + .getOrElse(WebSocketFrame.Close()) } - } diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/CometTransformations.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/CometTransformations.scala index c8e7caaf..6e21fa13 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/CometTransformations.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/routes/schema/logic/operations/stream/transformations/CometTransformations.scala @@ -1,6 +1,7 @@ package es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.transformations import cats.effect.IO +import com.typesafe.scalalogging.LazyLogging import es.weso.rdfshape.server.api.routes.schema.logic.operations.stream.configuration.{ StreamValidationExtractorConfiguration, StreamValidationStreamConfiguration, @@ -43,7 +44,7 @@ import scala.language.postfixOps * halted when no items are received (even if the client does not disconnect), * thus server resources are not wasted */ -private[schema] object CometTransformations { +private[schema] object CometTransformations extends LazyLogging { /** Time that the server will wait without receiving any items for the input * stream before raising a [[StreamTimeoutException]] @@ -61,6 +62,7 @@ private[schema] object CometTransformations { def toValidationStream : Pipe[IO, SchemaValidateStreamInput, ValidationResult] = _.flatMap { streamValidationInput => + logger.info("Creating a stream of validation results") // 0. De-structure the required configurations from client input val baseConfig = streamValidationInput.configuration // 1. Build comet kafka extractor diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/ExitCodes.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/ExitCodes.scala index bcaa054d..b8cb548a 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/ExitCodes.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/utils/error/ExitCodes.scala @@ -7,6 +7,10 @@ case object ExitCodes { /** Exit code on successful program execution */ val SUCCESS = 0 + // CLOSING SIGNAL + /** Exit code on received signal: SIGINT, SIGTERM + */ + val SIGNAL_RECEIVED = 8 // CLI ERRORS /** Exit code on CLI argument parsing error */ From 212d4a21f3939d0f414a4f28ac318bb9600b1a48 Mon Sep 17 00:00:00 2001 From: Eduardo Ulibarri Toledo <35763574+ulitol97@users.noreply.github.com> Date: Sat, 7 May 2022 13:36:28 +0200 Subject: [PATCH 35/50] Update version.sbt --- version.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.sbt b/version.sbt index b17b6165..611e213a 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.2.9" +ThisBuild / version := "0.2.10" From 8991e50978fe556538083b7979b1177905d4e793 Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Mon, 9 May 2022 18:00:57 +0200 Subject: [PATCH 36/50] Changed shapeMap parameter name --- .../es/weso/rdfshape/server/api/swagger/package.scala | 10 ++++++++++ .../utils/parameters/IncomingRequestParameters.scala | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala index 73237859..c4a344df 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/swagger/package.scala @@ -48,6 +48,16 @@ import java.net.URL import scala.reflect.runtime.universe import scala.reflect.runtime.universe.typeOf +/** @note For the streaming validations endpoint, remember to add some responses + * information manually into the generated swagger-file, e.g.: + * responses: + * '200': + * description: Dummy response, a WebSockets connection should start + * '400': + * description: A non-WebSockets request was received + * '500': + * description: Handshake failed + */ package object swagger { // Import all models diff --git a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala index c7d95865..9b4e36cb 100644 --- a/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala +++ b/modules/server/src/main/scala/es/weso/rdfshape/server/api/utils/parameters/IncomingRequestParameters.scala @@ -28,7 +28,7 @@ object IncomingRequestParameters { lazy val node = "node" lazy val nodeSelector = "nodeSelector" - lazy val shapeMap = "shapeMap" + lazy val shapeMap = "shape-map" lazy val shapeMapFormat = "shapeMapFormat" lazy val query = "query" From 03ddbb4ef2ae0de640f858f999a12eb8c025d30b Mon Sep 17 00:00:00 2001 From: ulitol97 Date: Tue, 10 May 2022 17:34:10 +0200 Subject: [PATCH 37/50] Removed excessive Kafka logs, 'shapeMap' => 'shape-map' --- build.sbt | 2 +- docs/api-usage/streaming.md | 8 ++++++-- modules/server/src/main/resources/logback.xml | 2 ++ .../data/logic/operations/DataExtract.scala | 11 +++++++++-- .../schema/logic/trigger/TriggerShapeMap.scala | 15 ++++++++++----- .../shapemap/logic/operations/ShapeMapInfo.scala | 3 ++- 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/build.sbt b/build.sbt index 16ab8239..f6b182eb 100644 --- a/build.sbt +++ b/build.sbt @@ -293,7 +293,7 @@ lazy val catsVersion = "2.7.0" lazy val cometVersion = "0.1.7" /* ------------------------------------------------------------------------- */ lazy val mongodbVersion = "4.6.0" -lazy val mongo4catsVersion = "0.4.7" +lazy val mongo4catsVersion = "0.4.8" lazy val any23Version = "2.7" lazy val rdf4jVersion = "4.0.0" lazy val graphvizJavaVersion = "0.18.1" diff --git a/docs/api-usage/streaming.md b/docs/api-usage/streaming.md index 083598a8..712aef6a 100644 --- a/docs/api-usage/streaming.md +++ b/docs/api-usage/streaming.md @@ -78,6 +78,9 @@ the validation should be performed, including: - _port_ (Optional): Port from which the Kafka server is streaming data. Default: `9092`. - _topic_: Topic on which the Kafka server is streaming data. + - _groupId_ (Optional): Group that the Kafka consumer shall identify + with. Useful to resume validations where they left off. Default: + string with the name of the app: (`appName-appVersion`). ```json title="Example client message requesting a streaming validation" { @@ -92,7 +95,7 @@ the validation should be performed, including: "source": "byText" }, "triggerMode": { - "shapeMap": { + "shape-map": { "content": "ex:reading@ex:ValidReading", "format": "Compact", "source": "byText" @@ -109,7 +112,8 @@ the validation should be performed, including: "stream": { "server": "localhost", "port": 9092, - "topic": "rdf" + "topic": "rdf", + "groupId": "myGroup" } } } diff --git a/modules/server/src/main/resources/logback.xml b/modules/server/src/main/resources/logback.xml index 0d716dab..aa52bc98 100644 --- a/modules/server/src/main/resources/logback.xml +++ b/modules/server/src/main/resources/logback.xml @@ -87,6 +87,8 @@ + +