diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index 421515d5..2c97ebee 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,3 +1,3 @@ { - ".": "0.13.3" + ".": "0.13.4" } diff --git a/.github/workflows/sbt-tests.yml b/.github/workflows/sbt-tests.yml index 05712822..e7f3d951 100644 --- a/.github/workflows/sbt-tests.yml +++ b/.github/workflows/sbt-tests.yml @@ -29,4 +29,4 @@ jobs: apps: sbt - name: Run tests - run: sbt test + run: env JAVA_OPTS="-Xmx4G" sbt test diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c3920ae..40badfc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.13.4](https://github.com/fluencelabs/aqua/compare/aqua-v0.13.3...aqua-v0.13.4) (2024-01-11) + + +### Features + +* **compiler:** `for ... rec` [LNG-307] ([#1026](https://github.com/fluencelabs/aqua/issues/1026)) ([ae32f80](https://github.com/fluencelabs/aqua/commit/ae32f8027729bfd463cddc57f857c307e1e3c709)) +* **compiler:** Enhance message of type error [LNG-313] ([#1033](https://github.com/fluencelabs/aqua/issues/1033)) ([d5cd77b](https://github.com/fluencelabs/aqua/commit/d5cd77bb865433fdff46fefb48875bf8f5e585dc)) + + +### Bug Fixes + +* **compiler:** Add outside context to closures [LNG-317] ([#1038](https://github.com/fluencelabs/aqua/issues/1038)) ([85f3ecd](https://github.com/fluencelabs/aqua/commit/85f3ecdf3985c8bd3a4c68fb827968b79516f9b3)) +* **compiler:** Passing closures with abilities [LNG-314] ([#1035](https://github.com/fluencelabs/aqua/issues/1035)) ([5241f52](https://github.com/fluencelabs/aqua/commit/5241f522d8bc58649f4048aada034e3cbe320eb7)) +* **compiler:** Type check arrow calls on services and abilities [LNG-315] ([#1037](https://github.com/fluencelabs/aqua/issues/1037)) ([d46ee03](https://github.com/fluencelabs/aqua/commit/d46ee0347fee94055a6690a4d4b8d0e1cf29430c)) + ## [0.13.3](https://github.com/fluencelabs/aqua/compare/aqua-v0.13.2...aqua-v0.13.3) (2023-12-22) diff --git a/api/api-npm/package.json b/api/api-npm/package.json index 5cfacd67..d8f13637 100644 --- a/api/api-npm/package.json +++ b/api/api-npm/package.json @@ -1,6 +1,6 @@ { "name": "@fluencelabs/aqua-api", - "version": "0.13.3", + "version": "0.13.4", "description": "Aqua API", "type": "module", "main": "index.js", @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/fluencelabs/aqua#readme", "devDependencies": { - "@fluencelabs/interfaces": "0.9.0", + "@fluencelabs/interfaces": "0.10.0", "prettier": "3.1.1" } } diff --git a/api/api/.js/src/main/scala/api/AquaAPI.scala b/api/api/.js/src/main/scala/api/AquaAPI.scala index e63d6384..cea82a62 100644 --- a/api/api/.js/src/main/scala/api/AquaAPI.scala +++ b/api/api/.js/src/main/scala/api/AquaAPI.scala @@ -19,8 +19,6 @@ import aqua.logging.{LogFormatter, LogLevels} import aqua.model.AquaContext import aqua.model.transform.{Transform, TransformConfig} import aqua.parser.lexer.{LiteralToken, Token} -import aqua.parser.lift.FileSpan.F -import aqua.parser.lift.{FileSpan, Span} import aqua.parser.{ArrowReturnError, BlockIndentError, LexerError, ParserError} import aqua.raw.ops.Call import aqua.raw.ops.CallArrowRawTag diff --git a/api/api/.jvm/src/main/scala/aqua/api/Test.scala b/api/api/.jvm/src/main/scala/aqua/api/Test.scala index f587abaa..d81c0041 100644 --- a/api/api/.jvm/src/main/scala/aqua/api/Test.scala +++ b/api/api/.jvm/src/main/scala/aqua/api/Test.scala @@ -6,7 +6,6 @@ import aqua.compiler.AquaCompiled import aqua.files.FileModuleId import cats.data.Chain -import cats.data.Validated.{Invalid, Valid} import cats.effect.{IO, IOApp} import fs2.io.file.{Files, Path} import fs2.{Stream, text} @@ -14,14 +13,16 @@ import fs2.{Stream, text} object Test extends IOApp.Simple { override def run: IO[Unit] = { + APICompilation .compilePath( "./aqua-src/antithesis.aqua", Imports.fromMap(Map("/" -> Map("" -> List("./aqua")))), AquaAPIConfig(targetType = TypeScriptType), TypeScriptBackend(false, "IFluenceClient$$") - ) - .flatMap { res => + ).timed + .flatMap { case (duration, res) => + println("Compilation time: " + duration.toMillis) val (warnings, result) = res.value.run IO.delay { diff --git a/api/api/src/main/scala/aqua/api/APICompilation.scala b/api/api/src/main/scala/aqua/api/APICompilation.scala index d44685ce..0191e065 100644 --- a/api/api/src/main/scala/aqua/api/APICompilation.scala +++ b/api/api/src/main/scala/aqua/api/APICompilation.scala @@ -16,7 +16,7 @@ import aqua.parser.expr.AbilityExpr.p import aqua.parser.lexer.{LiteralToken, Token} import aqua.parser.lift.FileSpan.F import aqua.parser.lift.{FileSpan, Span} -import aqua.parser.{ArrowReturnError, BlockIndentError, LexerError, ParserError} +import aqua.parser.{ArrowReturnError, LexerError, ParserError} import aqua.raw.ConstantRaw import aqua.raw.ops.Call import aqua.raw.value.ValueRaw diff --git a/aqua-run/src/main/scala/aqua/run/RunPreparer.scala b/aqua-run/src/main/scala/aqua/run/RunPreparer.scala index 003d448e..279d01fd 100644 --- a/aqua-run/src/main/scala/aqua/run/RunPreparer.scala +++ b/aqua-run/src/main/scala/aqua/run/RunPreparer.scala @@ -2,7 +2,6 @@ package aqua.run import aqua.backend.air.FuncAirGen import aqua.definitions.{FunctionDef, TypeDefinition} -import aqua.io.OutputPrinter import aqua.model.transform.{Transform, TransformConfig} import aqua.model.{FuncArrow, ValueModel, VarModel} import aqua.parser.lexer.CallArrowToken @@ -10,6 +9,7 @@ import aqua.parser.lift.Span import aqua.raw.ops.{Call, CallArrowRawTag, SeqTag} import aqua.raw.value.{LiteralRaw, ValueRaw, VarRaw} import aqua.types.* + import cats.data.Validated.{invalid, invalidNec, invalidNel, validNec, validNel} import cats.data.{NonEmptyList, Validated, ValidatedNec} import cats.effect.kernel.Async @@ -18,8 +18,7 @@ import cats.syntax.flatMap.* import cats.syntax.partialOrder.* import cats.syntax.show.* import cats.syntax.traverse.* -import cats.{~>, Id} - +import cats.{Id, ~>} import scala.collection.immutable.SortedMap import scala.concurrent.ExecutionContext diff --git a/aqua-src/antithesis.aqua b/aqua-src/antithesis.aqua index 04fd9406..446f57b9 100644 --- a/aqua-src/antithesis.aqua +++ b/aqua-src/antithesis.aqua @@ -1,3 +1,33 @@ -func arr() -> string: - n = "str" - <- n \ No newline at end of file +aqua M + +export returnSrvAsAbility + +ability MyAb: + call() -> string + +service MySrv("default-id"): + call() -> string + +func mySrvDefault() -> MyAb: + <- MySrv + +func mySrvResolved() -> MyAb: + MySrv "resolved-id" + <- MySrv + +func mySrvThird() -> MyAb: + MySrv "third-id" + <- MySrv + +func useMyAb{MyAb}() -> string: + <- MyAb.call() + +func returnSrvAsAbility() -> []string: + result: *string + MySrvDefault <- mySrvDefault() + MySrvResolved <- mySrvResolved() + MySrvThird <- mySrvThird() + result <- useMyAb{MySrvDefault}() + result <- useMyAb{MySrvResolved}() + result <- useMyAb{MySrvThird}() + <- result \ No newline at end of file diff --git a/backend/air/src/main/scala/aqua/backend/air/Air.scala b/backend/air/src/main/scala/aqua/backend/air/Air.scala index 56a7bf22..b619b29a 100644 --- a/backend/air/src/main/scala/aqua/backend/air/Air.scala +++ b/backend/air/src/main/scala/aqua/backend/air/Air.scala @@ -120,42 +120,77 @@ object Air { case class Comment(comment: String, air: Air) extends Air(Keyword.NA) - private def show(depth: Int, air: Air): String = { - def showNext(a: Air) = show(depth + 1, a) + private def showInternal(space: String, sb: StringBuilder, air: Air): Unit = { - val space = " " * depth + def showNext(a: Air): Unit = showInternal(space + " ", sb, a) air match { case Air.Comment(c, a) => - space + "; " + c.replace("\n", "\n" + space + "; ") + "\n" + - show(depth, a) - case _ => - s"$space(${air.keyword.value}" + - (air match { - case Air.Null ⇒ "" - case Air.Never ⇒ "" - case Air.Next(label) ⇒ s" $label" - case Air.New(item, inst) ⇒ s" ${item.show}\n${showNext(inst)}$space" - case Air.Fold(iter, label, inst, lastInst) ⇒ - val l = show(depth + 1, lastInst) - s" ${iter.show} $label\n${showNext(inst)}$l$space" - case Air.Match(left, right, inst) ⇒ - s" ${left.show} ${right.show}\n${showNext(inst)}$space" - case Air.Mismatch(left, right, inst) ⇒ - s" ${left.show} ${right.show}\n${showNext(inst)}$space" - case Air.Par(l, r) ⇒ s"\n${showNext(l)}${showNext(r)}$space" - case Air.Seq(l, r) ⇒ s"\n${showNext(l)}${showNext(r)}$space" - case Air.Xor(l, r) ⇒ s"\n${showNext(l)}${showNext(r)}$space" - case Air.Call(triplet, args, res) ⇒ - s" ${triplet.show} [${args.map(_.show).mkString(" ")}]${res.fold("")(" " + _)}" - case Air.Ap(operand, result) ⇒ s" ${operand.show} $result" - case Air.ApStreamMap(key, operand, result) ⇒ s" (${key.show} ${operand.show}) $result" - case Air.Fail(operand) => s" ${operand.show}" - case Air.Canon(operand, peerId, result) ⇒ s" ${peerId.show} ${operand.show} $result" - case Air.Comment(_, _) => ";; Should not be displayed" - }) + ")\n" - } + sb.append(space) + .append("; ") + .append(c.replace("\n", "\n" + space + "; ")) + .append("\n") + showInternal(space, sb, a) + + case _ => + sb.append(s"$space(${air.keyword.value}") + (air match { + case Air.Null ⇒ + case Air.Never ⇒ + case Air.Next(label) ⇒ sb.append(s" $label") + case Air.New(item, inst) ⇒ + sb.append(s" ${item.show}\n") + showNext(inst) + sb.append(space) + case Air.Fold(iter, label, inst, lastInst) ⇒ + sb.append(" ").append(s" ${iter.show} $label\n") + showNext(inst) + showNext(lastInst) + sb.append(space) + case Air.Match(left, right, inst) ⇒ + sb.append(s" ${left.show} ${right.show}\n") + showNext(inst) + sb.append(space) + case Air.Mismatch(left, right, inst) ⇒ + sb.append(s" ${left.show} ${right.show}\n") + showNext(inst) + sb.append(space) + case Air.Par(l, r) ⇒ + sb.append("\n") + showNext(l) + showNext(r) + sb.append(space) + case Air.Seq(l, r) ⇒ + sb.append("\n") + showNext(l) + showNext(r) + sb.append(space) + case Air.Xor(l, r) ⇒ + sb.append("\n") + showNext(l) + showNext(r) + sb.append(space) + case Air.Call(triplet, args, res) ⇒ + sb.append(s" ${triplet.show} [${args.map(_.show).mkString(" ")}]${res.fold("")(" " + _)}") + case Air.Ap(operand, result) ⇒ + sb.append(s" ${operand.show} $result") + case Air.ApStreamMap(key, operand, result) ⇒ + sb.append(s" (${key.show} ${operand.show}) $result") + case Air.Fail(operand) => sb.append(s" ${operand.show}") + case Air.Canon(operand, peerId, result) ⇒ + sb.append(s" ${peerId.show} ${operand.show} $result") + case Air.Comment(_, _) => ";; Should not be displayed" + }) + sb.append(")\n") + } + } + + private def show(depth: Int, air: Air): String = { + val sb = StringBuilder() + val space = " " * depth + showInternal(space, sb, air) + sb.result() } implicit val s: Show[Air] = Show.show(show(0, _)) diff --git a/build.sbt b/build.sbt index 9aaea368..61167dba 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ import BundleJS.* -val aquaVersion = "0.13.3" +val aquaVersion = "0.13.4" val scalaV = "3.3.1" val catsV = "2.10.0" @@ -10,7 +10,7 @@ val scalaTestV = "3.2.17" val scalaTestScalaCheckV = "3.2.17.0" val sourcecodeV = "0.3.0" // Snapshot is used to get latest fixes -val fs2V = "3.9.3-37-8badc91-SNAPSHOT" +val fs2V = "3.10-365636d" val catsEffectV = "3.6-1f95fd7" val declineV = "2.3.0" val circeVersion = "0.14.2" @@ -188,7 +188,7 @@ lazy val inline = crossProject(JVMPlatform, JSPlatform) .crossType(CrossType.Pure) .in(file("model/inline")) .settings(commons) - .dependsOn(raw, model) + .dependsOn(raw, model, mangler) lazy val transform = crossProject(JVMPlatform, JSPlatform) .withoutSuffixFor(JVMPlatform) @@ -207,7 +207,7 @@ lazy val semantics = crossProject(JVMPlatform, JSPlatform) "dev.optics" %%% "monocle-macro" % monocleV ) ) - .dependsOn(raw, parser, errors) + .dependsOn(raw, parser, errors, mangler) lazy val compiler = crossProject(JVMPlatform, JSPlatform) .withoutSuffixFor(JVMPlatform) @@ -253,6 +253,17 @@ lazy val logging = crossProject(JVMPlatform, JSPlatform) ) ) +lazy val mangler = crossProject(JVMPlatform, JSPlatform) + .withoutSuffixFor(JVMPlatform) + .crossType(CrossType.Pure) + .in(file("utils/mangler")) + .settings(commons) + .settings( + libraryDependencies ++= Seq( + "org.typelevel" %%% "cats-core" % catsV + ) + ) + lazy val constants = crossProject(JVMPlatform, JSPlatform) .withoutSuffixFor(JVMPlatform) .crossType(CrossType.Pure) diff --git a/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala b/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala index 66b7c744..bb67fac2 100644 --- a/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala +++ b/compiler/src/main/scala/aqua/compiler/AquaCompiler.scala @@ -1,30 +1,20 @@ package aqua.compiler -import aqua.backend.Backend import aqua.compiler.AquaError.{ParserError as AquaParserError, *} +import aqua.linker.Linker.link import aqua.linker.{AquaModule, Linker, Modules} -import aqua.model.AquaContext -import aqua.parser.lift.{LiftParser, Span} import aqua.parser.{Ast, ParserError} -import aqua.raw.RawPart.Parts -import aqua.raw.{RawContext, RawPart} -import aqua.res.AquaRes -import aqua.semantics.header.{HeaderHandler, HeaderSem, Picker} -import aqua.semantics.{CompilerState, Semantics} -import aqua.semantics.{SemanticError, SemanticWarning} +import aqua.semantics.header.{HeaderHandler, Picker} +import aqua.semantics.{SemanticError, Semantics} import cats.arrow.FunctionK import cats.data.* -import cats.data.Validated.{Invalid, Valid, validNec} -import cats.parse.Parser0 import cats.syntax.applicative.* import cats.syntax.either.* import cats.syntax.flatMap.* import cats.syntax.functor.* -import cats.syntax.monoid.* -import cats.syntax.semigroup.* import cats.syntax.traverse.* -import cats.{Comonad, Functor, Monad, Monoid, Order, ~>} +import cats.{Comonad, Monad, Monoid, Order, ~>} import scribe.Logging class AquaCompiler[F[_]: Monad, E, I: Order, S[_]: Comonad, C: Monoid: Picker]( @@ -33,43 +23,31 @@ class AquaCompiler[F[_]: Monad, E, I: Order, S[_]: Comonad, C: Monoid: Picker]( ) extends Logging { type Err = AquaError[I, E, S] - type Ctx = NonEmptyMap[I, C] type CompileWarns = [A] =>> CompileWarnings[S][A] type CompileRes = [A] =>> CompileResult[I, E, S][A] - type CompiledCtx = CompileRes[Ctx] - type CompiledCtxT = CompiledCtx => CompiledCtx + // Transpilation function for module + // (Imports contexts => Compilation result) + type TP = Map[String, C] => CompileRes[C] - private def linkModules( - modules: Modules[I, Err, CompiledCtxT], - cycleError: Linker.DepCycle[AquaModule[I, Err, CompiledCtxT]] => Err - ): CompileRes[Map[I, C]] = { - logger.trace("linking modules...") - - // By default, provide an empty context for this module's id - val empty: I => CompiledCtx = i => NonEmptyMap.one(i, Monoid[C].empty).pure[CompileRes] - - for { - linked <- Linker - .link(modules, cycleError, empty) - .toEither - .toEitherT[CompileWarns] - res <- EitherT( - linked.toList.traverse { case (id, ctx) => - ctx - .map( - /** - * NOTE: This should be safe - * as result for id should contain itself - */ - _.apply(id).map(id -> _).get - ) - .toValidated - }.map(_.sequence.toEither) - ) - } yield res.toMap - } + private def transpile(body: Ast[S]): TP = + imports => + for { + // Process header, get initial context + headerSem <- headerHandler + .sem(imports, body.head) + .toCompileRes + // Analyze the body, with prepared initial context + _ = logger.trace("semantic processing...") + processed <- semantics + .process(body, headerSem.initCtx) + .toCompileRes + // Handle exports, declares - finalize the resulting context + rc <- headerSem + .finCtx(processed) + .toCompileRes + } yield rc def compileRaw( sources: AquaSources[F, E, I], @@ -77,48 +55,18 @@ class AquaCompiler[F[_]: Monad, E, I: Order, S[_]: Comonad, C: Monoid: Picker]( ): F[CompileRes[Map[I, C]]] = { logger.trace("starting resolving sources...") - new AquaParser[F, E, I, S](sources, parser) - .resolve[CompiledCtx](mod => - context => - for { - // Context with prepared imports - ctx <- context - imports = mod.imports.flatMap { case (fn, id) => - ctx.apply(id).map(fn -> _) - } - header = mod.body.head - headerSem <- headerHandler - .sem(imports, header) - .toCompileRes - // Analyze the body, with prepared initial context - _ = logger.trace("semantic processing...") - processed <- semantics - .process( - mod.body, - headerSem.initCtx - ) - .toCompileRes - // Handle exports, declares - finalize the resulting context - rc <- headerSem - .finCtx(processed) - .toCompileRes - /** - * Here we build a map of contexts while processing modules. - * Should not linker provide this info inside this process? - * Building this map complicates things a lot. - */ - } yield NonEmptyMap.one(mod.id, rc) - ) - .value - .map(resolved => - for { - modules <- resolved.toEitherT[CompileWarns] - linked <- linkModules( - modules, - cycle => CycleError(cycle.map(_.id)) - ) - } yield linked - ) + val parsing = new AquaParser(sources, parser) + + parsing.resolve.value.map(resolution => + for { + // Lift resolution to CompileRes + modules <- resolution.toEitherT[CompileWarns] + // Generate transpilation functions for each module + transpiled = modules.map(body => transpile(body)) + // Link modules + linked <- Linker.link(transpiled, CycleError.apply) + } yield linked + ) } private val warningsK: semantics.Warnings ~> CompileWarns = diff --git a/compiler/src/main/scala/aqua/compiler/AquaParser.scala b/compiler/src/main/scala/aqua/compiler/AquaParser.scala index c2f35e75..952fec14 100644 --- a/compiler/src/main/scala/aqua/compiler/AquaParser.scala +++ b/compiler/src/main/scala/aqua/compiler/AquaParser.scala @@ -5,21 +5,22 @@ import aqua.linker.{AquaModule, Modules} import aqua.parser.head.{FilenameExpr, ImportExpr} import aqua.parser.lift.{LiftParser, Span} import aqua.parser.{Ast, ParserError} +import aqua.syntax.eithert.fromValidatedF -import cats.data.{Chain, EitherNec, EitherT, NonEmptyChain, Validated, ValidatedNec} -import cats.parse.Parser0 -import cats.syntax.either.* -import cats.syntax.applicative.* -import cats.syntax.flatMap.* -import cats.syntax.functor.* -import cats.syntax.monad.* -import cats.syntax.foldable.* -import cats.syntax.traverse.* -import cats.syntax.validated.* import cats.data.Chain.* import cats.data.Validated.* +import cats.data.{Chain, EitherNec, EitherT, NonEmptyChain, Validated, ValidatedNec} +import cats.parse.Parser0 +import cats.syntax.applicative.* +import cats.syntax.either.* +import cats.syntax.flatMap.* +import cats.syntax.foldable.* +import cats.syntax.functor.* +import cats.syntax.monad.* +import cats.syntax.parallel.* import cats.syntax.traverse.* -import cats.{~>, Comonad, Monad} +import cats.syntax.validated.* +import cats.{Comonad, Monad, ~>} import scribe.Logging // TODO: add tests @@ -33,108 +34,82 @@ class AquaParser[F[_]: Monad, E, I, S[_]: Comonad]( private type FE[A] = EitherT[F, NonEmptyChain[Err], A] - // Parse all the source files - private def parseSources: F[ValidatedNec[Err, Chain[(I, Body)]]] = - sources.sources.map( - _.leftMap(_.map(SourcesError.apply)).andThen( - _.traverse { case (i, s) => - parser(i)(s).bimap( - _.map(AquaParserError.apply), - ast => i -> ast - ) - } - ) + // Parse one source (text) + private def parse(id: I, src: String): EitherNec[Err, (I, Body)] = + parser(id)(src).toEither.bimap( + _.map(AquaParserError.apply), + ast => id -> ast ) + // Parse all the source files + private def parseSources: FE[Chain[(I, Body)]] = + for { + srcs <- EitherT + .fromValidatedF(sources.sources) + .leftMap(_.map(SourcesError.apply)) + parsed <- srcs + .parTraverse(parse.tupled) + .toEitherT + } yield parsed + + // Load one module (parse, resolve imports) + private def loadModule(id: I): FE[AquaModule[I, Err, Body]] = + for { + src <- EitherT + .fromValidatedF(sources.load(id)) + .leftMap(_.map(SourcesError.apply)) + parsed <- parse(id, src).toEitherT + (id, ast) = parsed + resolved <- resolveImports(id, ast) + } yield resolved + // Resolve imports (not parse, just resolve) of the given file - private def resolveImports(id: I, ast: Body): F[ValidatedNec[Err, AquaModule[I, Err, Body]]] = - ast.collectHead { case fe: FilenameExpr[S] => + private def resolveImports(id: I, ast: Body): FE[AquaModule[I, Err, Body]] = + ast.head.collect { case fe: FilenameExpr[S] => fe.fileValue -> fe.token - }.value.traverse { case (filename, token) => - sources - .resolveImport(id, filename) - .map( - _.bimap( - _.map(ResolveImportsError(id, token, _): Err), - importId => importId -> (filename, ImportError(token): Err) - ) + }.parTraverse { case (filename, token) => + EitherT + .fromValidatedF( + sources.resolveImport(id, filename) ) - }.map(_.sequence.map { collected => - AquaModule[I, Err, Body]( - id, + .bimap( + _.map(ResolveImportsError(id, token, _): Err), + importId => importId -> (filename, ImportError(token): Err) + ) + }.map { collected => + AquaModule( + id = id, // How filenames correspond to the resolved IDs - collected.map { case (i, (fn, _)) => + imports = collected.map { case (i, (fn, _)) => fn -> i - }.toList.toMap[String, I], + }.toList.toMap, // Resolved IDs to errors that point to the import in source code - collected.map { case (i, (_, err)) => + dependsOn = collected.map { case (i, (_, err)) => i -> err - }.toList.toMap[I, Err], - ast + }.toList.toMap, + body = ast ) - }) - - // Parse sources, convert to modules - private def sourceModules: F[ValidatedNec[Err, Modules[I, Err, Body]]] = - parseSources.flatMap { - case Validated.Valid(srcs) => - srcs.traverse { case (id, ast) => - resolveImports(id, ast) - }.map(_.sequence) - case Validated.Invalid(errs) => - errs.invalid.pure[F] - }.map( - _.map( - _.foldLeft(Modules[I, Err, Body]())( - _.add(_, toExport = true) - ) - ) - ) - - private def loadModule(imp: I): F[ValidatedNec[Err, AquaModule[I, Err, Body]]] = - sources - .load(imp) - .map(_.leftMap(_.map(SourcesError.apply)).andThen { src => - parser(imp)(src).leftMap(_.map(AquaParserError.apply)) - }) - .flatMap { - case Validated.Valid(ast) => - resolveImports(imp, ast) - case Validated.Invalid(errs) => - errs.invalid.pure[F] - } - - private def resolveModules( - modules: Modules[I, Err, Body] - ): F[ValidatedNec[Err, Modules[I, Err, Ast[S]]]] = - modules.dependsOn.toList.traverse { case (moduleId, unresolvedErrors) => - loadModule(moduleId).map(_.leftMap(_ ++ unresolvedErrors)) - }.map( - _.sequence.map( - _.foldLeft(modules)(_ add _) - ) - ).flatMap { - case Validated.Valid(ms) if ms.isResolved => - ms.validNec.pure[F] - case Validated.Valid(ms) => - resolveModules(ms) - case err => - err.pure[F] } - private def resolveSources: FE[Modules[I, Err, Ast[S]]] = + // Load modules (parse, resolve imports) of all the source files + private lazy val loadModules: FE[Modules[I, Err, Body]] = for { - ms <- EitherT( - sourceModules.map(_.toEither) - ) - res <- EitherT( - resolveModules(ms).map(_.toEither) - ) - } yield res + srcs <- parseSources + modules <- srcs.parTraverse(resolveImports.tupled) + } yield Modules.from(modules) - def resolve[T]( - transpile: AquaModule[I, Err, Body] => T => T - ): FE[Modules[I, Err, T => T]] = - resolveSources.map(_.mapModuleToBody(transpile)) + // Resolve modules (load all the dependencies) + private def resolveModules( + modules: Modules[I, Err, Body] + ): FE[Modules[I, Err, Ast[S]]] = + modules.iterateUntilM(ms => + // Load all modules that are dependencies of the current modules + ms.dependsOn.toList.parTraverse { case (moduleId, unresolvedErrors) => + loadModule(moduleId).leftMap(_ ++ unresolvedErrors) + }.map(ms.addAll) // Add all loaded modules to the current modules + )(_.isResolved) + + lazy val resolve: FE[Modules[I, Err, Body]] = + loadModules >>= resolveModules } diff --git a/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala b/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala index 722c59a2..c665aafb 100644 --- a/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala +++ b/compiler/src/main/scala/aqua/compiler/CompilerAPI.scala @@ -1,33 +1,22 @@ package aqua.compiler +import aqua.backend.Backend import aqua.compiler.AquaError.* -import aqua.backend.{AirFunction, Backend} -import aqua.linker.{AquaModule, Linker, Modules} import aqua.model.AquaContext -import aqua.parser.lift.{LiftParser, Span} import aqua.parser.{Ast, ParserError} -import aqua.raw.RawPart.Parts -import aqua.raw.{RawContext, RawPart} -import aqua.res.AquaRes +import aqua.raw.RawContext +import aqua.semantics.RawSemantics import aqua.semantics.header.{HeaderHandler, HeaderSem} -import aqua.semantics.{CompilerState, RawSemantics, Semantics} import cats.data.* -import cats.data.Validated.{invalid, validNec, Invalid, Valid} -import cats.parse.Parser0 import cats.syntax.applicative.* -import cats.syntax.flatMap.* -import cats.syntax.foldable.* -import cats.syntax.functor.* -import cats.syntax.monoid.* -import cats.syntax.semigroup.* -import cats.syntax.traverse.* import cats.syntax.either.* -import cats.{~>, Comonad, Monad, Monoid, Order} +import cats.syntax.flatMap.* +import cats.syntax.functor.* +import cats.syntax.traverse.* +import cats.{Comonad, Monad, Monoid, Order} import scribe.Logging -import scala.collection.MapView - object CompilerAPI extends Logging { private def toAquaProcessed[I: Order, E, S[_]: Comonad]( diff --git a/compiler/src/test/scala/aqua/compiler/AquaCompilerSpec.scala b/compiler/src/test/scala/aqua/compiler/AquaCompilerSpec.scala index a97812b0..acaa8409 100644 --- a/compiler/src/test/scala/aqua/compiler/AquaCompilerSpec.scala +++ b/compiler/src/test/scala/aqua/compiler/AquaCompilerSpec.scala @@ -89,7 +89,7 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { val src = Map( "index.aqua" -> - """module Foo declares X + """aqua Foo declares X | |export foo, foo2 as foo_two, X | @@ -135,7 +135,11 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { it should "create right topology" in { val src = Map( "index.aqua" -> - """service Op("op"): + """aqua Test + | + |export exec + | + |service Op("op"): | identity(s: string) -> string | |func exec(peers: []string) -> []string: @@ -224,7 +228,11 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { it should "not generate hop back with empty response" in { val src = Map( "index.aqua" -> - """service Op("op"): + """aqua HopBackTest + | + |export exec + | + |service Op("op"): | call(s: string) | |func exec(peers: []string): @@ -288,7 +296,7 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { val src = Map( "index.aqua" -> - """module Import + """aqua Import |import foobar from "export2.aqua" | |use foo as f from "export2.aqua" as Exp @@ -307,7 +315,7 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { ) val imports = Map( "export2.aqua" -> - """module Export declares foobar, foo + """aqua Export declares foobar, foo | |func bar() -> string: | <- " I am MyFooBar bar" @@ -323,7 +331,7 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { | |""".stripMargin, "../gen/OneMore.aqua" -> - """ + """aqua Test declares OneMore |service OneMore: | more_call() | consume(s: string) @@ -379,7 +387,10 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { it should "optimize math inside stream join" in { val src = Map( - "main.aqua" -> """ + "main.aqua" -> """aqua Test + | + |export main + | |func main(i: i32): | stream: *string | stream <<- "a" @@ -434,8 +445,7 @@ class AquaCompilerSpec extends AnyFlatSpec with Matchers with Inside { it should "allow returning and passing services as abilities" in { val src = Map( - "main.aqua" -> """ - |aqua Test + "main.aqua" -> """aqua Test | |export test | diff --git a/integration-tests/aqua/dht/dht-example.aqua b/integration-tests/aqua/dht/dht-example.aqua deleted file mode 100644 index f33ba54b..00000000 --- a/integration-tests/aqua/dht/dht-example.aqua +++ /dev/null @@ -1,16 +0,0 @@ -import "@fluencelabs/aqua-dht/pubsub.aqua" -import "@fluencelabs/aqua-dht/dht.aqua" -import "@fluencelabs/aqua-lib/builtin.aqua" - -export getNeighbours, initTopicAndSubscribe, findSubscribers - -func put_value(initial_peer: string, value: string) -> string: - initTopicAndSubscribe(initial_peer, value, nil, nil) - <- "OK" - -func registerKeyPutValue(node_id: string, key: string, value: string, relay_id: ?string, service_id: ?string) -> []string: - nodes <- getNeighbours(key) - for n <- nodes par: - on n: - t <- Peer.timestamp_sec() - <- nodes \ No newline at end of file diff --git a/integration-tests/aqua/examples/abilities.aqua b/integration-tests/aqua/examples/abilities.aqua index 9a02a2e7..b9d47a67 100644 --- a/integration-tests/aqua/examples/abilities.aqua +++ b/integration-tests/aqua/examples/abilities.aqua @@ -1,9 +1,9 @@ aqua Main -use DECLARE_CONST, decl_bar from "imports_exports/declare.aqua" as Declare - export handleAb, SomeService, bug214, checkAbCalls, bugLNG258_1, bugLNG258_2, bugLNG258_3, multipleAbilityWithClosure, MySrv, returnSrvAsAbility +use DECLARE_CONST, decl_bar from "imports_exports/declare.aqua" as Declare + service SomeService("wed"): getStr(s: string) -> string diff --git a/integration-tests/aqua/examples/abilitiesClosure.aqua b/integration-tests/aqua/examples/abilitiesClosure.aqua new file mode 100644 index 00000000..7b16c9b5 --- /dev/null +++ b/integration-tests/aqua/examples/abilitiesClosure.aqua @@ -0,0 +1,23 @@ +aqua M + +export bugLNG314 + +ability WorkerJob: + runOnSingleWorker(w: string) -> string + +func disjoint_run{WorkerJob}() -> -> string: + run = func () -> string: + r <- WorkerJob.runOnSingleWorker("worker") + <- r + <- run + +func runJob(j: -> string) -> string: + <- j() + +func bugLNG314() -> string: + job2 = () -> string: + <- "strstrstr" + worker_job = WorkerJob(runOnSingleWorker = job2) + subnet_job <- disjoint_run{worker_job}() + res <- runJob(subnet_job) + <- res \ No newline at end of file diff --git a/integration-tests/aqua/examples/aliases.aqua b/integration-tests/aqua/examples/aliases.aqua deleted file mode 100644 index e34d3bb2..00000000 --- a/integration-tests/aqua/examples/aliases.aqua +++ /dev/null @@ -1,24 +0,0 @@ -data SomeData: - value: string - otherValue: u64 - -data SubData: - someStr: string - someNum: i32 - -data SecondData: - value: string - complex: SubData - -data ThirdData: - value: string - complex: SomeData - -service ComplexService("op-ha"): - call(d: SomeData, sd: SecondData) -> SubData - identity() -> SecondData - -func doSmth(d: SomeData, d2: SomeData, sd: SecondData, c: SubData, SecondData -> ThirdData) -> ThirdData: - res <- ComplexService.call(d, sd) - res2 <- c(res, sd) - <- res2 \ No newline at end of file diff --git a/integration-tests/aqua/examples/assignment.aqua b/integration-tests/aqua/examples/assignment.aqua index 2ba91de6..97ebe1de 100644 --- a/integration-tests/aqua/examples/assignment.aqua +++ b/integration-tests/aqua/examples/assignment.aqua @@ -1,3 +1,7 @@ +aqua Assignment + +export doSmth + data Prod: value: string diff --git a/integration-tests/aqua/examples/callArrow.aqua b/integration-tests/aqua/examples/callArrow.aqua index fce3f0d4..ecb7fb98 100644 --- a/integration-tests/aqua/examples/callArrow.aqua +++ b/integration-tests/aqua/examples/callArrow.aqua @@ -1,6 +1,11 @@ +aqua CallArrow + +export passFunctionAsArg, reproArgsBug426 + import "println.aqua" import "@fluencelabs/aqua-lib/builtin.aqua" + -- functions like `c` are called an 'arrow function' in Aqua -- `c` passed to a function from a client, so, it could be called only on a client func passFunctionAsArg(node: string, str: string, c: string -> string): diff --git a/integration-tests/aqua/examples/canon.aqua b/integration-tests/aqua/examples/canon.aqua index 2f2c7d09..a55c258a 100644 --- a/integration-tests/aqua/examples/canon.aqua +++ b/integration-tests/aqua/examples/canon.aqua @@ -1,3 +1,7 @@ +aqua Canon + +export Ser, bugLng79 + data Record: relay_id: []string peer_id: string diff --git a/integration-tests/aqua/examples/closures.aqua b/integration-tests/aqua/examples/closures.aqua index 867d2751..0c3b4257 100644 --- a/integration-tests/aqua/examples/closures.aqua +++ b/integration-tests/aqua/examples/closures.aqua @@ -1,9 +1,9 @@ -module Closure declares * +aqua Closure declares * + +export LocalSrv, closureIn, closureOut, closureBig, closureOut2, lng58Bug, multipleClosuresBugLNG262, lng317Bug import "@fluencelabs/aqua-lib/builtin.aqua" -export LocalSrv, closureIn, closureOut, closureBig, closureOut2, lng58Bug, multipleClosuresBugLNG262 - service MyOp("op"): identity(s: string) -> string @@ -80,4 +80,38 @@ func create(a: i8) -> -> i8: func multipleClosuresBugLNG262() -> i8, i8: arr1 <- create(1) arr2 <- create(2) - <- arr1(), arr2() \ No newline at end of file + <- arr1(), arr2() + +ability WorkerJob: + runOnSingleWorker(w: string) -> []string + +func runJob(j: -> []string) -> []string: + <- j() + +func disjoint_run{WorkerJob}() -> -> []string: + run = func () -> []string: + r <- WorkerJob.runOnSingleWorker("a") + <- r + <- run + +func empty() -> string: + a = "empty" + <- a + +func lng317Bug() -> []string: + + res: *string + + outer = () -> string: + <- empty() + + clos = () -> -> []string: + job2 = () -> []string: + res <- outer() + res <- MyOp.identity("identity") + <- res + <- job2 + worker_job = WorkerJob(runOnSingleWorker = clos()) + subnet_job <- disjoint_run{worker_job}() + finalRes <- runJob(subnet_job) + <- finalRes \ No newline at end of file diff --git a/integration-tests/aqua/examples/co.aqua b/integration-tests/aqua/examples/co.aqua index 0bf82cc0..397812bc 100644 --- a/integration-tests/aqua/examples/co.aqua +++ b/integration-tests/aqua/examples/co.aqua @@ -1,3 +1,7 @@ +aqua Co + +export CoService, coFunc + import "@fluencelabs/aqua-lib/builtin.aqua" service CoService("coservice-id"): diff --git a/integration-tests/aqua/examples/collectionSugar.aqua b/integration-tests/aqua/examples/collectionSugar.aqua index 75f862c0..340b9280 100644 --- a/integration-tests/aqua/examples/collectionSugar.aqua +++ b/integration-tests/aqua/examples/collectionSugar.aqua @@ -1,3 +1,7 @@ +aqua CollectionSugar + +export arraySugar, streamSugar, optionSugar, GetArr, bugLNG59 + import "@fluencelabs/aqua-lib/builtin.aqua" func arraySugar(n: u32, m: u32) -> []u32, []u32: diff --git a/integration-tests/aqua/examples/complex.aqua b/integration-tests/aqua/examples/complex.aqua index 1634b558..c03cf507 100644 --- a/integration-tests/aqua/examples/complex.aqua +++ b/integration-tests/aqua/examples/complex.aqua @@ -1,3 +1,7 @@ +aqua Complex + +export TestS, doStuff + import "helloWorld.aqua" import "println.aqua" import "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/constants.aqua b/integration-tests/aqua/examples/constants.aqua index 116dc2e6..9a8cab21 100644 --- a/integration-tests/aqua/examples/constants.aqua +++ b/integration-tests/aqua/examples/constants.aqua @@ -1,3 +1,7 @@ +aqua Constants + +export Getter, callConstant, timestampAndTtl + import "@fluencelabs/aqua-lib/builtin.aqua" service Getter("test"): diff --git a/integration-tests/aqua/examples/dataAlias.aqua b/integration-tests/aqua/examples/dataAlias.aqua index ea2e94e6..264ec2e6 100644 --- a/integration-tests/aqua/examples/dataAlias.aqua +++ b/integration-tests/aqua/examples/dataAlias.aqua @@ -1,3 +1,7 @@ +aqua DataAlias + +export NodeIdGetter, getAliasedData + -- set `PeerId` name to be a type alias for `string` type alias PeerId : string diff --git a/integration-tests/aqua/examples/example.aqua b/integration-tests/aqua/examples/example.aqua index 3a8d6221..1be793aa 100644 --- a/integration-tests/aqua/examples/example.aqua +++ b/integration-tests/aqua/examples/example.aqua @@ -1,3 +1,5 @@ +aqua Example + service Peer("peer"): is_connected: string -> bool diff --git a/integration-tests/aqua/examples/fold.aqua b/integration-tests/aqua/examples/fold.aqua index 848b6957..d7eebaff 100644 --- a/integration-tests/aqua/examples/fold.aqua +++ b/integration-tests/aqua/examples/fold.aqua @@ -1,3 +1,7 @@ +aqua Fold + +export iterateAndPrint, iterateAndPrintParallel, forBug499 + import "println.aqua" import "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/foldJoin.aqua b/integration-tests/aqua/examples/foldJoin.aqua index 3548e058..498382e6 100644 --- a/integration-tests/aqua/examples/foldJoin.aqua +++ b/integration-tests/aqua/examples/foldJoin.aqua @@ -1,9 +1,9 @@ -module FoldJoin - -import "@fluencelabs/aqua-lib/builtin.aqua" +aqua FoldJoin export getTwoResults +import "@fluencelabs/aqua-lib/builtin.aqua" + service Op2("op"): identity(s: u64) diff --git a/integration-tests/aqua/examples/func.aqua b/integration-tests/aqua/examples/func.aqua index 68df4566..5b0d062e 100644 --- a/integration-tests/aqua/examples/func.aqua +++ b/integration-tests/aqua/examples/func.aqua @@ -1,3 +1,7 @@ +aqua Func + +export TestSrv, testFunc + service TestSrv("test-service-id"): str: -> string diff --git a/integration-tests/aqua/examples/funcs.aqua b/integration-tests/aqua/examples/funcs.aqua index 2c74c822..cd2e88e4 100644 --- a/integration-tests/aqua/examples/funcs.aqua +++ b/integration-tests/aqua/examples/funcs.aqua @@ -1,4 +1,4 @@ -module Funcs declares main, A, calc +aqua Funcs declares main, A, calc export main, A, calc, calc2, ifCalc, bugLNG260 diff --git a/integration-tests/aqua/examples/functors.aqua b/integration-tests/aqua/examples/functors.aqua index fc6f35d4..00e6f9a4 100644 --- a/integration-tests/aqua/examples/functors.aqua +++ b/integration-tests/aqua/examples/functors.aqua @@ -1,3 +1,7 @@ +aqua Functors + +export lng119Bug + func lng119Bug() -> []u32: nums = [1,2,3,4,5] results: *u32 diff --git a/integration-tests/aqua/examples/helloWorld.aqua b/integration-tests/aqua/examples/helloWorld.aqua index 6831cfbb..f6ec13f7 100644 --- a/integration-tests/aqua/examples/helloWorld.aqua +++ b/integration-tests/aqua/examples/helloWorld.aqua @@ -1,3 +1,7 @@ +aqua HelloWorld + +export StringExtra, helloWorld + service StringExtra("service-id"): addNameToHello: string -> string diff --git a/integration-tests/aqua/examples/if.aqua b/integration-tests/aqua/examples/if.aqua index e186c37c..0382be47 100644 --- a/integration-tests/aqua/examples/if.aqua +++ b/integration-tests/aqua/examples/if.aqua @@ -1,3 +1,7 @@ +aqua If + +export ifElseCall, ifElseNumCall, ifCorrectXorWrap, bugLNG69 + import "println.aqua" import "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/imports_exports/declare.aqua b/integration-tests/aqua/examples/imports_exports/declare.aqua index cbe72676..92a6acca 100644 --- a/integration-tests/aqua/examples/imports_exports/declare.aqua +++ b/integration-tests/aqua/examples/imports_exports/declare.aqua @@ -1,4 +1,4 @@ -module FooBars declares decl_foo, decl_bar, SuperFoo, DECLARE_CONST, DECLARE_CONST2 +aqua FooBars declares decl_foo, decl_bar, SuperFoo, DECLARE_CONST, DECLARE_CONST2 export SuperFoo const DECLARE_CONST = "declare_const" diff --git a/integration-tests/aqua/examples/imports_exports/export2.aqua b/integration-tests/aqua/examples/imports_exports/export2.aqua index abb06d02..f9ea79ed 100644 --- a/integration-tests/aqua/examples/imports_exports/export2.aqua +++ b/integration-tests/aqua/examples/imports_exports/export2.aqua @@ -1,4 +1,4 @@ -module Export declares foobar, foo +aqua Export declares foobar, foo import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/imports_exports/export3.aqua b/integration-tests/aqua/examples/imports_exports/export3.aqua index 0d117675..b0ecd9f1 100644 --- a/integration-tests/aqua/examples/imports_exports/export3.aqua +++ b/integration-tests/aqua/examples/imports_exports/export3.aqua @@ -1,5 +1,5 @@ -- exports3.aqua -module Export3 declares * +aqua Export3 declares * import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/imports_exports/exports.aqua b/integration-tests/aqua/examples/imports_exports/exports.aqua index c2d3ea4b..04280e45 100644 --- a/integration-tests/aqua/examples/imports_exports/exports.aqua +++ b/integration-tests/aqua/examples/imports_exports/exports.aqua @@ -1,4 +1,4 @@ -module Exports declares some_string, MyExportSrv, EXPORT_CONST, some_random_func +aqua Exports declares some_string, MyExportSrv, EXPORT_CONST, some_random_func import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/imports_exports/gen/OneMore.aqua b/integration-tests/aqua/examples/imports_exports/gen/OneMore.aqua index 6582acb8..e70ebed8 100644 --- a/integration-tests/aqua/examples/imports_exports/gen/OneMore.aqua +++ b/integration-tests/aqua/examples/imports_exports/gen/OneMore.aqua @@ -1,2 +1,4 @@ +aqua OneMore declares OneMore + service OneMore: more_call() \ No newline at end of file diff --git a/integration-tests/aqua/examples/imports_exports/import2.aqua b/integration-tests/aqua/examples/imports_exports/import2.aqua index ca74cb25..c2e2140d 100644 --- a/integration-tests/aqua/examples/imports_exports/import2.aqua +++ b/integration-tests/aqua/examples/imports_exports/import2.aqua @@ -1,4 +1,4 @@ -module Import +aqua Import import foobar from "export2.aqua" use foo as f from "export2.aqua" as Exp diff --git a/integration-tests/aqua/examples/imports_exports/import3.aqua b/integration-tests/aqua/examples/imports_exports/import3.aqua index 9c3dafab..b56fd54e 100644 --- a/integration-tests/aqua/examples/imports_exports/import3.aqua +++ b/integration-tests/aqua/examples/imports_exports/import3.aqua @@ -1,5 +1,5 @@ -- imports3.aqua -module Import3 declares * +aqua Import3 declares * import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua" export foo_wrapper diff --git a/integration-tests/aqua/examples/imports_exports/imports-empty.aqua b/integration-tests/aqua/examples/imports_exports/imports-empty.aqua index bf2f26a3..c9012625 100644 --- a/integration-tests/aqua/examples/imports_exports/imports-empty.aqua +++ b/integration-tests/aqua/examples/imports_exports/imports-empty.aqua @@ -1,3 +1,5 @@ +aqua ImportsEmpty + import decl_foo, decl_bar from "declare.aqua" use DECLARE_CONST, SuperFoo, DECLARE_CONST2 as DC2 from "declare.aqua" as Declare import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/imports_exports/imports.aqua b/integration-tests/aqua/examples/imports_exports/imports.aqua index 2d7e6785..f68e5b49 100644 --- a/integration-tests/aqua/examples/imports_exports/imports.aqua +++ b/integration-tests/aqua/examples/imports_exports/imports.aqua @@ -1,3 +1,7 @@ +aqua Imports + +export StringService, concat_foobars + import decl_foo, decl_bar from "declare.aqua" use DECLARE_CONST, SuperFoo, DECLARE_CONST2 as DC2 from "declare.aqua" as Declare import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua" diff --git a/integration-tests/aqua/examples/imports_exports/subImport.aqua b/integration-tests/aqua/examples/imports_exports/subImport.aqua index e7f060b4..01d84897 100644 --- a/integration-tests/aqua/examples/imports_exports/subImport.aqua +++ b/integration-tests/aqua/examples/imports_exports/subImport.aqua @@ -1,3 +1,4 @@ +aqua SubImport declares * alias SomeString : string diff --git a/integration-tests/aqua/examples/join.aqua b/integration-tests/aqua/examples/join.aqua index 63ab8577..34d2a79b 100644 --- a/integration-tests/aqua/examples/join.aqua +++ b/integration-tests/aqua/examples/join.aqua @@ -1,3 +1,7 @@ +aqua Join + +export joinIdxLocal, joinIdxRelay, joinIdx + import "@fluencelabs/aqua-lib/builtin.aqua" func joinIdxLocal(idx: i16, nodes: []string) -> []string: diff --git a/integration-tests/aqua/examples/multiReturn.aqua b/integration-tests/aqua/examples/multiReturn.aqua index 1164af6d..8455cccd 100644 --- a/integration-tests/aqua/examples/multiReturn.aqua +++ b/integration-tests/aqua/examples/multiReturn.aqua @@ -1,3 +1,7 @@ +aqua MultiReturn + +export GetStr, GetNum, multiReturnFunc + import "@fluencelabs/aqua-lib/builtin.aqua" service GetStr("multiret-test"): diff --git a/integration-tests/aqua/examples/nestedData.aqua b/integration-tests/aqua/examples/nestedData.aqua index 1fe58f09..5ac07032 100644 --- a/integration-tests/aqua/examples/nestedData.aqua +++ b/integration-tests/aqua/examples/nestedData.aqua @@ -1,3 +1,7 @@ +aqua NestedData + +export Test, test + data NestedType: val: string diff --git a/integration-tests/aqua/examples/nestedFuncs.aqua b/integration-tests/aqua/examples/nestedFuncs.aqua index 55ed03de..622f6a00 100644 --- a/integration-tests/aqua/examples/nestedFuncs.aqua +++ b/integration-tests/aqua/examples/nestedFuncs.aqua @@ -1,3 +1,7 @@ +aqua NestedFuncs + +export OpH, d + import "@fluencelabs/aqua-lib/builtin.aqua" service OpH("opa"): diff --git a/integration-tests/aqua/examples/on.aqua b/integration-tests/aqua/examples/on.aqua index 0bc01ccc..a0d49001 100644 --- a/integration-tests/aqua/examples/on.aqua +++ b/integration-tests/aqua/examples/on.aqua @@ -1,3 +1,7 @@ +aqua On + +export getPeerExternalAddresses + import "@fluencelabs/aqua-lib/builtin.aqua" func getPeerExternalAddresses(otherNodePeerId: string) -> []string: diff --git a/integration-tests/aqua/examples/onErrorPropagation.aqua b/integration-tests/aqua/examples/onErrorPropagation.aqua index f0a67a35..f5478ad6 100644 --- a/integration-tests/aqua/examples/onErrorPropagation.aqua +++ b/integration-tests/aqua/examples/onErrorPropagation.aqua @@ -1,3 +1,7 @@ +aqua OnErrorPropagation + +export Test, onPropagate, nestedOnPropagate, seqOnPropagate + service Test("test-service"): fail(err: string) diff --git a/integration-tests/aqua/examples/option.aqua b/integration-tests/aqua/examples/option.aqua index 8b178c8e..d63960fb 100644 --- a/integration-tests/aqua/examples/option.aqua +++ b/integration-tests/aqua/examples/option.aqua @@ -1,3 +1,7 @@ +aqua Option + +export SomeS, useOptional, returnOptional, returnNone + import "@fluencelabs/aqua-lib/builtin.aqua" service SomeS("test2"): diff --git a/integration-tests/aqua/examples/options/option_gen.aqua b/integration-tests/aqua/examples/options/option_gen.aqua index f1a7a27a..99e0c14a 100644 --- a/integration-tests/aqua/examples/options/option_gen.aqua +++ b/integration-tests/aqua/examples/options/option_gen.aqua @@ -1,3 +1,7 @@ +aqua OptionGen + +export OptionString, emptyString, checkEmpty, checkNoneEmpty + service OptionString("opt_str"): checkOption(str: ?string) -> string diff --git a/integration-tests/aqua/examples/par.aqua b/integration-tests/aqua/examples/par.aqua index dc19a4ba..c5acacb6 100644 --- a/integration-tests/aqua/examples/par.aqua +++ b/integration-tests/aqua/examples/par.aqua @@ -1,3 +1,7 @@ +aqua Par + +export ParService, parFunc, testTimeout + import "@fluencelabs/aqua-lib/builtin.aqua" service ParService("parservice-id"): diff --git a/integration-tests/aqua/examples/parseq.aqua b/integration-tests/aqua/examples/parseq.aqua index 8ab129b5..3e2ada13 100644 --- a/integration-tests/aqua/examples/parseq.aqua +++ b/integration-tests/aqua/examples/parseq.aqua @@ -1,3 +1,7 @@ +aqua ParSeq + +export testParSeq + import "@fluencelabs/aqua-lib/builtin.aqua" service NumOp("op"): diff --git a/integration-tests/aqua/examples/passArgs.aqua b/integration-tests/aqua/examples/passArgs.aqua index 21536682..83e66b86 100644 --- a/integration-tests/aqua/examples/passArgs.aqua +++ b/integration-tests/aqua/examples/passArgs.aqua @@ -1,3 +1,7 @@ +aqua PassArgs + +export AquaDHT, create_client_util, bugLNG60 + import Op from "@fluencelabs/aqua-lib/builtin.aqua" service AquaDHT("test-dht"): diff --git a/integration-tests/aqua/examples/println.aqua b/integration-tests/aqua/examples/println.aqua index 1a5f47af..3db57c5a 100644 --- a/integration-tests/aqua/examples/println.aqua +++ b/integration-tests/aqua/examples/println.aqua @@ -1,3 +1,7 @@ +aqua Println declares * + +export Println, print + service Println("println-service-id"): print: string -> () diff --git a/integration-tests/aqua/examples/pushToStream.aqua b/integration-tests/aqua/examples/pushToStream.aqua index e34ea74f..cbe8d6dc 100644 --- a/integration-tests/aqua/examples/pushToStream.aqua +++ b/integration-tests/aqua/examples/pushToStream.aqua @@ -1,3 +1,7 @@ +aqua PushToStream + +export OpA, get_results + service OpA("pop"): get_str() -> string diff --git a/integration-tests/aqua/examples/recursiveStreams.aqua b/integration-tests/aqua/examples/recursiveStreams.aqua deleted file mode 100644 index fb8f8da5..00000000 --- a/integration-tests/aqua/examples/recursiveStreams.aqua +++ /dev/null @@ -1,13 +0,0 @@ - -service YesNoService("yesno"): - get() -> string - -func recursiveStream() -> []string, []string: - result: *string - loop: *string - loop <<- "yes" - for l <- loop: - if l == "yes": - loop <- YesNoService.get() - result <<- "success" - <- result, loop diff --git a/integration-tests/aqua/examples/recursiveStreams/multiRec.aqua b/integration-tests/aqua/examples/recursiveStreams/multiRec.aqua new file mode 100644 index 00000000..6b6f5005 --- /dev/null +++ b/integration-tests/aqua/examples/recursiveStreams/multiRec.aqua @@ -0,0 +1,22 @@ +aqua MultiRec + +export TestService, multiRecStream + +service TestService("test-srv"): + handle(i: i32) -> []i32 + +func multiRecStream(init: i32, target: i32) -> []i32: + result: *string + loop: *i32 + + loop <<- init + for l <- loop rec: + news <- TestService.handle(l) + for n <- news: + loop <<- n + if l == target: + result <<- "done" + + join result! + + <- loop diff --git a/integration-tests/aqua/examples/recursiveStreams/nested.aqua b/integration-tests/aqua/examples/recursiveStreams/nested.aqua new file mode 100644 index 00000000..a508e0bb --- /dev/null +++ b/integration-tests/aqua/examples/recursiveStreams/nested.aqua @@ -0,0 +1,19 @@ +aqua Nested + +export nested + +func nested(n: u32) -> []u32: + result: *u32 + iterator: *u32 + + iterator <<- 0 + for i <- iterator rec: + if i < n: + for j <- iterator rec: + result <<- j + iterator <<- i + 1 + + if n > 0: + join result[n * (n + 1) / 2 - 1] + + <- result \ No newline at end of file diff --git a/integration-tests/aqua/examples/recursiveStreams/pipeline.aqua b/integration-tests/aqua/examples/recursiveStreams/pipeline.aqua new file mode 100644 index 00000000..787e6e23 --- /dev/null +++ b/integration-tests/aqua/examples/recursiveStreams/pipeline.aqua @@ -0,0 +1,29 @@ +aqua Pipeline + +export pipelineStream + +func pipelineStream(init: i32, target: i32) -> []i32: + result: *string + + loop1: *i32 + loop2: *i32 + loop3: *i32 + + loop1 <<- init + for l <- loop1 rec: + if l < target: + loop1 <<- l + 1 + loop2 <<- l * 3 + + for l <- loop2 rec: + loop3 <<- l + loop3 <<- l + 1 + loop3 <<- l + 2 + + for l <- loop3 rec: + if l == target: + result <<- "success" + + join result! + + <- loop3 diff --git a/integration-tests/aqua/examples/recursiveStreams/range.aqua b/integration-tests/aqua/examples/recursiveStreams/range.aqua new file mode 100644 index 00000000..4cd414c5 --- /dev/null +++ b/integration-tests/aqua/examples/recursiveStreams/range.aqua @@ -0,0 +1,18 @@ +aqua Range + +export range + +func range(a: i32, b: i32) -> []i32: + result: *i32 + iterator: *i32 + + iterator <<- a + for i <- iterator rec: + if i < b: + result <<- i + iterator <<- i + 1 + + if b > a: + join result[b - a - 1] + + <- result \ No newline at end of file diff --git a/integration-tests/aqua/examples/recursiveStreams/remoteRec.aqua b/integration-tests/aqua/examples/recursiveStreams/remoteRec.aqua new file mode 100644 index 00000000..ace2ed34 --- /dev/null +++ b/integration-tests/aqua/examples/recursiveStreams/remoteRec.aqua @@ -0,0 +1,19 @@ +aqua RemoteRec + +export RemoteSrv, remoteRecStream + +service RemoteSrv("remote-srv"): + handle(i: i32) -> i32 + +func remoteRecStream(init: i32, target: i32, friend: string, friendRelay: string) -> []i32: + loop: *i32 + + loop <<- init + for l <- loop rec: + on friend via friendRelay: + if l < target: + loop <- RemoteSrv.handle(l) + + join loop[target - init] + + <- loop diff --git a/integration-tests/aqua/examples/recursiveStreams/yesNo.aqua b/integration-tests/aqua/examples/recursiveStreams/yesNo.aqua new file mode 100644 index 00000000..d9270044 --- /dev/null +++ b/integration-tests/aqua/examples/recursiveStreams/yesNo.aqua @@ -0,0 +1,21 @@ +aqua YesNo + +export YesNoService, yesNoStream + +service YesNoService("yesno"): + get() -> string + +func yesNoStream() -> []string: + result: *string + loop: *string + + loop <<- "yes" + for l <- loop rec: + if l == "yes": + loop <- YesNoService.get() + else: + result <<- "success" + + join result! + + <- loop diff --git a/integration-tests/aqua/examples/returnArrow.aqua b/integration-tests/aqua/examples/returnArrow.aqua index 73112dcf..283b550e 100644 --- a/integration-tests/aqua/examples/returnArrow.aqua +++ b/integration-tests/aqua/examples/returnArrow.aqua @@ -1,9 +1,9 @@ aqua ReturnArrow -import "@fluencelabs/aqua-lib/builtin.aqua" - export callReturnedArrow, callReturnedChainArrow +import "@fluencelabs/aqua-lib/builtin.aqua" + func returnCall(arg: string) -> string -> string, string: str <- Op.concat_strings(arg, " literal") closure = (s: string) -> string, string: diff --git a/integration-tests/aqua/examples/returnLiteral.aqua b/integration-tests/aqua/examples/returnLiteral.aqua index 5fd54049..c76029a6 100644 --- a/integration-tests/aqua/examples/returnLiteral.aqua +++ b/integration-tests/aqua/examples/returnLiteral.aqua @@ -1,2 +1,6 @@ +aqua ReturnLiteral + +export returnLiteral + func returnLiteral() -> string: <- "some literal" \ No newline at end of file diff --git a/integration-tests/aqua/examples/stream.aqua b/integration-tests/aqua/examples/stream.aqua index c50109fa..cdb59449 100644 --- a/integration-tests/aqua/examples/stream.aqua +++ b/integration-tests/aqua/examples/stream.aqua @@ -1,8 +1,5 @@ aqua Stream -import "@fluencelabs/aqua-lib/builtin.aqua" -import "println.aqua" - export Stringer export checkStreams, returnStreamFromFunc export stringEmpty, returnEmptyLiteral @@ -10,6 +7,9 @@ export returnNilLength, stringNone export streamFunctor, streamAssignment export streamIntFunctor, streamJoin +import "@fluencelabs/aqua-lib/builtin.aqua" +import "println.aqua" + service Stringer("stringer-id"): returnString: string -> string diff --git a/integration-tests/aqua/examples/streamCallback.aqua b/integration-tests/aqua/examples/streamCallback.aqua index ff8e1dd5..935a74c1 100644 --- a/integration-tests/aqua/examples/streamCallback.aqua +++ b/integration-tests/aqua/examples/streamCallback.aqua @@ -1,4 +1,4 @@ -module Ret declares * +aqua Ret declares * export someFunc diff --git a/integration-tests/aqua/examples/streamCan.aqua b/integration-tests/aqua/examples/streamCan.aqua index 3ea38651..5c219e37 100644 --- a/integration-tests/aqua/examples/streamCan.aqua +++ b/integration-tests/aqua/examples/streamCan.aqua @@ -1,4 +1,6 @@ -export accumRes, bugLNG63, bugLNG63_2 +aqua StreamCan + +export accumRes, bugLNG63, bugLNG63_2, bugLNG63_3 func toOpt(s: string) -> ?string: str: *string diff --git a/integration-tests/aqua/examples/streamRestriction.aqua b/integration-tests/aqua/examples/streamRestriction.aqua index 279d72ef..b2233bcb 100644 --- a/integration-tests/aqua/examples/streamRestriction.aqua +++ b/integration-tests/aqua/examples/streamRestriction.aqua @@ -1,3 +1,7 @@ +aqua StreamRestriction + +export streamFold, streamRes + func streamFold(arr: []string) -> []string: res: *string for n <- arr: diff --git a/integration-tests/aqua/examples/streamResults.aqua b/integration-tests/aqua/examples/streamResults.aqua index 087e40c7..52a45a33 100644 --- a/integration-tests/aqua/examples/streamResults.aqua +++ b/integration-tests/aqua/examples/streamResults.aqua @@ -1,3 +1,7 @@ +aqua StreamResults + +export DTGetter, use_name1, use_name2 + data DT: field: string diff --git a/integration-tests/aqua/examples/structuraltyping.aqua b/integration-tests/aqua/examples/structuraltyping.aqua index 0d7aa54e..e9b2f12e 100644 --- a/integration-tests/aqua/examples/structuraltyping.aqua +++ b/integration-tests/aqua/examples/structuraltyping.aqua @@ -1,9 +1,9 @@ aqua Aaa -import "@fluencelabs/aqua-lib/builtin.aqua" - export structuralTypingTest +import "@fluencelabs/aqua-lib/builtin.aqua" + data WideData: s: string n: u32 diff --git a/integration-tests/aqua/examples/subImportUsage.aqua b/integration-tests/aqua/examples/subImportUsage.aqua index 413ab00d..7e3a5089 100644 --- a/integration-tests/aqua/examples/subImportUsage.aqua +++ b/integration-tests/aqua/examples/subImportUsage.aqua @@ -1,3 +1,7 @@ +aqua SubImportUsage + +export subImportUsage, ConcatSubs + import "imports_exports/subImport.aqua" service ConcatSubs("concat_subs"): diff --git a/integration-tests/aqua/examples/tryCatch.aqua b/integration-tests/aqua/examples/tryCatch.aqua index 577ef622..7f64eaa7 100644 --- a/integration-tests/aqua/examples/tryCatch.aqua +++ b/integration-tests/aqua/examples/tryCatch.aqua @@ -1,3 +1,7 @@ +aqua TryCatch + +export tryCatchTest + import "@fluencelabs/aqua-lib/builtin.aqua" service Unexisted("unex"): diff --git a/integration-tests/aqua/examples/tryOtherwise.aqua b/integration-tests/aqua/examples/tryOtherwise.aqua index 0624e55d..d0334ae8 100644 --- a/integration-tests/aqua/examples/tryOtherwise.aqua +++ b/integration-tests/aqua/examples/tryOtherwise.aqua @@ -1,3 +1,7 @@ +aqua TryOtherwise + +export tryOtherwiseTest + service Unexisted("unex"): getStr() -> string diff --git a/integration-tests/package-lock.json b/integration-tests/package-lock.json new file mode 100644 index 00000000..9a267f8d --- /dev/null +++ b/integration-tests/package-lock.json @@ -0,0 +1,6184 @@ +{ + "name": "integration-tests", + "version": "0.3.9", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "integration-tests", + "version": "0.3.9", + "license": "MIT", + "dependencies": { + "@fluencelabs/fluence-network-environment": "1.1.2", + "@fluencelabs/js-client": "0.6.0", + "deep-equal": "2.2.1", + "loglevel": "1.8.1" + }, + "devDependencies": { + "@fluencelabs/aqua-api": "0.13.4", + "@fluencelabs/aqua-lib": "0.9.0", + "@types/jest": "29.5.2", + "@types/node": "18.19.3", + "jest": "29.5.0", + "prettier": "3.1.1", + "ts-jest": "29.1.0", + "ts-node": "10.9.2", + "typescript": "5.3.3" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", + "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.7", + "@babel/parser": "^7.23.6", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", + "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.6", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz", + "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", + "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", + "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", + "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@chainsafe/as-chacha20poly1305": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@chainsafe/as-chacha20poly1305/-/as-chacha20poly1305-0.1.0.tgz", + "integrity": "sha512-BpNcL8/lji/GM3+vZ/bgRWqJ1q5kwvTFmGPk7pxm/QQZDbaMI98waOHjEymTjq2JmdD/INdNBFOVSyJofXg7ew==" + }, + "node_modules/@chainsafe/as-sha256": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.4.1.tgz", + "integrity": "sha512-IqeeGwQihK6Y2EYLFofqs2eY2ep1I2MvQXHzOAI+5iQN51OZlUkrLgyAugu2x86xZewDk5xas7lNczkzFzF62w==" + }, + "node_modules/@chainsafe/is-ip": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@chainsafe/is-ip/-/is-ip-2.0.2.tgz", + "integrity": "sha512-ndGqEMG1W5WkGagaqOZHpPU172AGdxr+LD15sv3WIUvT5oCFUrG1Y0CW/v2Egwj4JXEvSibaIIIqImsm98y1nA==" + }, + "node_modules/@chainsafe/libp2p-noise": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-14.0.0.tgz", + "integrity": "sha512-/E7QnSL24APpfXTj/YRS/EVRvTATg09+AwqEUGs+OeLFcO/DwPal3W6pj7c4eyJFSgxnegbpbgiH8EBvTZ4Iwg==", + "dependencies": { + "@chainsafe/as-chacha20poly1305": "^0.1.0", + "@chainsafe/as-sha256": "^0.4.1", + "@libp2p/crypto": "^3.0.0", + "@libp2p/interface": "^1.0.0", + "@libp2p/peer-id": "^4.0.0", + "@noble/ciphers": "^0.4.0", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.1", + "it-byte-stream": "^1.0.0", + "it-length-prefixed": "^9.0.1", + "it-length-prefixed-stream": "^1.0.0", + "it-pair": "^2.0.6", + "it-pipe": "^3.0.1", + "it-stream-types": "^2.0.1", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.3", + "uint8arrays": "^4.0.4", + "wherearewe": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@chainsafe/libp2p-noise/node_modules/multiformats": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz", + "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@chainsafe/libp2p-noise/node_modules/uint8arrays": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz", + "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==", + "dependencies": { + "multiformats": "^12.0.1" + } + }, + "node_modules/@chainsafe/libp2p-yamux": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-yamux/-/libp2p-yamux-6.0.1.tgz", + "integrity": "sha512-8ar6jph9ZuUUxQ8t8W1MaZqH7f7KvGK2wR7TDGnN0r4QtZc07ICNgVjnolnI9/8bclrI5Um4uMa8QCYKTrdvDQ==", + "dependencies": { + "@libp2p/interface": "^1.0.0", + "@libp2p/utils": "^5.0.0", + "get-iterator": "^2.0.1", + "it-foreach": "^2.0.3", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.0", + "uint8arraylist": "^2.4.3" + } + }, + "node_modules/@chainsafe/netmask": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@chainsafe/netmask/-/netmask-2.0.0.tgz", + "integrity": "sha512-I3Z+6SWUoaljh3TBzCnCxjlUyN8tA+NAk5L6m9IxvCf1BENQTePzPMis97CoN/iMW1St3WN+AWCCRp+TTBRiDg==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@fluencelabs/aqua-api": { + "version": "0.13.4", + "resolved": "https://npm.fluence.dev/@fluencelabs/aqua-api/-/aqua-api-0.13.4.tgz", + "integrity": "sha512-Bx55LM1ys1ij2d4lxKDSKRFSbbodtGnqISb3NLrNlR/6fc5/uqQSWKK0HNk9C6K1dErSj5fPkaHeyMS5kd8nug==", + "dev": true + }, + "node_modules/@fluencelabs/aqua-lib": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/aqua-lib/-/aqua-lib-0.9.0.tgz", + "integrity": "sha512-V0xhc0UXBF6kjfL9Y/agWGQuW+ie2zckj37KWv8Dq4teYuo9N94O4Ynm7XULWHaaWtbWvzFcDcc6nc9qG7gxcQ==", + "dev": true + }, + "node_modules/@fluencelabs/avm": { + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.55.0.tgz", + "integrity": "sha512-4KaVnSCkWtoyXSX1UezKX5KRKkBdR+VmXdZwAGqgcqsDKuzTFstfsMO6SCp/njbCOK1Wm/t5Fb1HFDob/6vIog==" + }, + "node_modules/@fluencelabs/fluence-network-environment": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@fluencelabs/fluence-network-environment/-/fluence-network-environment-1.1.2.tgz", + "integrity": "sha512-1Bp2gBy3oMEILMynFpOIFK/q2Pj792xpnb3AJs5QcTQAaHz9V2nrEI8OOPwBAFTmjmLBirXBqQQX63O+ePH7yg==" + }, + "node_modules/@fluencelabs/interfaces": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/interfaces/-/interfaces-0.10.0.tgz", + "integrity": "sha512-KD6GKk4whhQyt0fYpD1EFoi1JidQ6w37edS+akrHritySl9gxVAZqd7Ho6AolLEVHkMMBVQYC6sSjU9DcNueRg==", + "engines": { + "node": ">=10", + "pnpm": ">=3" + } + }, + "node_modules/@fluencelabs/js-client": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/js-client/-/js-client-0.6.0.tgz", + "integrity": "sha512-uKmz622Zh22TgAnCkfLJw3RqO2s5x63vFnyr6zAjwHDNTkXh1Srnoj/df7aWzQoIdVaqeUmrov/R7ozQd3VByw==", + "dependencies": { + "@chainsafe/libp2p-noise": "14.0.0", + "@chainsafe/libp2p-yamux": "6.0.1", + "@fluencelabs/avm": "0.55.0", + "@fluencelabs/interfaces": "0.10.0", + "@fluencelabs/js-client-isomorphic": "0.4.0", + "@fluencelabs/marine-worker": "0.5.1", + "@fluencelabs/threads": "^2.0.0", + "@libp2p/crypto": "4.0.1", + "@libp2p/identify": "1.0.11", + "@libp2p/interface": "1.1.2", + "@libp2p/peer-id": "4.0.5", + "@libp2p/peer-id-factory": "4.0.5", + "@libp2p/ping": "1.0.10", + "@libp2p/utils": "5.2.2", + "@libp2p/websockets": "8.0.12", + "@multiformats/multiaddr": "12.1.12", + "bs58": "5.0.0", + "debug": "4.3.4", + "it-length-prefixed": "9.0.3", + "it-map": "3.0.5", + "it-pipe": "3.0.1", + "js-base64": "3.7.5", + "libp2p": "1.2.0", + "multiformats": "11.0.1", + "rxjs": "7.5.5", + "uint8arrays": "4.0.3", + "uuid": "8.3.2", + "zod": "3.22.4" + }, + "engines": { + "node": ">=10", + "pnpm": ">=8" + } + }, + "node_modules/@fluencelabs/js-client-isomorphic": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/js-client-isomorphic/-/js-client-isomorphic-0.4.0.tgz", + "integrity": "sha512-Qnehq/UnE0O2pZy9n6mDouY2f623UuUVIWwd6EN9n4cHuM6URyLiWrvJ0TeTUNTJiEJyVy6mSb01SmUUrPKScw==", + "dependencies": { + "@fluencelabs/avm": "0.55.0", + "@fluencelabs/marine-js": "0.8.0", + "@fluencelabs/marine-worker": "0.5.1", + "@fluencelabs/threads": "^2.0.0" + } + }, + "node_modules/@fluencelabs/js-client/node_modules/@libp2p/crypto": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.0.1.tgz", + "integrity": "sha512-lKGbX8TvQt4JbqlttdexEz2VtYJnTwY31kVBDQviwt0pMF+6Uy2hzNnEQ1FHZBwnow8BIlyb6UevHfgyOFlnkw==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.3", + "asn1js": "^3.0.5", + "multiformats": "^13.0.0", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@fluencelabs/js-client/node_modules/@libp2p/crypto/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@fluencelabs/js-client/node_modules/@libp2p/crypto/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@fluencelabs/marine-js": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/marine-js/-/marine-js-0.8.0.tgz", + "integrity": "sha512-exxp0T0Dk69dxnbpAiVc/qp66s8Jq/P71TRB9aeQZLZy3EQtVAMCBJvwQY8LzVVlYEyVjmqQkFG/N0rAeYU1vg==", + "dependencies": { + "@wasmer/wasi": "0.12.0", + "@wasmer/wasmfs": "0.12.0", + "default-import": "1.1.5" + } + }, + "node_modules/@fluencelabs/marine-worker": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@fluencelabs/marine-worker/-/marine-worker-0.5.1.tgz", + "integrity": "sha512-23CqQJMCVbtVLAxSV9ancGyQAMxNxKFy95boAAGfx5uJkvoetHRpb1+TYXMPCTVTSZBAmVrZbdGSQNXKoLDQig==", + "dependencies": { + "@fluencelabs/marine-js": "0.8.0", + "@fluencelabs/threads": "^2.0.0", + "observable-fns": "0.6.1" + } + }, + "node_modules/@fluencelabs/threads": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fluencelabs/threads/-/threads-2.0.0.tgz", + "integrity": "sha512-dgYpZg55OcEmop1U3G2bFKEJXg2avjXWYfWsdPlkSbHOHguaRifvr5bgwIYTg1wxoPGcn0jegcjKKwrY0qrV+g==", + "dependencies": { + "callsites": "^3.1.0", + "debug": "^4.2.0", + "is-observable": "^2.1.0", + "observable-fns": "^0.6.1" + }, + "funding": { + "url": "https://github.com/andywer/threads.js?sponsor=1" + }, + "optionalDependencies": { + "tiny-worker": ">= 2" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@libp2p/crypto": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-3.0.1.tgz", + "integrity": "sha512-CvqzsWvAYaga/Du3gDRChN9d8PUnOoCQg3VlugKf6tfw5+1pd7sMDhyMLajXqFsWqQUY6FojgB1TS4izpODMpw==", + "dependencies": { + "@libp2p/interface": "^1.0.1", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.1", + "multiformats": "^12.1.3", + "node-forge": "^1.1.0", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.3", + "uint8arrays": "^4.0.6" + } + }, + "node_modules/@libp2p/crypto/node_modules/multiformats": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz", + "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@libp2p/crypto/node_modules/uint8arrays": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz", + "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==", + "dependencies": { + "multiformats": "^12.0.1" + } + }, + "node_modules/@libp2p/identify": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@libp2p/identify/-/identify-1.0.11.tgz", + "integrity": "sha512-/f6E2Z+H9sU332DipP3wuxtq06WfP1g4gNnjM7EUJjZ3b6igz8sFRnSVhTq5DGcsPBPT01zct3mrKFCj7ag4Uw==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@libp2p/interface-internal": "^1.0.7", + "@libp2p/peer-id": "^4.0.5", + "@libp2p/peer-record": "^7.0.6", + "@multiformats/multiaddr": "^12.1.10", + "@multiformats/multiaddr-matcher": "^1.1.0", + "it-protobuf-stream": "^1.1.1", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0", + "wherearewe": "^2.0.1" + } + }, + "node_modules/@libp2p/identify/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/identify/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/interface": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.1.2.tgz", + "integrity": "sha512-uC4hxtEJuWiDiZfokkSNEEbCzdyZrqb5kp67Wc5PjZsySZ2IoImdIfie003yQXlB1xBp/XUJzdC6kVu4M7LUmg==", + "dependencies": { + "@multiformats/multiaddr": "^12.1.10", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "multiformats": "^13.0.0", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.7" + } + }, + "node_modules/@libp2p/interface-internal": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-1.0.7.tgz", + "integrity": "sha512-r1nGpnGdkq0U7ow5i093OPWPBJXQP3BGwijino8cCZokYwF2P/CU+yeYvL8ncL8fPYLKuuUjLNGO4Z8Th5sqSQ==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@libp2p/peer-collections": "^5.1.5", + "@multiformats/multiaddr": "^12.1.10", + "uint8arraylist": "^2.4.7" + } + }, + "node_modules/@libp2p/interface/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/logger": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.5.tgz", + "integrity": "sha512-cXETMNZINnxeQBlfQ2S4di92FDDU89R7RHagrpebGrM7oLl5nf/Mw6myc23kGaM3/2YG3ko2rl9sYjemu0azTA==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@multiformats/multiaddr": "^12.1.10", + "debug": "^4.3.4", + "interface-datastore": "^8.2.0", + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/logger/node_modules/multiformats": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz", + "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw==" + }, + "node_modules/@libp2p/multistream-select": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-5.1.2.tgz", + "integrity": "sha512-QpECDuO3hAQLAcYZbIFVhNNJl3MMttTq+txlbpDOxVgbOfTTBImUCcvrtZRIe25gZ1uB+iS72opZNgilc1zl9g==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "it-length-prefixed": "^9.0.3", + "it-length-prefixed-stream": "^1.1.1", + "it-stream-types": "^2.0.1", + "p-defer": "^4.0.0", + "race-signal": "^1.0.2", + "uint8-varint": "^2.0.2", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/multistream-select/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/multistream-select/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/peer-collections": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.1.5.tgz", + "integrity": "sha512-/9VisdPC7+15n/0XntjGCzJ2Ky/zZnqdnuLNEwdu2LuTCbWTaqItG36ecgcVdO9L/V4mELwgY5XCjZKBDrYgjA==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@libp2p/peer-id": "^4.0.5" + } + }, + "node_modules/@libp2p/peer-id": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-4.0.5.tgz", + "integrity": "sha512-/J9U6I/CWSOsYrTpFZpRQrhOhi+bp9WFp7+9Gc7kVt/oevIYTapUEjpxevjViem9ddR5RbdYeCj4ZLHA04QOoQ==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "multiformats": "^13.0.0", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/peer-id-factory": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id-factory/-/peer-id-factory-4.0.5.tgz", + "integrity": "sha512-9fy1TCiBViqIFuoFzW/o9fVh3j600IYDHaXUqvx6HQFeB/dEM8utRU4FxVZVv/MMcKfUf7mydHXVHRyp28uG8w==", + "dependencies": { + "@libp2p/crypto": "^4.0.1", + "@libp2p/interface": "^1.1.2", + "@libp2p/peer-id": "^4.0.5", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/peer-id-factory/node_modules/@libp2p/crypto": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.0.1.tgz", + "integrity": "sha512-lKGbX8TvQt4JbqlttdexEz2VtYJnTwY31kVBDQviwt0pMF+6Uy2hzNnEQ1FHZBwnow8BIlyb6UevHfgyOFlnkw==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.3", + "asn1js": "^3.0.5", + "multiformats": "^13.0.0", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/peer-id-factory/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/peer-id-factory/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/peer-id/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/peer-id/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/peer-record": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-7.0.6.tgz", + "integrity": "sha512-mo7WyJltQU5byC1cwMzqGnzlrSsqkCg8AKhWb0wscuIz2LH6cevmkq+h9mzDnn0KGzJIpZvlInygRVxA/SHS3A==", + "dependencies": { + "@libp2p/crypto": "^4.0.1", + "@libp2p/interface": "^1.1.2", + "@libp2p/peer-id": "^4.0.5", + "@libp2p/utils": "^5.2.2", + "@multiformats/multiaddr": "^12.1.10", + "protons-runtime": "^5.0.0", + "uint8-varint": "^2.0.2", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/peer-record/node_modules/@libp2p/crypto": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.0.1.tgz", + "integrity": "sha512-lKGbX8TvQt4JbqlttdexEz2VtYJnTwY31kVBDQviwt0pMF+6Uy2hzNnEQ1FHZBwnow8BIlyb6UevHfgyOFlnkw==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.3", + "asn1js": "^3.0.5", + "multiformats": "^13.0.0", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/peer-record/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/peer-record/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/peer-store": { + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-10.0.7.tgz", + "integrity": "sha512-gZFa1qlYE51dRK+zW1Apq051L2BcC320CSGONYnxHTM1QNLCL3UIPgWeQEQb+OW0Qdv7VAT8OHaSM0nv2q0x9w==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@libp2p/peer-collections": "^5.1.5", + "@libp2p/peer-id": "^4.0.5", + "@libp2p/peer-record": "^7.0.6", + "@multiformats/multiaddr": "^12.1.10", + "interface-datastore": "^8.2.0", + "it-all": "^3.0.2", + "mortice": "^3.0.1", + "multiformats": "^13.0.0", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/peer-store/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/peer-store/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/ping": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@libp2p/ping/-/ping-1.0.10.tgz", + "integrity": "sha512-OR5hJ07YoyKpeU8B5oAnhnOlztf7rtldtplO275O1MFAk9jj/Y1/TiIBZsbmOG/6mAp/SaY7XwfnQeoYI4bmVw==", + "dependencies": { + "@libp2p/crypto": "^4.0.1", + "@libp2p/interface": "^1.1.2", + "@libp2p/interface-internal": "^1.0.7", + "@multiformats/multiaddr": "^12.1.10", + "it-first": "^3.0.3", + "it-pipe": "^3.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/ping/node_modules/@libp2p/crypto": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.0.1.tgz", + "integrity": "sha512-lKGbX8TvQt4JbqlttdexEz2VtYJnTwY31kVBDQviwt0pMF+6Uy2hzNnEQ1FHZBwnow8BIlyb6UevHfgyOFlnkw==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.3", + "asn1js": "^3.0.5", + "multiformats": "^13.0.0", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/ping/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@libp2p/ping/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/utils": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-5.2.2.tgz", + "integrity": "sha512-h7pNWv8Kyn7Mji8oNE/H6boon66Qu/GCsjjC3zIrHscRqeLPK0zR2EZlhWhfffObF//s0v0++okQNH5HsFQIPQ==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.2", + "@libp2p/interface": "^1.1.2", + "@libp2p/logger": "^4.0.5", + "@multiformats/multiaddr": "^12.1.10", + "@multiformats/multiaddr-matcher": "^1.1.0", + "delay": "^6.0.0", + "get-iterator": "^2.0.1", + "is-loopback-addr": "^2.0.1", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "p-defer": "^4.0.0", + "private-ip": "^3.0.1", + "race-event": "^1.1.0", + "race-signal": "^1.0.2", + "uint8arraylist": "^2.4.7" + } + }, + "node_modules/@libp2p/websockets": { + "version": "8.0.12", + "resolved": "https://registry.npmjs.org/@libp2p/websockets/-/websockets-8.0.12.tgz", + "integrity": "sha512-xJ1g6vrMvuEOwzABwCl1LIOdoKL7pwn6wdWlJs0RUYeFNaepYcDEd/gTipNNci+yoXICvx4/cBzMR3Kksj2ZFQ==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@libp2p/utils": "^5.2.2", + "@multiformats/mafmt": "^12.1.6", + "@multiformats/multiaddr": "^12.1.10", + "@multiformats/multiaddr-to-uri": "^9.0.2", + "@types/ws": "^8.5.4", + "it-ws": "^6.1.0", + "p-defer": "^4.0.0", + "wherearewe": "^2.0.1", + "ws": "^8.12.1" + } + }, + "node_modules/@multiformats/mafmt": { + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@multiformats/mafmt/-/mafmt-12.1.6.tgz", + "integrity": "sha512-tlJRfL21X+AKn9b5i5VnaTD6bNttpSpcqwKVmDmSHLwxoz97fAHaepqFOk/l1fIu94nImIXneNbhsJx/RQNIww==", + "dependencies": { + "@multiformats/multiaddr": "^12.0.0" + } + }, + "node_modules/@multiformats/multiaddr": { + "version": "12.1.12", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.1.12.tgz", + "integrity": "sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "@chainsafe/netmask": "^2.0.0", + "@libp2p/interface": "^1.0.0", + "dns-over-http-resolver": "3.0.0", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@multiformats/multiaddr-matcher": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-matcher/-/multiaddr-matcher-1.1.0.tgz", + "integrity": "sha512-B/QbKpAxaHYVXFnbTdTgYqPDxmqoF2RYffwYoOv1MWfi2vBCZLdzmEKUBKv6fQr6s+LJFSHn2j2vczmwMFCQIA==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "@multiformats/multiaddr": "^12.0.0", + "multiformats": "^12.0.1" + } + }, + "node_modules/@multiformats/multiaddr-matcher/node_modules/multiformats": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz", + "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@multiformats/multiaddr-to-uri": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-9.0.7.tgz", + "integrity": "sha512-i3ldtPMN6XJt+MCi34hOl0wGuGEHfWWMw6lmNag5BpckPwPTf9XGOOFMmh7ed/uO3Vjah/g173iOe61HTQVoBA==", + "dependencies": { + "@multiformats/multiaddr": "^12.0.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@multiformats/multiaddr/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/@multiformats/multiaddr/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@noble/ciphers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz", + "integrity": "sha512-QCOA9cgf3Rc33owG0AYBB9wszz+Ul2kramWN8tXG44Gyciud/tbkEqvxRF/IpqQaBpRBNi9f4jdNxqB2CQCIXg==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", + "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "dependencies": { + "@noble/hashes": "1.3.3" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.2.tgz", + "integrity": "sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/node": { + "version": "18.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.3.tgz", + "integrity": "sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/ws": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, + "node_modules/@wasmer/wasi": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@wasmer/wasi/-/wasi-0.12.0.tgz", + "integrity": "sha512-FJhLZKAfLWm/yjQI7eCRHNbA8ezmb7LSpUYFkHruZXs2mXk2+DaQtSElEtOoNrVQ4vApTyVaAd5/b7uEu8w6wQ==", + "dependencies": { + "browser-process-hrtime": "^1.0.0", + "buffer-es6": "^4.9.3", + "path-browserify": "^1.0.0", + "randomfill": "^1.0.4" + } + }, + "node_modules/@wasmer/wasmfs": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@wasmer/wasmfs/-/wasmfs-0.12.0.tgz", + "integrity": "sha512-m1ftchyQ1DfSenm5XbbdGIpb6KJHH5z0gODo3IZr6lATkj4WXfX/UeBTZ0aG9YVShBp+kHLdUHvOkqjy6p/GWw==", + "dependencies": { + "memfs": "3.0.4", + "pako": "^1.0.11", + "tar-stream": "^2.1.0" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-signal": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-4.1.1.tgz", + "integrity": "sha512-iADenERppdC+A2YKbOXXB2WUeABLaM6qnpZ70kZbPZ1cZMMJ7eF+3CaYm+/PhBizgkzlvssC7QuHS30oOiQYWA==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dependencies": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" + }, + "node_modules/browserslist": { + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-es6": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/buffer-es6/-/buffer-es6-4.9.3.tgz", + "integrity": "sha512-Ibt+oXxhmeYJSsCkODPqNpPmyegefiD8rfutH1NYGhMZQhSp95Rz7haemgnJ6dxa6LT+JLLbtgOMORRluwKktw==" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001574", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz", + "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/datastore-core": { + "version": "9.2.7", + "resolved": "https://registry.npmjs.org/datastore-core/-/datastore-core-9.2.7.tgz", + "integrity": "sha512-S5ADNGRy1p6kHT6Khld+FThe1ITHuUiyYQ84VX2Kv8s6cXDiUuLlYPBIbZaWIgqR/JwxQCwa+5/08w6BZSIAow==", + "dependencies": { + "@libp2p/logger": "^4.0.1", + "err-code": "^3.0.1", + "interface-store": "^5.0.0", + "it-all": "^3.0.1", + "it-drain": "^3.0.1", + "it-filter": "^3.0.0", + "it-map": "^3.0.1", + "it-merge": "^3.0.1", + "it-pipe": "^3.0.0", + "it-pushable": "^3.0.0", + "it-sort": "^3.0.1", + "it-take": "^3.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/datastore-core/node_modules/multiformats": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz", + "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw==" + }, + "node_modules/datastore-core/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-equal": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.1.tgz", + "integrity": "sha512-lKdkdV6EOGoVn65XaOsPdH4rMxTZOnmFyuIkMjM1i5HHCbfjC97dawgTAy0deYNfuqUqW+Q5VrVaQYtUpSd6yQ==", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.0", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-import": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/default-import/-/default-import-1.1.5.tgz", + "integrity": "sha512-aaJ6uzZlmaEcN1U8yvtiyV7MG3/zZQf1XtGSW5dTfAVvfk0VZuriJelXxVL9a0ni42vMkhjWcztFfpIhwFcfOQ==", + "engines": { + "node": ">=14" + } + }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delay": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz", + "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dns-over-http-resolver": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-3.0.0.tgz", + "integrity": "sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==", + "dependencies": { + "debug": "^4.3.4", + "receptacle": "^1.3.2" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.620", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.620.tgz", + "integrity": "sha512-a2fcSHOHrqBJsPNXtf6ZCEZpXrFCcbK1FBxfX3txoqWzNgtEDG1f3M59M98iwxhRW4iMKESnSjbJ310/rkrp0g==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/err-code": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", + "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==" + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/event-iterator": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", + "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==" + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-extend": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fast-extend/-/fast-extend-1.0.2.tgz", + "integrity": "sha512-XXA9RmlPatkFKUzqVZAFth18R4Wo+Xug/S+C7YlYA3xrXwfPlW3dqNwOb4hvQo7wZJ2cNDYhrYuPzVOfHy5/uQ==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs-monkey": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-0.3.3.tgz", + "integrity": "sha512-FNUvuTAJ3CqCQb5ELn+qCbGR/Zllhf2HtwsdAtBi59s1WeCjKMT81fHcSu7dwIskqGVK+MmOrb7VOBlq3/SItw==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-2.0.1.tgz", + "integrity": "sha512-7HuY/hebu4gryTDT7O/XY/fvY9wRByEGdK6QOa4of8npTcv0+NS6frFKABcf6S9EBAsveTuKTsZQQBFMMNILIg==" + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/interface-datastore": { + "version": "8.2.10", + "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.10.tgz", + "integrity": "sha512-D8RuxMdjOPB+j6WMDJ+I2aXTDzUT6DIVjgzo1E+ODL7w8WrSFl9FXD2SYmgj6vVzdb7Kb5qmAI9pEnDZJz7ifg==", + "dependencies": { + "interface-store": "^5.0.0", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/interface-datastore/node_modules/multiformats": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz", + "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw==" + }, + "node_modules/interface-datastore/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/interface-store": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.7.tgz", + "integrity": "sha512-DVMTgZ43NAdDtXL3QsEq8N0vuUYVBxiGbxN0uI0lrNasuX/CGSrU7bjOO2DaGTMNut4Pt3ae+VQYFvNtH4Oyeg==" + }, + "node_modules/internal-slot": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "dependencies": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ip-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-5.0.0.tgz", + "integrity": "sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ipaddr.js": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", + "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-electron": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz", + "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-loopback-addr": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-loopback-addr/-/is-loopback-addr-2.0.2.tgz", + "integrity": "sha512-26POf2KRCno/KTNL5Q0b/9TYnL00xEsSaLfiFRmjM7m7Lw7ZMmFybzzuX4CcsLAluZGd+niLUiMRxEooVE3aqg==" + }, + "node_modules/is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-observable": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-2.1.0.tgz", + "integrity": "sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", + "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/it-all": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.4.tgz", + "integrity": "sha512-UMiy0i9DqCHBdWvMbzdYvVGa5/w4t1cc4nchpbnjdLhklglv8mQeEYnii0gvKESJuL1zV32Cqdb33R6/GPfxpQ==" + }, + "node_modules/it-byte-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/it-byte-stream/-/it-byte-stream-1.0.7.tgz", + "integrity": "sha512-oWO+TitZNn1a7+Yl0SM4UAyuylhJ3MmnnewVWO5shl0Bs1KQPMWuMB/6d0X0H1ygBlYCLAxF9EJqa19pWCnVRQ==", + "dependencies": { + "it-stream-types": "^2.0.1", + "p-defer": "^4.0.0", + "race-signal": "^1.0.1", + "uint8arraylist": "^2.4.1" + } + }, + "node_modules/it-drain": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.5.tgz", + "integrity": "sha512-qYFe4SWdvs9oJGUY5bSjvmiLUMLzFEODNOQUdYdCIkuIgQF+AUB2INhM4yQ09buJ2rhHKDFxvTD/+yUq6qg0XA==" + }, + "node_modules/it-filter": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.0.4.tgz", + "integrity": "sha512-e0sz+st4sudK/zH6GZ/gRTRP8A/ADuJFCYDmRgMbZvR79y5+v4ZXav850bBZk5wL9zXaYZFxS1v/6Qi+Vjwh5g==", + "dependencies": { + "it-peekable": "^3.0.0" + } + }, + "node_modules/it-first": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.4.tgz", + "integrity": "sha512-FtQl84iTNxN5EItP/JgL28V2rzNMkCzTUlNoj41eVdfix2z1DBuLnBqZ0hzYhGGa1rMpbQf0M7CQSA2adlrLJg==" + }, + "node_modules/it-foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.0.6.tgz", + "integrity": "sha512-OVosBHJsdXpAyeFlCbe3IGZia+65UykyAznakNsKXK+b99dbhuu/mOnXxTadDEo1GWhKx+WA8RNanKkMf07zQw==", + "dependencies": { + "it-peekable": "^3.0.0" + } + }, + "node_modules/it-length-prefixed": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-9.0.3.tgz", + "integrity": "sha512-YAu424ceYpXctxtjcLOqn7vJq082CaoP8J646ZusYISfQc3bpzQErgTUqMFj81V262KG2W9/YMBHsy6A/4yvmg==", + "dependencies": { + "err-code": "^3.0.1", + "it-reader": "^6.0.1", + "it-stream-types": "^2.0.1", + "uint8-varint": "^2.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/it-length-prefixed-stream": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/it-length-prefixed-stream/-/it-length-prefixed-stream-1.1.5.tgz", + "integrity": "sha512-r/txldLo3Dq4EqLJY2mSK6y59qY7peRyomdjyhCmBlQYr7fPmiS1UA5A8mLwQV3k+WPD5zK0cu/7EpvzD4T+ew==", + "dependencies": { + "it-byte-stream": "^1.0.0", + "it-length-prefixed": "^9.0.1", + "it-stream-types": "^2.0.1", + "uint8-varint": "^2.0.1", + "uint8arraylist": "^2.4.1" + } + }, + "node_modules/it-map": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/it-map/-/it-map-3.0.5.tgz", + "integrity": "sha512-hB0TDXo/h4KSJJDSRLgAPmDroiXP6Fx1ck4Bzl3US9hHfZweTKsuiP0y4gXuTMcJlS6vj0bb+f70rhkD47ZA3w==", + "dependencies": { + "it-peekable": "^3.0.0" + } + }, + "node_modules/it-merge": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.3.tgz", + "integrity": "sha512-FYVU15KC5pb/GQX1Ims+lee8d4pdqGVCpWr0lkNj8o4xuNo7jY71k6GuEiWdP+T7W1bJqewSxX5yoTy5yZpRVA==", + "dependencies": { + "it-pushable": "^3.2.0" + } + }, + "node_modules/it-pair": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz", + "integrity": "sha512-5M0t5RAcYEQYNG5BV7d7cqbdwbCAp5yLdzvkxsZmkuZsLbTdZzah6MQySYfaAQjNDCq6PUnDt0hqBZ4NwMfW6g==", + "dependencies": { + "it-stream-types": "^2.0.1", + "p-defer": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/it-parallel": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/it-parallel/-/it-parallel-3.0.6.tgz", + "integrity": "sha512-i7UM7I9LTkDJw3YIqXHFAPZX6CWYzGc+X3irdNrVExI4vPazrJdI7t5OqrSVN8CONXLAunCiqaSV/zZRbQR56A==", + "dependencies": { + "p-defer": "^4.0.0" + } + }, + "node_modules/it-peekable": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.3.tgz", + "integrity": "sha512-Wx21JX/rMzTEl9flx3DGHuPV1KQFGOl8uoKfQtmZHgPQtGb89eQ6RyVd82h3HuP9Ghpt0WgBDlmmdWeHXqyx7w==" + }, + "node_modules/it-pipe": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", + "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", + "dependencies": { + "it-merge": "^3.0.0", + "it-pushable": "^3.1.2", + "it-stream-types": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/it-protobuf-stream": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.2.tgz", + "integrity": "sha512-epZBuG+7cPaTxCR/Lf3ApshBdA9qfflGPQLfLLrp9VQ0w67Z2xo4H+SLLetav57/29oPtAXwVaoyemg99JOWzA==", + "dependencies": { + "it-length-prefixed-stream": "^1.0.0", + "it-stream-types": "^2.0.1", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.1" + } + }, + "node_modules/it-pushable": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", + "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", + "dependencies": { + "p-defer": "^4.0.0" + } + }, + "node_modules/it-reader": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/it-reader/-/it-reader-6.0.4.tgz", + "integrity": "sha512-XCWifEcNFFjjBHtor4Sfaj8rcpt+FkY0L6WdhD578SCDhV4VUm7fCkF3dv5a+fTcfQqvN9BsxBTvWbYO6iCjTg==", + "dependencies": { + "it-stream-types": "^2.0.1", + "uint8arraylist": "^2.0.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/it-sort": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/it-sort/-/it-sort-3.0.4.tgz", + "integrity": "sha512-tvnC93JZZWjX4UxALy0asow0dzXabkoaRbrPJKClTKhNCqw4gzHr+H5axf1gohcthedRRkqd/ae+wl7WqoxFhw==", + "dependencies": { + "it-all": "^3.0.0" + } + }, + "node_modules/it-stream-types": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.1.tgz", + "integrity": "sha512-6DmOs5r7ERDbvS4q8yLKENcj6Yecr7QQTqWApbZdfAUTEC947d+PEha7PCqhm//9oxaLYL7TWRekwhoXl2s6fg==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/it-take": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/it-take/-/it-take-3.0.4.tgz", + "integrity": "sha512-RG8HDjAZlvkzz5Nav4xq6gK5zNT+Ff1UTIf+CrSJW8nIl6N1FpBH5e7clUshiCn+MmmMoSdIEpw4UaTolszxhA==" + }, + "node_modules/it-ws": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/it-ws/-/it-ws-6.1.1.tgz", + "integrity": "sha512-oyk4eCeZto2lzWDnJOa3j1S2M+VOGKUh8isEf94ySoaL6IFlyie0T4P9E0ZUaIvX8LyJxYFHFKCt8Zk7Sm/XPQ==", + "dependencies": { + "@types/ws": "^8.2.2", + "event-iterator": "^2.0.0", + "it-stream-types": "^2.0.1", + "uint8arrays": "^5.0.0", + "ws": "^8.4.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/it-ws/node_modules/multiformats": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz", + "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw==" + }, + "node_modules/it-ws/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/jest": { + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.5.0.tgz", + "integrity": "sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==", + "dev": true, + "dependencies": { + "@jest/core": "^29.5.0", + "@jest/types": "^29.5.0", + "import-local": "^3.0.2", + "jest-cli": "^29.5.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-base64": { + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", + "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "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==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/libp2p": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-1.2.0.tgz", + "integrity": "sha512-ATtldazSGZqkSLPFD4t00Cizvbex4N0XilFHEIp5IRu0r6klOVLwD9s6/XtZswQqXQmkv71UW6nnNa30EAHsvA==", + "dependencies": { + "@libp2p/crypto": "^4.0.1", + "@libp2p/interface": "^1.1.2", + "@libp2p/interface-internal": "^1.0.7", + "@libp2p/logger": "^4.0.5", + "@libp2p/multistream-select": "^5.1.2", + "@libp2p/peer-collections": "^5.1.5", + "@libp2p/peer-id": "^4.0.5", + "@libp2p/peer-id-factory": "^4.0.5", + "@libp2p/peer-store": "^10.0.7", + "@libp2p/utils": "^5.2.2", + "@multiformats/multiaddr": "^12.1.10", + "any-signal": "^4.1.1", + "datastore-core": "^9.0.1", + "interface-datastore": "^8.2.0", + "it-merge": "^3.0.0", + "it-parallel": "^3.0.6", + "merge-options": "^3.0.4", + "multiformats": "^13.0.0", + "private-ip": "^3.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/libp2p/node_modules/@libp2p/crypto": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.0.1.tgz", + "integrity": "sha512-lKGbX8TvQt4JbqlttdexEz2VtYJnTwY31kVBDQviwt0pMF+6Uy2hzNnEQ1FHZBwnow8BIlyb6UevHfgyOFlnkw==", + "dependencies": { + "@libp2p/interface": "^1.1.2", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.3", + "asn1js": "^3.0.5", + "multiformats": "^13.0.0", + "protons-runtime": "^5.0.0", + "uint8arraylist": "^2.4.7", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/libp2p/node_modules/multiformats": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.1.tgz", + "integrity": "sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==" + }, + "node_modules/libp2p/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/loglevel": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", + "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/memfs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.0.4.tgz", + "integrity": "sha512-OcZEzwX9E5AoY8SXjuAvw0DbIAYwUzV/I236I8Pqvrlv7sL/Y0E9aRCon05DhaV8pg1b32uxj76RgW0s5xjHBA==", + "dependencies": { + "fast-extend": "1.0.2", + "fs-monkey": "0.3.3" + } + }, + "node_modules/merge-options": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", + "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", + "dependencies": { + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mortice": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/mortice/-/mortice-3.0.4.tgz", + "integrity": "sha512-MUHRCAztSl4v/dAmK8vbYi5u1n9NZtQu4H3FsqS7qgMFQIAFw9lTpHiErd9kJpapqmvEdD1L3dUmiikifAvLsQ==", + "dependencies": { + "observable-webworkers": "^2.0.1", + "p-queue": "^8.0.1", + "p-timeout": "^6.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/multiformats": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", + "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/observable-fns": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/observable-fns/-/observable-fns-0.6.1.tgz", + "integrity": "sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg==" + }, + "node_modules/observable-webworkers": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/observable-webworkers/-/observable-webworkers-2.0.1.tgz", + "integrity": "sha512-JI1vB0u3pZjoQKOK1ROWzp0ygxSi7Yb0iR+7UNsw4/Zn4cQ0P3R7XL38zac/Dy2tEA7Lg88/wIJTjF8vYXZ0uw==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-defer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.0.tgz", + "integrity": "sha512-Vb3QRvQ0Y5XnF40ZUWW7JfLogicVh/EnA5gBIvKDJoYpeI82+1E3AlB9yOcKFS0AhHrWVnAQO39fbR0G99IVEQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-queue": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.0.1.tgz", + "integrity": "sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA==", + "dependencies": { + "eventemitter3": "^5.0.1", + "p-timeout": "^6.1.2" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.2.tgz", + "integrity": "sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prettier": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/private-ip": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/private-ip/-/private-ip-3.0.1.tgz", + "integrity": "sha512-Ezc16ANuhSHmWAE6lbXUKburNzGpR0J5X0Zh5Um/PZ/s57Fp+HYqYe6BYPH2QbqKr/5WebfzJQ1jq6Kj5dbRmA==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "ip-regex": "^5.0.0", + "ipaddr.js": "^2.1.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/progress-events": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/progress-events/-/progress-events-1.0.0.tgz", + "integrity": "sha512-zIB6QDrSbPfRg+33FZalluFIowkbV5Xh1xSuetjG+rlC5he6u2dc6VQJ0TbMdlN3R1RHdpOqxEFMKTnQ+itUwA==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/protons-runtime": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.2.1.tgz", + "integrity": "sha512-Rt4ORm1WR62ysrXX5sCV32a5jPwVoIpU90XUzrdAfMIOSNTizvqlx/7wedNpogvZjUUY/gLJp3VftpA+ebx/og==", + "dependencies": { + "uint8arraylist": "^2.4.3", + "uint8arrays": "^5.0.1" + } + }, + "node_modules/protons-runtime/node_modules/multiformats": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz", + "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw==" + }, + "node_modules/protons-runtime/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/pure-rand": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", + "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/pvtsutils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "dependencies": { + "tslib": "^2.6.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", + "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/race-event": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/race-event/-/race-event-1.1.0.tgz", + "integrity": "sha512-8BTiN6IAbov8mqkVEc3LiYbtUzanLfzFhwPF7kZV74ztYeQXdFPIgMCd/sy8xie6ZMtf2JPeMBedx78/RRNO3g==" + }, + "node_modules/race-signal": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.0.2.tgz", + "integrity": "sha512-o3xNv0iTcIDQCXFlF6fPAMEBRjFxssgGoRqLbg06m+AdzEXXLUmoNOoUHTVz2NoBI8hHwKFKoC6IqyNtWr2bww==" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/receptacle": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/receptacle/-/receptacle-1.3.2.tgz", + "integrity": "sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/rxjs": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", + "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "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" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "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" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tiny-worker": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tiny-worker/-/tiny-worker-2.3.0.tgz", + "integrity": "sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==", + "optional": true, + "dependencies": { + "esm": "^3.2.25" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-jest": { + "version": "29.1.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.0.tgz", + "integrity": "sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==", + "dev": true, + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "7.x", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uint8-varint": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.3.tgz", + "integrity": "sha512-seXTM8ba4uuAMDgi3UHXPdDxCBKjWWZigW+F+1ESPhOZv9ekT1qmbdzYHLSNA+u+wHj10P55dQ41y2Qh7NOqiA==", + "dependencies": { + "uint8arraylist": "^2.0.0", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/uint8-varint/node_modules/multiformats": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz", + "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw==" + }, + "node_modules/uint8-varint/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/uint8arraylist": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", + "integrity": "sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==", + "dependencies": { + "uint8arrays": "^5.0.1" + } + }, + "node_modules/uint8arraylist/node_modules/multiformats": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz", + "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw==" + }, + "node_modules/uint8arraylist/node_modules/uint8arrays": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz", + "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/uint8arrays": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.3.tgz", + "integrity": "sha512-b+aKlI2oTnxnfeSQWV1sMacqSNxqhtXySaH6bflvONGxF8V/fT3ZlYH7z2qgGfydsvpVo4JUgM/Ylyfl2YouCg==", + "dependencies": { + "multiformats": "^11.0.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/wherearewe": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wherearewe/-/wherearewe-2.0.1.tgz", + "integrity": "sha512-XUguZbDxCA2wBn2LoFtcEhXL6AXo+hVjGonwhSTTTU9SzbWG8Xu3onNIpzf9j/mYUcJQ0f+m37SzG77G851uFw==", + "dependencies": { + "is-electron": "^2.2.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.22.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", + "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/integration-tests/package.json b/integration-tests/package.json index 7d9d0cec..c9884fcf 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -31,8 +31,7 @@ }, "prettier": {}, "devDependencies": { - "@fluencelabs/aqua-api": "0.13.3", - "@fluencelabs/aqua-dht": "0.2.5", + "@fluencelabs/aqua-api": "0.13.4", "@fluencelabs/aqua-lib": "0.9.0", "@types/jest": "29.5.2", "@types/node": "18.19.3", @@ -44,7 +43,7 @@ }, "dependencies": { "@fluencelabs/fluence-network-environment": "1.1.2", - "@fluencelabs/js-client": "0.5.5", + "@fluencelabs/js-client": "0.6.0", "deep-equal": "2.2.1", "loglevel": "1.8.1" }, diff --git a/integration-tests/src/__test__/examples.spec.ts b/integration-tests/src/__test__/examples.spec.ts index 4c141342..dce66e92 100644 --- a/integration-tests/src/__test__/examples.spec.ts +++ b/integration-tests/src/__test__/examples.spec.ts @@ -40,6 +40,7 @@ import { multipleAbilityWithClosureCall, returnSrvAsAbilityCall, } from "../examples/abilityCall.js"; +import { bugLNG314Call } from "../examples/abilityClosureCall.js"; import { nilLengthCall, nilLiteralCall, @@ -90,7 +91,7 @@ import { streamArgsCall, modifyStreamCall, returnDerivedStreamCall, - lng280BugWithForEmptyStreamFuncCall + lng280BugWithForEmptyStreamFuncCall, } from "../examples/streamArgsCall.js"; import { streamResultsCall } from "../examples/streamResultsCall.js"; import { structuralTypingCall } from "../examples/structuralTypingCall.js"; @@ -120,6 +121,7 @@ import { lng193BugCall } from "../examples/closureReturnRename.js"; import { closuresCall, multipleClosuresLNG262BugCall, + lng317BugCall, } from "../examples/closures.js"; import { closureArrowCaptureCall } from "../examples/closureArrowCapture.js"; import { @@ -135,7 +137,6 @@ import { joinIdxLocalCall, joinIdxRelayCall, } from "../examples/joinCall.js"; -import { recursiveStreamsCall } from "../examples/recursiveStreamsCall.js"; import { renameVarsCall } from "../examples/renameVars.js"; import { arraySugarCall, @@ -161,6 +162,12 @@ import { returnArrowCall, returnArrowChainCall, } from "../examples/returnArrowCall.js"; +import { rangeCall } from "../examples/recursiveStreams/rangeCall.js"; +import { nestedCall } from "../examples/recursiveStreams/nestedCall.js"; +import { yesNoStreamCall } from "../examples/recursiveStreams/yesNoStreamCall.js"; +import { multiRecStreamCall } from "../examples/recursiveStreams/multiRecStreamCall.js"; +import { pipelineStreamCall } from "../examples/recursiveStreams/pipelineCall.js"; +import { remoteRecStreamCall } from "../examples/recursiveStreams/remoteRecCall.js"; var selfPeerId: string; var peer1: IFluenceClient; @@ -176,22 +183,12 @@ import log from "loglevel"; // log.setDefaultLevel("debug") async function start() { - console.log("CONNECTING TO FIRST:"); - Fluence.onConnectionStateChange((s) => { - console.log(s); - }); await Fluence.connect(relay1, {}); - const cl = await Fluence.getClient(); - peer1 = cl; - selfPeerId = cl.getPeerId(); - console.log("CONNECTED"); - peer2 = await createClient(relay2, {}); - console.log("CONNECTING TO SECOND:"); - peer2.onConnectionStateChange((s) => { - console.log(s); - }); - console.log("CONNECTED"); + peer1 = Fluence.getClient(); + selfPeerId = peer1.getPeerId(); + + peer2 = await createClient(relay2); } async function stop() { @@ -217,6 +214,77 @@ describe("Testing examples", () => { await stop(); }); + describe("for ... rec", () => { + const range = (start: number, end: number) => + Array.from({ length: end - start }, (v, k) => k + start); + + it("range", async () => { + for (const i of range(-5, 5)) { + for (const j of range(-5, 5)) { + const result = await rangeCall(i, j); + if (i < j) { + expect(result).toEqual(range(i, j)); + } else { + expect(result).toEqual([]); + } + } + } + }, 15000); + + /** + * This test does not work due to Aqua VM + */ + it.skip("nested", async () => { + for (const i of range(0, 10)) { + const result = await nestedCall(i); + expect(result).toEqual(range(0, i).flatMap((x) => range(0, x + 1))); + } + }, 15000); + + it("yes|no stream", async () => { + for (const i of range(1, 10)) { + const yesNo = await yesNoStreamCall(i); + expect(yesNo).toEqual( + range(0, i) + .map((_) => "yes") + .concat(["no"]), + ); + } + }, 15000); + + it("multi rec stream", async () => { + const handle = (i: number) => { + if (i % 3 === 0) return [i + 1]; + if (i % 3 === 1) return [i + 1, i + 2]; + return []; + }; + for (const i of range(1, 10)) { + const loop = await multiRecStreamCall(0, i, handle); + range(0, i + 1).forEach((j) => { + expect(loop).toContain(j); + }); + } + }, 15000); + + it("pipeline", async () => { + for (const i of range(1, 10)) { + const result = await pipelineStreamCall(0, i); + expect(result.sort()).toEqual(range(0, i + 1)); + } + }, 15000); + + /** + * This test does not work due to `for ... rec` + * not taking topology into account + */ + it.skip("remote rec", async () => { + for (const i of range(0, 10)) { + const result = await remoteRecStreamCall(0, i, peer2); + expect(result).toEqual(range(0, i + 1)); + } + }, 15000); + }); + it("callArrow.aqua args bug 426", async () => { let argResult = await reproArgsBug426Call(); @@ -590,6 +658,11 @@ describe("Testing examples", () => { expect(result).toStrictEqual(["default-id", "resolved-id"]); }); + it("abilitiesClosure.aqua bug LNG-314", async () => { + let result = await bugLNG314Call(); + expect(result).toEqual("strstrstr"); + }); + it("functors.aqua LNG-119 bug", async () => { let result = await bugLng119Call(); expect(result).toEqual([1]); @@ -630,29 +703,41 @@ describe("Testing examples", () => { it.skip("streamArgs.aqua LNG-280 with for", async () => { let result = await lng280BugWithForCall(); expect(result).toEqual([ - "valueUseStream", - "valueReturnStream", - "valueUseStream", - "valueReturnStream", - "valueUseStream", - "valueReturnStream" + "valueUseStream", + "valueReturnStream", + "valueUseStream", + "valueReturnStream", + "valueUseStream", + "valueReturnStream", ]); }); it("streamArgs.aqua LNG-280 with for and anonymous stream", async () => { let result = await lng280BugWithForAnonStreamCall(); - expect(result).toEqual([[1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]); + expect(result).toEqual([ + [1, 1], + [1, 2], + [1, 3], + [1, 4], + [1, 5], + ]); }); it("streamArgs.aqua LNG-280 with for and anonymous stream from function", async () => { - let result = await lng280BugWithForEmptyStreamFuncCall(); - expect(result).toEqual([[1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]); - }); + let result = await lng280BugWithForEmptyStreamFuncCall(); + expect(result).toEqual([ + [1, 1], + [1, 2], + [1, 3], + [1, 4], + [1, 5], + ]); + }); it.skip("streamArgs.aqua return derived stream", async () => { - let result = await returnDerivedStreamCall(); - expect(result).toEqual([1]); - }); + let result = await returnDerivedStreamCall(); + expect(result).toEqual([1]); + }); it("streamResults.aqua", async () => { let streamResultsResult = await streamResultsCall(); @@ -822,15 +907,6 @@ describe("Testing examples", () => { // expect(res).toEqual("ok") // }); - // TODO: uncomment - // it('recursiveStreams.aqua', async () => { - // let [sucList, loopList] = await recursiveStreamsCall(); - // console.log(sucList); - // console.log(loopList); - // expect(loopList).toEqual(['yes', 'yes', 'yes', 'yes', 'no']); - // expect(sucList.length).toEqual(5); - // }); - it("renameVars.aqua", async () => { let renameVarsResult = await renameVarsCall(); expect(renameVarsResult).toEqual(["ok", "ok"]); @@ -1025,6 +1101,11 @@ describe("Testing examples", () => { expect(result).toEqual([1, 2]); }); + it("closures.aqua bug LNG-317", async () => { + let result = await lng317BugCall(); + expect(result).toEqual(["empty", "identity"]); + }); + it("closureArrowCapture.aqua", async () => { let result = await closureArrowCaptureCall("input"); expect(result).toEqual("call: ".repeat(4) + "input"); diff --git a/integration-tests/src/examples/abilityClosureCall.ts b/integration-tests/src/examples/abilityClosureCall.ts new file mode 100644 index 00000000..5cbb5c5e --- /dev/null +++ b/integration-tests/src/examples/abilityClosureCall.ts @@ -0,0 +1,7 @@ +import { + bugLNG314 +} from "../compiled/examples/abilitiesClosure.js"; + +export async function bugLNG314Call(): Promise { + return await bugLNG314(); +} diff --git a/integration-tests/src/examples/closures.ts b/integration-tests/src/examples/closures.ts index ba516190..4c3aaca6 100644 --- a/integration-tests/src/examples/closures.ts +++ b/integration-tests/src/examples/closures.ts @@ -5,6 +5,7 @@ import { registerLocalSrv, closureOut2, lng58Bug, + lng317Bug, multipleClosuresBugLNG262 } from "../compiled/examples/closures.js"; import { config } from "../config.js"; @@ -37,3 +38,7 @@ export async function lng58CBugCall(): Promise { export async function multipleClosuresLNG262BugCall(): Promise<[number, number]> { return multipleClosuresBugLNG262(); } + +export async function lng317BugCall(): Promise { + return lng317Bug(); +} diff --git a/integration-tests/src/examples/recursiveStreams/multiRecStreamCall.ts b/integration-tests/src/examples/recursiveStreams/multiRecStreamCall.ts new file mode 100644 index 00000000..9d27a670 --- /dev/null +++ b/integration-tests/src/examples/recursiveStreams/multiRecStreamCall.ts @@ -0,0 +1,14 @@ +import { + multiRecStream, + registerTestService, +} from "../../compiled/examples/recursiveStreams/multiRec.js"; + +export async function multiRecStreamCall( + init: number, + target: number, + handle: (i: number) => number[], +): Promise { + registerTestService({ handle }); + + return await multiRecStream(init, target); +} diff --git a/integration-tests/src/examples/recursiveStreams/nestedCall.ts b/integration-tests/src/examples/recursiveStreams/nestedCall.ts new file mode 100644 index 00000000..0c3325ee --- /dev/null +++ b/integration-tests/src/examples/recursiveStreams/nestedCall.ts @@ -0,0 +1,5 @@ +import { nested } from "../../compiled/examples/recursiveStreams/nested.js"; + +export async function nestedCall(n: number): Promise { + return await nested(n); +} diff --git a/integration-tests/src/examples/recursiveStreams/pipelineCall.ts b/integration-tests/src/examples/recursiveStreams/pipelineCall.ts new file mode 100644 index 00000000..fbe9f6d0 --- /dev/null +++ b/integration-tests/src/examples/recursiveStreams/pipelineCall.ts @@ -0,0 +1,8 @@ +import { pipelineStream } from "../../compiled/examples/recursiveStreams/pipeline.js"; + +export async function pipelineStreamCall( + init: number, + target: number, +): Promise { + return await pipelineStream(init, target); +} diff --git a/integration-tests/src/examples/recursiveStreams/rangeCall.ts b/integration-tests/src/examples/recursiveStreams/rangeCall.ts new file mode 100644 index 00000000..45d5221a --- /dev/null +++ b/integration-tests/src/examples/recursiveStreams/rangeCall.ts @@ -0,0 +1,5 @@ +import { range } from "../../compiled/examples/recursiveStreams/range.js"; + +export async function rangeCall(a: number, b: number): Promise { + return await range(a, b); +} diff --git a/integration-tests/src/examples/recursiveStreams/remoteRecCall.ts b/integration-tests/src/examples/recursiveStreams/remoteRecCall.ts new file mode 100644 index 00000000..81f30006 --- /dev/null +++ b/integration-tests/src/examples/recursiveStreams/remoteRecCall.ts @@ -0,0 +1,15 @@ +import { IFluenceClient } from "@fluencelabs/js-client"; +import { remoteRecStream } from "../../compiled/examples/recursiveStreams/remoteRec.js"; + +export async function remoteRecStreamCall( + init: number, + target: number, + peer: IFluenceClient, +): Promise { + return await remoteRecStream( + init, + target, + peer.getPeerId(), + peer.getRelayPeerId(), + ); +} diff --git a/integration-tests/src/examples/recursiveStreams/yesNoStreamCall.ts b/integration-tests/src/examples/recursiveStreams/yesNoStreamCall.ts new file mode 100644 index 00000000..8eef91f5 --- /dev/null +++ b/integration-tests/src/examples/recursiveStreams/yesNoStreamCall.ts @@ -0,0 +1,16 @@ +import { + yesNoStream, + registerYesNoService, +} from "../../compiled/examples/recursiveStreams/yesNo.js"; + +export async function yesNoStreamCall(limit: number): Promise { + let i = 1; + registerYesNoService({ + get: () => { + i += 1; + return i > limit ? "no" : "yes"; + }, + }); + + return await yesNoStream(); +} diff --git a/integration-tests/src/examples/recursiveStreamsCall.ts b/integration-tests/src/examples/recursiveStreamsCall.ts deleted file mode 100644 index de3bd1a5..00000000 --- a/integration-tests/src/examples/recursiveStreamsCall.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - recursiveStream, - registerYesNoService, -} from "../compiled/examples/recursiveStreams.js"; - -export async function recursiveStreamsCall(): Promise<[string[], string[]]> { - let i = 0; - registerYesNoService({ - get: () => { - i++; - if (i > 3) { - console.log("return no"); - return "no"; - } else { - console.log("return yes"); - return "yes"; - } - }, - }); - - return await recursiveStream(); -} diff --git a/io/src/main/scala/aqua/SpanParser.scala b/io/src/main/scala/aqua/SpanParser.scala index 5d962931..11aa332a 100644 --- a/io/src/main/scala/aqua/SpanParser.scala +++ b/io/src/main/scala/aqua/SpanParser.scala @@ -3,29 +3,27 @@ package aqua import aqua.files.FileModuleId import aqua.parser.lift.{FileSpan, Span} import aqua.parser.{Ast, Parser, ParserError} + import cats.data.* import cats.parse.LocationMap -import cats.{~>, Comonad, Eval, Monad, Monoid, Order} +import cats.{Comonad, Eval, Monad, Monoid, Order, ~>} object SpanParser extends scribe.Logging { - def parser: FileModuleId => String => ValidatedNec[ParserError[FileSpan.F], Ast[FileSpan.F]] = { + def parser: FileModuleId => String => ValidatedNec[ParserError[FileSpan.F], Ast[FileSpan.F]] = id => - { source => - { - logger.trace(s"creating parser for $id...") - val nat = new (Span.S ~> FileSpan.F) { - override def apply[A](span: Span.S[A]): FileSpan.F[A] = { - ( - FileSpan(id.file.absolute.toString, Eval.later(LocationMap(source)), span._1), - span._2 - ) - } + source => { + logger.trace(s"creating parser for $id...") + val nat = new (Span.S ~> FileSpan.F) { + override def apply[A](span: Span.S[A]): FileSpan.F[A] = { + ( + FileSpan(id.file.absolute.toString, Eval.later(LocationMap(source)), span._1), + span._2 + ) } - val parser = Parser.natParser(Parser.spanParser, nat)(source) - logger.trace("parser created") - parser } + val parser = Parser.natParser(Parser.spanParser, nat)(source) + logger.trace("parser created") + parser } - } } diff --git a/language-server/language-server-api/src/main/scala/aqua/lsp/LspSemantics.scala b/language-server/language-server-api/src/main/scala/aqua/lsp/LspSemantics.scala index b8370023..9ea6dbbc 100644 --- a/language-server/language-server-api/src/main/scala/aqua/lsp/LspSemantics.scala +++ b/language-server/language-server-api/src/main/scala/aqua/lsp/LspSemantics.scala @@ -7,26 +7,26 @@ import aqua.semantics.rules.locations.LocationsState import aqua.semantics.{CompilerState, RawSemantics, SemanticError, SemanticWarning, Semantics} import cats.data.Validated.{Invalid, Valid} +import cats.data.{NonEmptyChain, ValidatedNec} import cats.syntax.applicative.* import cats.syntax.apply.* -import cats.syntax.flatMap.* -import cats.syntax.functor.* -import cats.syntax.foldable.* import cats.syntax.either.* +import cats.syntax.flatMap.* +import cats.syntax.foldable.* +import cats.syntax.functor.* import cats.syntax.reducible.* -import cats.data.{NonEmptyChain, ValidatedNec} import monocle.Lens import monocle.macros.GenLens class LspSemantics[S[_]] extends Semantics[S, LspContext[S]] { private def getImportTokens(ast: Ast[S]): List[LiteralToken[S]] = - ast.collectHead { + ast.head.collect { case ImportExpr(fn) => fn case ImportFromExpr(_, fn) => fn case UseExpr(fn, _) => fn case UseFromExpr(_, fn, _) => fn - }.value.toList + }.toList /** * Process the AST and return the semantics result. diff --git a/language-server/language-server-api/src/test/scala/aqua/lsp/AquaLSPSpec.scala b/language-server/language-server-api/src/test/scala/aqua/lsp/AquaLSPSpec.scala index b490a889..7f561f06 100644 --- a/language-server/language-server-api/src/test/scala/aqua/lsp/AquaLSPSpec.scala +++ b/language-server/language-server-api/src/test/scala/aqua/lsp/AquaLSPSpec.scala @@ -108,22 +108,18 @@ class AquaLSPSpec extends AnyFlatSpec with Matchers with Inside { def compile( src: Map[String, String], imports: Map[String, String] = Map.empty - ): ValidatedNec[AquaError[String, String, S], Map[String, LspContext[S]]] = { + ): ValidatedNec[AquaError[String, String, S], Map[String, LspContext[S]]] = LSPCompiler .compileToLsp[Id, String, String, Span.S]( aquaSource(src, imports), id => txt => Parser.parse(Parser.parserSchema)(txt), AquaCompilerConf(ConstantRaw.defaultConstants(None)) ) - .leftMap { errors => - println(errors) - errors - } - } it should "return right tokens" in { val main = - """module Import + """aqua Import + | |import foo, strFunc, num from "export2.aqua" | |import "../gen/OneMore.aqua" @@ -156,7 +152,7 @@ class AquaLSPSpec extends AnyFlatSpec with Matchers with Inside { ) val firstImport = - """module Export declares strFunc, num, foo + """aqua Export declares strFunc, num, foo | |func absb() -> string: | <- "ff" @@ -173,7 +169,8 @@ class AquaLSPSpec extends AnyFlatSpec with Matchers with Inside { |""".stripMargin val secondImport = - """ + """aqua Export declares OneMore + | |service OneMore: | more_call() | consume(s: string) @@ -226,7 +223,7 @@ class AquaLSPSpec extends AnyFlatSpec with Matchers with Inside { // this is tokens from imports, if we will use `FileSpan.F` file names will be different // OneMore service - res.checkTokenLoc(secondImport, "OneMore", 0, serviceType) shouldBe true + res.checkTokenLoc(secondImport, "OneMore", 1, serviceType) shouldBe true res.checkTokenLoc( secondImport, "more_call", @@ -265,7 +262,7 @@ class AquaLSPSpec extends AnyFlatSpec with Matchers with Inside { ProductType(ScalarType.u32 :: Nil) ) ) shouldBe true - res.checkTokenLoc(firstImport, "someVar", 2, ScalarType.u32, None, true) shouldBe true + res.checkTokenLoc(firstImport, "someVar", 2, ScalarType.u32, None) shouldBe true // foo function res.checkTokenLoc( diff --git a/language-server/language-server-npm/package.json b/language-server/language-server-npm/package.json index d40f2875..023a32c9 100644 --- a/language-server/language-server-npm/package.json +++ b/language-server/language-server-npm/package.json @@ -1,6 +1,6 @@ { "name": "@fluencelabs/aqua-language-server-api", - "version": "0.13.3", + "version": "0.13.4", "description": "Aqua Language Server API", "type": "commonjs", "files": [ diff --git a/linker/src/main/scala/aqua/linker/Linker.scala b/linker/src/main/scala/aqua/linker/Linker.scala index 8669e201..dab46f45 100644 --- a/linker/src/main/scala/aqua/linker/Linker.scala +++ b/linker/src/main/scala/aqua/linker/Linker.scala @@ -1,17 +1,26 @@ package aqua.linker +import aqua.errors.Errors.internalError + +import cats.MonadError import cats.data.{NonEmptyChain, Validated, ValidatedNec} -import cats.kernel.{Monoid, Semigroup} -import cats.syntax.semigroup.* -import cats.syntax.validated.* -import cats.syntax.functor.* import cats.instances.list.* +import cats.kernel.{Monoid, Semigroup} +import cats.syntax.applicative.* +import cats.syntax.flatMap.* +import cats.syntax.functor.* +import cats.syntax.semigroup.* +import cats.syntax.traverse.* +import cats.syntax.validated.* +import scala.annotation.tailrec import scribe.Logging -import scala.annotation.tailrec - object Linker extends Logging { + // Transpilation function for module + // (Imports contexts => Compilation result) + type TP = [F[_], T] =>> Map[String, T] => F[T] + // Dependency Cycle, prev element import next // and last imports head type DepCycle[I] = NonEmptyChain[I] @@ -23,8 +32,8 @@ object Linker extends Logging { * @return [[List]] of dependecy cycles found */ private def findDepCycles[I, E, T]( - mods: List[AquaModule[I, E, T => T]] - ): List[DepCycle[AquaModule[I, E, T => T]]] = { + mods: List[AquaModule[I, E, T]] + ): List[DepCycle[I]] = { val modsIds = mods.map(_.id).toSet // Limit search to only passed modules (there maybe dependencies not from `mods`) val deps = mods.map(m => m.id -> m.dependsOn.keySet.intersect(modsIds)).toMap @@ -56,7 +65,7 @@ object Linker extends Logging { ) } - val cycles = mods + mods .flatMap(m => findCycles( paths = NonEmptyChain.one(m.id) :: Nil, @@ -69,73 +78,83 @@ object Linker extends Logging { // should not be a lot of cycles _.toChain.toList.toSet ) - - val modsById = mods.fproductLeft(_.id).toMap - - // This should be safe - cycles.map(_.map(modsById)) } - @tailrec - def iter[I, E, T: Semigroup]( - mods: List[AquaModule[I, E, T => T]], - proc: Map[I, T => T], - cycleError: DepCycle[AquaModule[I, E, T => T]] => E - ): ValidatedNec[E, Map[I, T => T]] = + /** + * Main iterative linking function + * @param mods Modules to link + * @param proc Already processed modules + * @param cycle Function to create error from dependency cycle + * @return Result for all modules + */ + def iter[I, E, F[_], T]( + mods: List[AquaModule[I, E, TP[F, T]]], + proc: Map[I, T], + cycle: DepCycle[I] => E + )(using me: MonadError[F, NonEmptyChain[E]]): F[Map[I, T]] = mods match { case Nil => - proc.valid + proc.pure case _ => - val (canHandle, postpone) = mods.partition(_.dependsOn.keySet.forall(proc.contains)) + // Find modules that can be processed + val (canHandle, postpone) = mods.partition( + _.dependsOn.keySet.forall(proc.contains) + ) logger.debug("ITERATE, can handle: " + canHandle.map(_.id)) logger.debug(s"dependsOn = ${mods.map(_.dependsOn.keySet)}") logger.debug(s"postpone = ${postpone.map(_.id)}") logger.debug(s"proc = ${proc.keySet}") + // If there are no modules that can be processed if (canHandle.isEmpty && postpone.nonEmpty) { - findDepCycles(postpone) - .map(cycleError) - .invalid - .leftMap( - // This should be safe as cycles should exist at this moment - errs => NonEmptyChain.fromSeq(errs).get - ) - } else { - val folded = canHandle.foldLeft(proc) { case (acc, m) => - val importKeys = m.dependsOn.keySet - logger.debug(s"${m.id} dependsOn $importKeys") - val deps: T => T = - importKeys.map(acc).foldLeft(identity[T]) { case (fAcc, f) => - logger.debug("COMBINING ONE TIME ") - t => { - logger.debug(s"call combine $t") - fAcc(t) |+| f(t) - } - } - acc + (m.id -> m.body.compose(deps)) - } - iter( - postpone, - // TODO can be done in parallel - folded, - cycleError + me.raiseError( + // This should be safe as cycles should exist at this moment + NonEmptyChain + .fromSeq(findDepCycles(postpone).map(cycle)) + .get + ) + } else + canHandle.traverse { mod => + // Gather all imports for module + val imports = mod.imports.mapValues { imp => + proc + .get(imp) + .getOrElse( + // Should not happen as we check it above + internalError(s"Module $imp not found in $proc") + ) + }.toMap + + // Process (transpile) module + mod.body(imports).map(mod.id -> _) + }.flatMap(processed => + // flatMap should be stack safe + iter( + postpone, + proc ++ processed, + cycle + ) ) - } - } - - def link[I, E, T: Semigroup]( - modules: Modules[I, E, T => T], - cycleError: DepCycle[AquaModule[I, E, T => T]] => E, - empty: I => T - ): ValidatedNec[E, Map[I, T]] = - if (modules.dependsOn.nonEmpty) Validated.invalid(modules.dependsOn.values.reduce(_ ++ _)) - else { - val result = iter(modules.loaded.values.toList, Map.empty, cycleError) - - result.map(_.collect { - case (i, f) if modules.exports(i) => - i -> f(empty(i)) - }) } + /** + * Link modules + * + * @param modules Modules to link (with transpilation functions as bodies) + * @param cycle Function to create error from dependency cycle + * @return Result for all **exported** modules + */ + def link[I, E, F[_], T]( + modules: Modules[I, E, TP[F, T]], + cycle: DepCycle[I] => E + )(using me: MonadError[F, NonEmptyChain[E]]): F[Map[I, T]] = + if (modules.dependsOn.nonEmpty) + me.raiseError( + modules.dependsOn.values.reduce(_ ++ _) + ) + else + iter(modules.loaded.values.toList, Map.empty, cycle).map( + // Remove all modules that are not exported from result + _.filterKeys(modules.exports.contains).toMap + ) } diff --git a/linker/src/main/scala/aqua/linker/Modules.scala b/linker/src/main/scala/aqua/linker/Modules.scala index 5371b58d..e3270209 100644 --- a/linker/src/main/scala/aqua/linker/Modules.scala +++ b/linker/src/main/scala/aqua/linker/Modules.scala @@ -1,6 +1,8 @@ package aqua.linker -import cats.data.NonEmptyChain +import cats.Foldable +import cats.data.{Chain, NonEmptyChain} +import cats.syntax.foldable._ import cats.syntax.option._ case class Modules[I, E, T]( @@ -23,17 +25,23 @@ case class Modules[I, E, T]( exports = if (toExport) exports + aquaModule.id else exports ) + def addAll[F[_]: Foldable](modules: F[AquaModule[I, E, T]]): Modules[I, E, T] = + modules.foldLeft(this)(_ add _) + def isResolved: Boolean = dependsOn.isEmpty def map[TT](f: T => TT): Modules[I, E, TT] = copy(loaded = loaded.view.mapValues(_.map(f)).toMap) - def mapModuleToBody[TT](f: AquaModule[I, E, T] => TT): Modules[I, E, TT] = - copy(loaded = loaded.view.mapValues(v => v.map(_ => f(v))).toMap) - def mapErr[EE](f: E => EE): Modules[I, EE, T] = copy( loaded = loaded.view.mapValues(_.mapErr(f)).toMap, dependsOn = dependsOn.view.mapValues(_.map(f)).toMap ) } + +object Modules { + + def from[I, E, T](modules: Chain[AquaModule[I, E, T]]): Modules[I, E, T] = + modules.foldLeft(Modules[I, E, T]())(_.add(_, toExport = true)) +} diff --git a/linker/src/test/scala/aqua/linker/LinkerSpec.scala b/linker/src/test/scala/aqua/linker/LinkerSpec.scala index 065a5ee5..9c7b3c6f 100644 --- a/linker/src/test/scala/aqua/linker/LinkerSpec.scala +++ b/linker/src/test/scala/aqua/linker/LinkerSpec.scala @@ -1,44 +1,61 @@ package aqua.linker -import cats.data.Validated +import cats.Id +import cats.data.{EitherNec, NonEmptyChain} +import cats.syntax.either.* import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class LinkerSpec extends AnyFlatSpec with Matchers { + type TP = Map[String, String] => EitherNec[String, String] + + val cycle: NonEmptyChain[String] => String = + _.toChain.toList.mkString(" -> ") + "linker" should "resolve dependencies" in { - val empty = Modules[String, String, String => String]() + val empty = Modules[String, String, TP]() - val withMod1 = - empty - .add( - AquaModule[String, String, String => String]( - id = "mod1", - imports = Map.empty, - dependsOn = Map("mod2" -> "unresolved mod2 in mod1"), - body = _ ++ " | mod1" - ), - toExport = true - ) + val withMod1 = empty.add( + AquaModule( + id = "mod1", + imports = Map("mod2" -> "mod2"), + dependsOn = Map("mod2" -> "unresolved mod2 in mod1"), + body = imports => { + println(s"mod1: $imports") + + imports + .get("mod2") + .toRight("mod2 not found in mod1") + .toEitherNec + .map(_ ++ " | mod1") + } + ), + toExport = true + ) withMod1.isResolved should be(false) - Linker.link[String, String, String]( - withMod1, - cycle => cycle.map(_.id).toChain.toList.mkString(" -> "), - _ => "" - ) should be(Validated.invalidNec("unresolved mod2 in mod1")) + Linker.link(withMod1, cycle) should be( + Left("unresolved mod2 in mod1").toEitherNec + ) - val withMod2 = - withMod1.add(AquaModule("mod2", Map.empty, Map.empty, _ ++ " | mod2")) + val withMod2 = withMod1.add( + AquaModule( + id = "mod2", + imports = Map.empty, + dependsOn = Map.empty, + body = _ => "mod2".asRight.toEitherNec + ) + ) withMod2.isResolved should be(true) - Linker.link[String, String, String]( - withMod2, - cycle => cycle.map(_.id + "?").toChain.toList.mkString(" -> "), - _ => "" - ) should be(Validated.validNec(Map("mod1" -> " | mod2 | mod1"))) + Linker.link(withMod2, cycle) should be( + Map( + "mod1" -> "mod2 | mod1" + ).asRight.toEitherNec + ) } } diff --git a/model/inline/src/main/scala/aqua/model/inline/ArrowInliner.scala b/model/inline/src/main/scala/aqua/model/inline/ArrowInliner.scala index f69d2644..f5fd6327 100644 --- a/model/inline/src/main/scala/aqua/model/inline/ArrowInliner.scala +++ b/model/inline/src/main/scala/aqua/model/inline/ArrowInliner.scala @@ -348,7 +348,7 @@ object ArrowInliner extends Logging { // Rename arrows according to values arrowsRenamed = Renamed( - valuesRenamed.renames.filterKeys(abilitiesArrows.keySet).toMap, + valuesRenamed.renames.view.filterKeys(abilitiesArrows.keySet).toMap, abilitiesArrows.renamed(valuesRenamed.renames) ) @@ -497,7 +497,7 @@ object ArrowInliner extends Logging { exports <- Exports[S].exports streams <- getOutsideStreamNames arrows = passArrows ++ arrowsFromAbilities - + inlineResult <- Exports[S].scope( Arrows[S].scope( for { diff --git a/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala b/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala index f161348e..e3146b17 100644 --- a/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala +++ b/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala @@ -149,11 +149,10 @@ object TagInliner extends Logging { def flat[S: Mangler]( vm: ValueModel, - op: Option[OpModel.Tree], - flatStream: Boolean + op: Option[OpModel.Tree] ): State[S, (ValueModel, Option[OpModel.Tree])] = { vm match { - case v @ VarModel(n, StreamType(t), l) if flatStream => + case ValueModel.Stream(v @ VarModel(n, _, l), StreamType(t)) => val canonName = n + "_canon" for { canonN <- Mangler[S].findAndForbidName(canonName) @@ -203,7 +202,7 @@ object TagInliner extends Logging { peerIdDe <- valueToModel(peerId) viaDe <- valueListToModel(via.toList) viaDeFlattened <- viaDe.traverse { case (vm, tree) => - flat(vm, tree, true) + flat(vm, tree) } (pid, pif) = peerIdDe (viaD, viaF) = viaDeFlattened.unzip @@ -238,7 +237,10 @@ object TagInliner extends Logging { case ForTag(item, iterable, mode) => for { vp <- valueToModel(iterable) - flattened <- flat(vp._1, vp._2, true) + flattened <- mode match { + case ForTag.Mode.RecMode => State.pure(vp) + case _ => flat(vp._1, vp._2) + } (v, p) = flattened n <- Mangler[S].findAndForbidName(item) elementType = iterable.`type` match { @@ -250,8 +252,8 @@ object TagInliner extends Logging { } _ <- Exports[S].resolved(item, VarModel(n, elementType)) modeModel = mode match { - case ForTag.Mode.Blocking => ForModel.Mode.Never - case ForTag.Mode.NonBlocking => ForModel.Mode.Null + case ForTag.Mode.SeqMode | ForTag.Mode.TryMode => ForModel.Mode.Null + case ForTag.Mode.ParMode | ForTag.Mode.RecMode => ForModel.Mode.Never } } yield TagInlined.Single( model = ForModel(n, v, modeModel), diff --git a/model/inline/src/main/scala/aqua/model/inline/raw/MakeAbilityRawInliner.scala b/model/inline/src/main/scala/aqua/model/inline/raw/MakeAbilityRawInliner.scala index 0eae5c10..6f9deab0 100644 --- a/model/inline/src/main/scala/aqua/model/inline/raw/MakeAbilityRawInliner.scala +++ b/model/inline/src/main/scala/aqua/model/inline/raw/MakeAbilityRawInliner.scala @@ -37,6 +37,7 @@ object MakeAbilityRawInliner extends RawInliner[AbilityRaw] { varModel = VarModel(name, raw.baseType) valsInline = foldedFields.toList.foldMap { case (_, inline) => inline }.desugar _ <- updateFields(name, foldedFields) + _ <- Exports[S].resolved(name, varModel) } yield { ( varModel, diff --git a/model/inline/src/main/scala/aqua/model/inline/state/InliningState.scala b/model/inline/src/main/scala/aqua/model/inline/state/InliningState.scala index e7c45247..e931cd0a 100644 --- a/model/inline/src/main/scala/aqua/model/inline/state/InliningState.scala +++ b/model/inline/src/main/scala/aqua/model/inline/state/InliningState.scala @@ -1,5 +1,6 @@ package aqua.model.inline.state +import aqua.mangler.ManglerState import aqua.model.{FuncArrow, ValueModel} import aqua.model.inline.state.{Arrows, Counter, Exports, Mangler} import aqua.raw.arrow.FuncRaw @@ -23,7 +24,7 @@ import scribe.Logging * for [[Counter]] */ case class InliningState( - noNames: Set[String] = Set.empty, + noNames: ManglerState = ManglerState(), resolvedExports: Map[String, ValueModel] = Map.empty, resolvedArrows: Map[String, FuncArrow] = Map.empty, instructionCounter: Int = 0 @@ -35,7 +36,7 @@ object InliningState { Counter.Simple.transformS(_.instructionCounter, (acc, i) => acc.copy(instructionCounter = i)) given Mangler[InliningState] = - Mangler.Simple.transformS(_.noNames, (acc, nn) => acc.copy(noNames = nn)) + Mangler[ManglerState].transformS(_.noNames, (acc, nn) => acc.copy(noNames = nn)) given Arrows[InliningState] = Arrows.Simple.transformS(_.resolvedArrows, (acc, aa) => acc.copy(resolvedArrows = aa)) diff --git a/model/inline/src/main/scala/aqua/model/inline/state/Mangler.scala b/model/inline/src/main/scala/aqua/model/inline/state/Mangler.scala index 15a73edb..3e3b4c86 100644 --- a/model/inline/src/main/scala/aqua/model/inline/state/Mangler.scala +++ b/model/inline/src/main/scala/aqua/model/inline/state/Mangler.scala @@ -1,65 +1,36 @@ package aqua.model.inline.state import cats.data.State +import aqua.mangler.ManglerState trait Mangler[S] { self => - def getForbiddenNames: State[S, Set[String]] - - def findNewNames(introduce: Set[String]): State[S, Map[String, String]] - - def findNewName(introduce: String): State[S, String] = - findNewNames(Set(introduce)).map(_.getOrElse(introduce, introduce)) - def findAndForbidName(introduce: String): State[S, String] = - for { - n <- findNewName(introduce) - _ <- forbid(Set(n)) - } yield n + findAndForbidNames(Set(introduce)).map(_.getOrElse(introduce, introduce)) - def findAndForbidNames(introduce: Set[String]): State[S, Map[String, String]] = - for { - n <- findNewNames(introduce) - _ <- forbid(introduce ++ n.values.toSet) - } yield n + def findAndForbidNames(introduce: Set[String]): State[S, Map[String, String]] def forbid(names: Set[String]): State[S, Unit] - def forbidName(name: String): State[S, Unit] = - forbid(Set(name)) - def transformS[R](f: R => S, g: (R, S) => R): Mangler[R] = new Mangler[R] { - val getForbiddenNames: State[R, Set[String]] = - self.getForbiddenNames.transformS(f, g) - - def findNewNames(introduce: Set[String]): State[R, Map[String, String]] = - self.findNewNames(introduce).transformS(f, g) - def forbid(names: Set[String]): State[R, Unit] = self.forbid(names).transformS(f, g) + + def findAndForbidNames(introduce: Set[String]): State[R, Map[String, String]] = + self.findAndForbidNames(introduce).transformS(f, g) } } object Mangler { - def apply[S](implicit mangler: Mangler[S]): Mangler[S] = mangler + def apply[S](using mangler: Mangler[S]): Mangler[S] = mangler - implicit object Simple extends Mangler[Set[String]] { - val getForbiddenNames: State[Set[String], Set[String]] = State.get + given Mangler[ManglerState] with { + def findAndForbidNames(introduce: Set[String]): State[ManglerState, Map[String, String]] = + State.apply(_.findNewNames(introduce)) - def findNewNames(introduce: Set[String]): State[Set[String], Map[String, String]] = - getForbiddenNames.map(forbidden => - (forbidden intersect introduce).foldLeft(Map.empty[String, String]) { case (acc, name) => - acc + (name -> LazyList - .from(0) - .map(name + "-" + _) - .dropWhile(n => forbidden(n) || introduce(n) || acc.contains(n)) - .head) - } - ) - - def forbid(names: Set[String]): State[Set[String], Unit] = - State.modify(_ ++ names) + def forbid(names: Set[String]): State[ManglerState, Unit] = + State.modify(st => st.forbid(names)) } } diff --git a/model/inline/src/test/scala/aqua/model/inline/ArrowInlinerSpec.scala b/model/inline/src/test/scala/aqua/model/inline/ArrowInlinerSpec.scala index 3d5d1fc0..3914c29a 100644 --- a/model/inline/src/test/scala/aqua/model/inline/ArrowInlinerSpec.scala +++ b/model/inline/src/test/scala/aqua/model/inline/ArrowInlinerSpec.scala @@ -2245,7 +2245,7 @@ class ArrowInlinerSpec extends AnyFlatSpec with Matchers with Inside { ) val foldOp = ForTag - .blocking(iVar.name, array) + .par(iVar.name, array) .wrap( inFold, NextTag(iVar.name).leaf diff --git a/model/inline/src/test/scala/aqua/model/inline/ManglerSpec.scala b/model/inline/src/test/scala/aqua/model/inline/ManglerSpec.scala new file mode 100644 index 00000000..df17745f --- /dev/null +++ b/model/inline/src/test/scala/aqua/model/inline/ManglerSpec.scala @@ -0,0 +1,80 @@ +package aqua.model.inline + +import aqua.mangler.ManglerState +import aqua.model.inline.state.Mangler +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers + +class ManglerSpec extends AnyFlatSpec with Matchers { + + "mangler" should "rename right" in { + val mangler = Mangler[ManglerState] + + val results = for { + res <- mangler.findAndForbidNames(Set("first", "second")) + } yield res + + val res = results.runA(ManglerState()).value + res shouldBe Map() + } + + "mangler" should "rename right if already have renamed" in { + val mangler = Mangler[ManglerState] + + val results = for { + res1 <- mangler.findAndForbidNames(Set("first", "first-0", "first-1")) + res2 <- mangler.findAndForbidNames(Set("first")) + res3 <- mangler.findAndForbidNames(Set("first-0")) + res4 <- mangler.findAndForbidNames(Set("first-1")) + res5 <- mangler.findAndForbidNames(Set("first-2")) + } yield (res1, res2, res3, res4, res5) + + val (r1, r2, r3, r4, r5) = results.runA(ManglerState()).value + r1 shouldBe Map() + r2 shouldBe Map("first" -> "first-2") + r3 shouldBe Map("first-0" -> "first-0-0") + r4 shouldBe Map("first-1" -> "first-1-0") + r5 shouldBe Map("first-2" -> "first-2-0") + } + + "mangler" should "rename multiple times right" in { + val mangler = Mangler[ManglerState] + + val results = for { + res <- mangler.findAndForbidNames(Set("first", "second")) + res2 <- mangler.findAndForbidNames(Set("first", "second")) + res3 <- mangler.findAndForbidNames(Set("first")) + res4 <- mangler.findAndForbidNames(Set("first", "second")) + res5 <- mangler.findAndForbidNames(Set("second")) + } yield (res, res2, res3, res4, res5) + + val (r1, r2, r3, r4, r5) = results.runA(ManglerState()).value + r1 shouldBe Map() + r2 shouldBe Map("first" -> "first-0", "second" -> "second-0") + r3 shouldBe Map("first" -> "first-1") + r4 shouldBe Map("first" -> "first-2", "second" -> "second-1") + r5 shouldBe Map("second" -> "second-2") + } + + "mangler" should "forbid and rename right" in { + val mangler = Mangler[ManglerState] + + val results = for { + _ <- mangler.forbid(Set("first", "second")) + res1 <- mangler.findAndForbidNames(Set("first", "second")) + res2 <- mangler.findAndForbidNames(Set("first")) + _ <- mangler.forbid(Set("first")) + _ <- mangler.forbid(Set("first", "second")) + _ <- mangler.forbid(Set("second")) + res3 <- mangler.findAndForbidNames(Set("second")) + res4 <- mangler.findAndForbidNames(Set("second", "first")) + } yield (res1, res2, res3, res4) + + val (r1, r2, r3, r4) = results.runA(ManglerState()).value + r1 shouldBe Map("first" -> "first-0", "second" -> "second-0") + r2 shouldBe Map("first" -> "first-1") + r3 shouldBe Map("second" -> "second-1") + r4 shouldBe Map("first" -> "first-2", "second" -> "second-2") + } + +} diff --git a/model/inline/src/test/scala/aqua/model/inline/RawValueInlinerSpec.scala b/model/inline/src/test/scala/aqua/model/inline/RawValueInlinerSpec.scala index 8248986e..e7a25680 100644 --- a/model/inline/src/test/scala/aqua/model/inline/RawValueInlinerSpec.scala +++ b/model/inline/src/test/scala/aqua/model/inline/RawValueInlinerSpec.scala @@ -1,28 +1,28 @@ package aqua.model.inline -import aqua.model.inline.raw.{ApplyPropertiesRawInliner, StreamGateInliner} +import aqua.mangler.ManglerState import aqua.model.* +import aqua.model.inline.raw.StreamGateInliner import aqua.model.inline.state.InliningState -import aqua.raw.value.{ApplyPropertyRaw, FunctorRaw, IntoIndexRaw, LiteralRaw, VarRaw} -import aqua.types.* import aqua.raw.value.* - +import aqua.types.* import cats.Eval -import cats.data.NonEmptyMap -import cats.data.Chain -import cats.syntax.show.* -import cats.syntax.foldable.* +import cats.data.{Chain, NonEmptyMap} import cats.free.Cofree -import scala.collection.immutable.SortedMap -import scala.math +import cats.syntax.foldable.* +import org.scalatest.Inside import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers -import org.scalatest.Inside + +import scala.collection.immutable.SortedMap +import scala.math class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { import RawValueInliner.valueToModel + def toMangler(noNames: Set[String]) = ManglerState(noNames.map(_ -> 0).toMap) + def join(stream: VarModel, size: ValueModel) = stream match { case VarModel( @@ -188,7 +188,7 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { "raw value inliner" should "desugarize a single non-recursive raw value" in { // x[y] valueToModel[InliningState](`raw x[y]`) - .runA(InliningState(noNames = Set("x", "y"))) + .runA(InliningState(noNames = toMangler(Set("x", "y")))) .value shouldBe ( VarModel( "x", @@ -200,7 +200,6 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { // TODO: unignore and fix after stream restrictions will be implemented ignore /*"raw value inliner"*/ should "unfold an IntoField PropertyModel" in { - import aqua.model.inline.state.Mangler.Simple // a.field1.field2 valueToModel[InliningState](`raw res.c`) .runA( @@ -222,7 +221,7 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { val (resVal, resTree) = valueToModel[InliningState]( `raw x[ys[0]]` ) - .runA(InliningState(noNames = Set("x", "ys"))) + .runA(InliningState(noNames = toMangler(Set("x", "ys")))) .value resVal should be( @@ -250,7 +249,9 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { it should "desugarize properties with functors x[ys[ys.length]][2] and make proper flattener tags" in { val (resVal, resTree) = valueToModel[InliningState]( `x[xs[ys.length]][xss[yss.length]]` - ).runA(InliningState(noNames = Set("x", "ys", "xs", "yss", "xss"))).value + ).runA( + InliningState(noNames = toMangler(Set("x", "ys", "xs", "yss", "xss"))) + ).value resVal should be( VarModel( @@ -325,7 +326,7 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { val (resVal, resTree) = valueToModel[InliningState]( `raw x[ys[0]][ys[1]]` ) - .runA(InliningState(noNames = Set("x", "ys"))) + .runA(InliningState(noNames = toMangler(Set("x", "ys")))) .value resVal should be( @@ -371,7 +372,7 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { IntoIndexRaw(idxRaw, ScalarType.string) ) - val initState = InliningState(noNames = Set("x", "ys")) + val initState = InliningState(noNames = toMangler(Set("x", "ys"))) // Here retrieve how size is inlined val (afterSizeState, (sizeModel, sizeTree)) = @@ -420,7 +421,7 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { ) val (resVal, resTree) = valueToModel[InliningState](streamWithProps) - .runA(InliningState(noNames = Set("x", "ys"))) + .runA(InliningState(noNames = toMangler(Set("x", "ys")))) .value } @@ -428,7 +429,7 @@ class RawValueInlinerSpec extends AnyFlatSpec with Matchers with Inside { val (resVal, resTree) = valueToModel[InliningState]( `raw x[zs[ys[0]]][ys[1]]` ) - .runA(InliningState(noNames = Set("x", "ys", "zs"))) + .runA(InliningState(noNames = toMangler(Set("x", "ys", "zs")))) .value // This is x[zs-0][ys-0] diff --git a/model/inline/src/test/scala/aqua/model/inline/TagInlinerSpec.scala b/model/inline/src/test/scala/aqua/model/inline/TagInlinerSpec.scala index 03d373cd..447b67ae 100644 --- a/model/inline/src/test/scala/aqua/model/inline/TagInlinerSpec.scala +++ b/model/inline/src/test/scala/aqua/model/inline/TagInlinerSpec.scala @@ -1,15 +1,20 @@ package aqua.model.inline -import aqua.model.{LiteralModel, OpModel, SeqModel} +import aqua.model.ForModel +import aqua.model.ValueModel +import aqua.model.inline.TagInliner.TagInlined import aqua.model.inline.state.InliningState +import aqua.model.{LiteralModel, OpModel, SeqModel} +import aqua.raw.ops.ForTag import aqua.raw.ops.{Call, CanonicalizeTag, FlattenTag} import aqua.raw.value.ValueRaw +import aqua.raw.value.VarRaw import aqua.types.{ScalarType, StreamType} -import org.scalatest.flatspec.AnyFlatSpec -import org.scalatest.matchers.should.Matchers + import cats.syntax.show.* import org.scalatest.Inside -import aqua.model.inline.TagInliner.TagInlined +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers class TagInlinerSpec extends AnyFlatSpec with Matchers with Inside { @@ -47,9 +52,31 @@ class TagInlinerSpec extends AnyFlatSpec with Matchers with Inside { ValueRaw.Nil.value, ValueRaw.Nil.baseType ) - + inside(inlined) { case TagInlined.Empty(prefix) => prefix shouldBe None } } + + "ForTag" should "not canonicalize iterable in RecMode" in { + val iterableRaw = VarRaw("iterable", StreamType(ScalarType.string)) + val iterableModel = ValueModel.fromRaw(iterableRaw) + + val tag = ForTag("i", iterableRaw, ForTag.Mode.RecMode) + + val (state, inlined) = TagInliner + .tagToModel[InliningState](tag) + .run( + InliningState( + resolvedExports = Map( + iterableRaw.name -> iterableModel + ) + ) + ) + .value + + inside(inlined) { case TagInlined.Single(ForModel(_, iter, ForModel.Mode.Never), _) => + iter shouldBe iterableModel + } + } } diff --git a/model/raw/src/main/scala/aqua/raw/RawContext.scala b/model/raw/src/main/scala/aqua/raw/RawContext.scala index 9f26d028..6f4a5f2b 100644 --- a/model/raw/src/main/scala/aqua/raw/RawContext.scala +++ b/model/raw/src/main/scala/aqua/raw/RawContext.scala @@ -10,7 +10,6 @@ import cats.data.Chain import cats.data.NonEmptyMap import cats.syntax.monoid.* import cats.syntax.option.* - import scala.collection.immutable.SortedMap /** diff --git a/model/raw/src/main/scala/aqua/raw/arrow/FuncRaw.scala b/model/raw/src/main/scala/aqua/raw/arrow/FuncRaw.scala index c6af509b..ca654ff5 100644 --- a/model/raw/src/main/scala/aqua/raw/arrow/FuncRaw.scala +++ b/model/raw/src/main/scala/aqua/raw/arrow/FuncRaw.scala @@ -11,7 +11,7 @@ case class FuncRaw( override def rawPartType: Type = arrow.`type` - def capturedVars: Set[String] = { + lazy val capturedVars: Set[String] = { val freeBodyVars = arrow.body.usesVarNames.value val argsNames = arrow.`type`.domain .toLabelledList() diff --git a/model/raw/src/main/scala/aqua/raw/ops/RawTag.scala b/model/raw/src/main/scala/aqua/raw/ops/RawTag.scala index 347a7498..4dd480f3 100644 --- a/model/raw/src/main/scala/aqua/raw/ops/RawTag.scala +++ b/model/raw/src/main/scala/aqua/raw/ops/RawTag.scala @@ -183,16 +183,24 @@ case class ForTag(item: String, iterable: ValueRaw, mode: ForTag.Mode) extends S object ForTag { + /** + * | Syntax | mode | fold last | canon | inner tag | par null wrap | + * |-------------|:----:|:---------:|:-----:|:---------:|:-------------:| + * | for ... | seq | null | + | seq | - | + * | for ... par | par | never | + | par | + | + * | for ... try | try | null | + | try | - | + * | for ... rec | rec | never | - | par | + | + * | parseq ... | par | never | + | par | - | + */ enum Mode { - case Blocking - case NonBlocking + case ParMode, SeqMode, TryMode, RecMode } - def blocking(item: String, iterable: ValueRaw): ForTag = - ForTag(item, iterable, Mode.Blocking) + def par(item: String, iterable: ValueRaw): ForTag = + ForTag(item, iterable, Mode.ParMode) - def nonBlocking(item: String, iterable: ValueRaw): ForTag = - ForTag(item, iterable, Mode.NonBlocking) + def seq(item: String, iterable: ValueRaw): ForTag = + ForTag(item, iterable, Mode.SeqMode) } case class CallArrowRawTag( @@ -291,8 +299,7 @@ case class ClosureTag( override def exportsVarNames: Set[String] = Set(func.name) - // FIXME: Is it correct? - override def usesVarNames: Set[String] = Set.empty + override def usesVarNames: Set[String] = func.capturedVars override def renameExports(map: Map[String, String]): RawTag = copy(func = diff --git a/model/src/main/scala/aqua/model/ValueModel.scala b/model/src/main/scala/aqua/model/ValueModel.scala index 6a795f04..2a2997f5 100644 --- a/model/src/main/scala/aqua/model/ValueModel.scala +++ b/model/src/main/scala/aqua/model/ValueModel.scala @@ -78,7 +78,7 @@ object ValueModel { def unapply(vm: VarModel): Option[(VarModel, StreamType)] = vm match { - case vm@VarModel(_, t: StreamType, _) => + case vm @ VarModel(_, t: StreamType, _) => (vm, t).some case _ => none } diff --git a/model/transform/src/main/scala/aqua/model/transform/pre/ArgsProvider.scala b/model/transform/src/main/scala/aqua/model/transform/pre/ArgsProvider.scala index 909a526e..a971dece 100644 --- a/model/transform/src/main/scala/aqua/model/transform/pre/ArgsProvider.scala +++ b/model/transform/src/main/scala/aqua/model/transform/pre/ArgsProvider.scala @@ -36,7 +36,7 @@ case class ArgsFromService(dataServiceId: ValueRaw) extends ArgsProvider { ) .leaf, ForTag - .nonBlocking(item, VarRaw(iter, ArrayType(t.element))) + .seq(item, VarRaw(iter, ArrayType(t.element))) .wrap( SeqTag.wrap( PushToStreamTag(VarRaw(item, t.element), Call.Export(varName, t)).leaf, diff --git a/parser/src/main/scala/aqua/parser/Ast.scala b/parser/src/main/scala/aqua/parser/Ast.scala index 37deead0..727c0c85 100644 --- a/parser/src/main/scala/aqua/parser/Ast.scala +++ b/parser/src/main/scala/aqua/parser/Ast.scala @@ -1,43 +1,48 @@ package aqua.parser import aqua.helpers.tree.Tree -import aqua.parser.expr.* -import aqua.parser.head.{HeadExpr, HeaderExpr} -import aqua.parser.lift.{LiftParser, Span} -import aqua.parser.lift.LiftParser.* +import aqua.parser.head.HeaderExpr +import aqua.parser.lexer.Token -import cats.data.{Chain, Validated, ValidatedNec} -import cats.syntax.flatMap.* +import cats.data.Chain import cats.free.Cofree -import cats.{Comonad, Eval} -import cats.~> -import cats.Show +import cats.syntax.flatMap.* +import cats.syntax.show.* +import cats.{Comonad, ~>} +import cats.{Eval, Show} case class Ast[S[_]](head: Ast.Head[S], tree: Ast.Tree[S]) { + def mapK[K[_]: Comonad](nt: S ~> K): Ast[K] = + Ast(head.mapK(nt), tree.map(_.mapK(nt))) + def cata[T](folder: (Expr[S], Chain[T]) => Eval[T]): Eval[T] = Cofree.cata[Chain, Expr[S], T](tree)(folder) - - def cataHead[T](folder: (HeaderExpr[S], Chain[T]) => Eval[T]): Eval[T] = - Cofree.cata[Chain, HeaderExpr[S], T](head)(folder) - - def collectHead[T](pf: PartialFunction[HeaderExpr[S], T]): Eval[Chain[T]] = - cataHead((e, acc: Chain[Chain[T]]) => - Eval.later { - val flatAcc = acc.flatten - if (pf.isDefinedAt(e)) flatAcc :+ pf(e) else flatAcc - } - ) } object Ast { - type Head[S[_]] = Cofree[Chain, HeaderExpr[S]] + + final case class Head[S[_]]( + begin: Token[S], + headers: Chain[HeaderExpr[S]] + ) { + + def mapK[K[_]: Comonad](nt: S ~> K): Head[K] = + copy( + begin = begin.mapK(nt), + headers = headers.map(_.mapK(nt)) + ) + + def collect[T](pf: PartialFunction[HeaderExpr[S], T]): Chain[T] = + headers.collect(pf) + } + type Tree[S[_]] = Cofree[Chain, Expr[S]] given [S[_]]: Show[Ast[S]] with { def show(ast: Ast[S]): String = { - val head = Tree.show(ast.head) + val head = ast.head.headers.map(_.show).toList.mkString("\n") val body = Tree.show(ast.tree) s"$head\n$body" diff --git a/parser/src/main/scala/aqua/parser/Parser.scala b/parser/src/main/scala/aqua/parser/Parser.scala index 057833c1..1b4e49ee 100644 --- a/parser/src/main/scala/aqua/parser/Parser.scala +++ b/parser/src/main/scala/aqua/parser/Parser.scala @@ -1,13 +1,15 @@ package aqua.parser import aqua.parser.expr.RootExpr -import aqua.parser.head.HeadExpr +import aqua.parser.head.Header import aqua.parser.lift.LiftParser.LiftErrorOps import aqua.parser.lift.Span.S import aqua.parser.lift.{LiftParser, Span} import cats.data.{Validated, ValidatedNec} +import cats.free.Cofree import cats.parse.{Parser as P, Parser0 as P0} +import cats.syntax.validated.* import cats.{Comonad, ~>} object Parser extends scribe.Logging { @@ -15,7 +17,7 @@ object Parser extends scribe.Logging { def parserSchema: P0[ValidatedNec[ParserError[Span.S], Ast[Span.S]]] = { logger.trace("creating schema...") - val parser = (HeadExpr.ast ~ RootExpr.ast0).map { case (head, bodyMaybe) => + val parser = (Header.p ~ RootExpr.ast0).map { case (head, bodyMaybe) => bodyMaybe.map(Ast(head, _)) } logger.trace("schema created") @@ -24,19 +26,15 @@ object Parser extends scribe.Logging { def parse[S[_]: LiftParser: Comonad]( p: P0[ValidatedNec[ParserError[S], Ast[S]]] - )(source: String): ValidatedNec[ParserError[S], Ast[S]] = { - p.parseAll(source) match { - case Right(value) => value - case Left(e) => Validated.invalidNec(LexerError(e.wrapErr)) - } - } + )(source: String): ValidatedNec[ParserError[S], Ast[S]] = + p.parseAll(source).left.map(e => LexerError(e.wrapErr).invalidNec).merge def natParser[S[_]: LiftParser: Comonad, K[_]: Comonad]( p: P0[ValidatedNec[ParserError[S], Ast[S]]], nat: S ~> K )(source: String): ValidatedNec[ParserError[K], Ast[K]] = - parse[S](p)(source).bimap( + parse(p)(source).bimap( e => e.map(_.mapK(nat)), - ast => Ast[K](ast.head.map(_.mapK(nat)), ast.tree.map(_.mapK(nat))) + ast => ast.mapK(nat) ) } diff --git a/parser/src/main/scala/aqua/parser/expr/RootExpr.scala b/parser/src/main/scala/aqua/parser/expr/RootExpr.scala index 3172321e..11d0fcc1 100644 --- a/parser/src/main/scala/aqua/parser/expr/RootExpr.scala +++ b/parser/src/main/scala/aqua/parser/expr/RootExpr.scala @@ -3,12 +3,14 @@ package aqua.parser.expr import aqua.parser.Ast.Tree import aqua.parser.lexer.Token import aqua.parser.lexer.Token.* -import aqua.parser.lift.{LiftParser, Span} import aqua.parser.lift.LiftParser.* +import aqua.parser.lift.{LiftParser, Span} import aqua.parser.{Expr, ParserError} + import cats.data.{Chain, NonEmptyChain, NonEmptyList, Validated, ValidatedNec} import cats.free.Cofree -import cats.parse.{Parser0 as P0, Parser as P} +import cats.parse.{Parser as P, Parser0 as P0} +import cats.syntax.option.* import cats.{Comonad, Eval} import cats.~> @@ -24,7 +26,9 @@ object RootExpr extends Expr.Companion { def validChildren: List[Expr.Lexem] = ServiceExpr :: AliasExpr :: DataStructExpr :: AbilityExpr :: ConstantExpr :: FuncExpr :: Nil - private def gatherResults[F[_]: LiftParser: Comonad](results: NonEmptyList[ValidatedNec[ParserError[F], Tree[F]]]): (Chain[ParserError[F]], Chain[Tree[F]]) = { + private def gatherResults[F[_]: LiftParser: Comonad]( + results: NonEmptyList[ValidatedNec[ParserError[F], Tree[F]]] + ): (Chain[ParserError[F]], Chain[Tree[F]]) = { results.foldLeft[(Chain[ParserError[F]], Chain[Tree[F]])](Chain.empty -> Chain.empty) { case ((errs, trees), Validated.Valid(tree)) => (errs, trees :+ tree) case ((errs, trees), Validated.Invalid(err)) => (errs ++ err.toChain, trees) @@ -54,12 +58,11 @@ object RootExpr extends Expr.Companion { empty.backtrack | ast override val ast: P[ValidatedNec[ParserError[Span.S], Tree[Span.S]]] = - parserSchema - .map { case (point, (errs, trees)) => + parserSchema.map { case (point, (errs, trees)) => NonEmptyChain .fromChain(errs) - .fold[ValidatedNec[ParserError[Span.S], Tree[Span.S]]]( - Validated.validNec(Cofree(RootExpr[Span.S](point), Eval.now(trees))) - )(Validated.invalid) + .toInvalid( + Cofree(RootExpr(point), Eval.now(trees)) + ) } } diff --git a/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala b/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala index 13d7a90e..0122deb8 100644 --- a/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala +++ b/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala @@ -6,12 +6,13 @@ import aqua.parser.lexer.Token.* import aqua.parser.lexer.{Name, ValueToken} import aqua.parser.lift.LiftParser import aqua.parser.lift.LiftParser.* -import cats.parse.Parser as P -import cats.syntax.comonad.* -import cats.{~>, Comonad} import aqua.parser.lift.Span import aqua.parser.lift.Span.{P0ToSpan, PToSpan} +import cats.parse.Parser as P +import cats.syntax.comonad.* +import cats.{Comonad, ~>} + case class ForExpr[F[_]]( item: Name[F], iterable: ValueToken[F], @@ -23,12 +24,16 @@ case class ForExpr[F[_]]( } object ForExpr extends Expr.AndIndented { - enum Mode { case ParMode, TryMode } + enum Mode { case ParMode, TryMode, RecMode } override def validChildren: List[Expr.Lexem] = ArrowExpr.funcChildren private lazy val modeP: P[Mode] = - (` ` *> (`par`.as(Mode.ParMode) | `try`.as(Mode.TryMode)).lift).map(_.extract) + (` ` *> ( + `par`.as(Mode.ParMode) | + `try`.as(Mode.TryMode) | + `rec`.as(Mode.RecMode) + ).lift).map(_.extract) override def p: P[ForExpr[Span.S]] = ((`for` *> ` ` *> Name.p <* ` <- `) ~ ValueToken.`value` ~ modeP.?).map { diff --git a/parser/src/main/scala/aqua/parser/head/ExportExpr.scala b/parser/src/main/scala/aqua/parser/head/ExportExpr.scala index 557426d4..a8c561ed 100644 --- a/parser/src/main/scala/aqua/parser/head/ExportExpr.scala +++ b/parser/src/main/scala/aqua/parser/head/ExportExpr.scala @@ -3,13 +3,14 @@ package aqua.parser.head import aqua.parser.lexer.Token.* import aqua.parser.lexer.{LiteralToken, Token, ValueToken} import aqua.parser.lift.LiftParser +import aqua.parser.lift.Span +import aqua.parser.lift.Span.{P0ToSpan, PToSpan} + import cats.Comonad import cats.data.NonEmptyList import cats.parse.Parser import cats.syntax.either.* import cats.~> -import aqua.parser.lift.Span -import aqua.parser.lift.Span.{P0ToSpan, PToSpan} case class ExportExpr[F[_]](pubs: NonEmptyList[FromExpr.NameOrAbAs[F]]) extends HeaderExpr[F] { @@ -20,7 +21,7 @@ case class ExportExpr[F[_]](pubs: NonEmptyList[FromExpr.NameOrAbAs[F]]) extends copy(FromExpr.mapK(pubs)(fk)) } -object ExportExpr extends HeaderExpr.Leaf { +object ExportExpr extends HeaderExpr.Companion { override val p: Parser[ExportExpr[Span.S]] = (`_export` *> ` `) *> comma(FromExpr.nameOrAbAs).map(ExportExpr(_)) diff --git a/parser/src/main/scala/aqua/parser/head/HeadExpr.scala b/parser/src/main/scala/aqua/parser/head/HeadExpr.scala deleted file mode 100644 index cbf364da..00000000 --- a/parser/src/main/scala/aqua/parser/head/HeadExpr.scala +++ /dev/null @@ -1,39 +0,0 @@ -package aqua.parser.head - -import aqua.parser.Ast -import aqua.parser.lexer.Token.` \n+` -import aqua.parser.lift.LiftParser -import aqua.parser.lift.LiftParser.* -import cats.{Comonad, Eval} -import cats.data.Chain -import cats.free.Cofree -import cats.parse.{Parser => P, Parser0 => P0} -import aqua.parser.lexer.Token -import cats.~> -import aqua.parser.lift.Span -import aqua.parser.lift.Span.{P0ToSpan, PToSpan} - -case class HeadExpr[S[_]](token: Token[S]) extends HeaderExpr[S] { - - def mapK[K[_]: Comonad](fk: S ~> K): HeadExpr[K] = - copy(token.mapK(fk)) -} - -object HeadExpr { - - def headExprs: List[HeaderExpr.Companion] = - UseFromExpr :: UseExpr :: ImportFromExpr :: ImportExpr :: ExportExpr :: Nil - - val ast: P0[Ast.Head[Span.S]] = - (P.unit.lift0.map(Token.lift) ~ ((ModuleExpr.p <* ` \n+`).? ~ - P.repSep0(P.oneOf(headExprs.map(_.ast.backtrack)), ` \n+`).map(Chain.fromSeq)) - .surroundedBy(` \n+`.?) - .?).map { - case (p, Some((maybeMod, exprs))) => - Cofree( - maybeMod.getOrElse(HeadExpr[Span.S](p)), - Eval.now(exprs) - ) - case (p, None) => Cofree(HeadExpr[Span.S](p), Eval.now(Chain.nil)) - } -} diff --git a/parser/src/main/scala/aqua/parser/head/Header.scala b/parser/src/main/scala/aqua/parser/head/Header.scala new file mode 100644 index 00000000..e1e5b4b0 --- /dev/null +++ b/parser/src/main/scala/aqua/parser/head/Header.scala @@ -0,0 +1,31 @@ +package aqua.parser.head + +import aqua.parser.Ast +import aqua.parser.lexer.Token +import aqua.parser.lexer.Token.` \n+` +import aqua.parser.lift.LiftParser +import aqua.parser.lift.LiftParser.* +import aqua.parser.lift.Span +import aqua.parser.lift.Span.{P0ToSpan, PToSpan} + +import cats.data.Chain +import cats.free.Cofree +import cats.parse.{Parser => P, Parser0 => P0} +import cats.{Comonad, Eval} +import cats.~> + +object Header { + + def headExprs: List[HeaderExpr.Companion] = + ModuleExpr :: UseFromExpr :: UseExpr :: ImportFromExpr :: ImportExpr :: ExportExpr :: Nil + + val p: P0[Ast.Head[Span.S]] = ( + P.unit.lift0 ~ + P.repSep0( + P.oneOf(headExprs.map(_.p.backtrack)), + ` \n+` + ).surroundedBy(` \n+`.?) + ).map { case (point, headers) => + Ast.Head(Token.lift(point), Chain.fromSeq(headers)) + } +} diff --git a/parser/src/main/scala/aqua/parser/head/HeaderExpr.scala b/parser/src/main/scala/aqua/parser/head/HeaderExpr.scala index 02e426d5..48a1b3b8 100644 --- a/parser/src/main/scala/aqua/parser/head/HeaderExpr.scala +++ b/parser/src/main/scala/aqua/parser/head/HeaderExpr.scala @@ -6,11 +6,11 @@ import aqua.parser.lift.LiftParser import aqua.parser.lift.Span import aqua.parser.lift.Span.{P0ToSpan, PToSpan} -import cats.{Comonad, Eval} +import cats.Show import cats.data.Chain import cats.free.Cofree -import cats.Show import cats.parse.Parser as P +import cats.{Comonad, Eval} import cats.~> trait HeaderExpr[S[_]] { @@ -23,14 +23,6 @@ object HeaderExpr { trait Companion { def p: P[HeaderExpr[Span.S]] - - def ast: P[Ast.Head[Span.S]] - } - - abstract class Leaf extends Companion { - - override def ast: P[Ast.Head[Span.S]] = - p.map(Cofree[Chain, HeaderExpr[Span.S]](_, Eval.now(Chain.empty))) } given [S[_]]: Show[HeaderExpr[S]] with { diff --git a/parser/src/main/scala/aqua/parser/head/ImportExpr.scala b/parser/src/main/scala/aqua/parser/head/ImportExpr.scala index 9c87d5d5..5545a95e 100644 --- a/parser/src/main/scala/aqua/parser/head/ImportExpr.scala +++ b/parser/src/main/scala/aqua/parser/head/ImportExpr.scala @@ -3,11 +3,12 @@ package aqua.parser.head import aqua.parser.lexer.Token._ import aqua.parser.lexer.{LiteralToken, ValueToken} import aqua.parser.lift.LiftParser +import aqua.parser.lift.Span +import aqua.parser.lift.Span.{P0ToSpan, PToSpan} + import cats.Comonad import cats.parse.Parser import cats.~> -import aqua.parser.lift.Span -import aqua.parser.lift.Span.{P0ToSpan, PToSpan} case class ImportExpr[F[_]](filename: LiteralToken[F]) extends FilenameExpr[F] { @@ -17,7 +18,7 @@ case class ImportExpr[F[_]](filename: LiteralToken[F]) extends FilenameExpr[F] { override def toString: String = s"import ${filename.value}" } -object ImportExpr extends HeaderExpr.Leaf { +object ImportExpr extends HeaderExpr.Companion { override val p: Parser[HeaderExpr[Span.S]] = `import` *> ` ` *> ValueToken.string.map(ImportExpr(_)) diff --git a/parser/src/main/scala/aqua/parser/head/ImportFromExpr.scala b/parser/src/main/scala/aqua/parser/head/ImportFromExpr.scala index aa39d0db..98abd065 100644 --- a/parser/src/main/scala/aqua/parser/head/ImportFromExpr.scala +++ b/parser/src/main/scala/aqua/parser/head/ImportFromExpr.scala @@ -3,12 +3,13 @@ package aqua.parser.head import aqua.parser.lexer.Token.* import aqua.parser.lexer.{LiteralToken, ValueToken} import aqua.parser.lift.LiftParser +import aqua.parser.lift.Span +import aqua.parser.lift.Span.{P0ToSpan, PToSpan} + import cats.Comonad import cats.data.NonEmptyList import cats.parse.Parser import cats.~> -import aqua.parser.lift.Span -import aqua.parser.lift.Span.{P0ToSpan, PToSpan} case class ImportFromExpr[F[_]]( imports: NonEmptyList[FromExpr.NameOrAbAs[F]], @@ -21,7 +22,7 @@ case class ImportFromExpr[F[_]]( override def toString: String = s"import ${FromExpr.show(imports)} from ${filename.value}" } -object ImportFromExpr extends HeaderExpr.Leaf { +object ImportFromExpr extends HeaderExpr.Companion { override val p: Parser[HeaderExpr[Span.S]] = (`import` *> FromExpr.importFrom.surroundedBy(` `) ~ ValueToken.string).map { diff --git a/parser/src/main/scala/aqua/parser/head/ModuleExpr.scala b/parser/src/main/scala/aqua/parser/head/ModuleExpr.scala index cfbd1082..3b4be3e4 100644 --- a/parser/src/main/scala/aqua/parser/head/ModuleExpr.scala +++ b/parser/src/main/scala/aqua/parser/head/ModuleExpr.scala @@ -1,17 +1,21 @@ package aqua.parser.head -import aqua.parser.lexer.Token.* import aqua.parser.lexer.Token +import aqua.parser.lexer.Token.* import aqua.parser.lexer.{Ability, LiteralToken, Name, ValueToken} import aqua.parser.lift.LiftParser import aqua.parser.lift.LiftParser.* -import cats.Comonad -import cats.parse.Parser -import cats.~> import aqua.parser.lift.Span import aqua.parser.lift.Span.{P0ToSpan, PToSpan} +import cats.Comonad +import cats.parse.Parser +import cats.syntax.comonad.* +import cats.syntax.functor.* +import cats.~> + case class ModuleExpr[F[_]]( + word: ModuleExpr.Word[F], name: Ability[F], declareAll: Option[Token[F]], declareNames: List[Name[F]], @@ -21,40 +25,75 @@ case class ModuleExpr[F[_]]( override def mapK[K[_]: Comonad](fk: F ~> K): ModuleExpr[K] = copy( - name.mapK(fk), - declareAll.map(_.mapK(fk)), - declareNames.map(_.mapK(fk)), - declareCustom.map(_.mapK(fk)) + word = word.mapK(fk), + name = name.mapK(fk), + declareAll = declareAll.map(_.mapK(fk)), + declareNames = declareNames.map(_.mapK(fk)), + declareCustom = declareCustom.map(_.mapK(fk)) ) } -object ModuleExpr extends HeaderExpr.Leaf { +object ModuleExpr extends HeaderExpr.Companion { + + final case class Word[F[_]: Comonad]( + token: F[Word.Kind] + ) extends Token[F] { + override def mapK[K[_]: Comonad](fk: F ~> K): Word[K] = copy(fk(token)) + + override def as[T](v: T): F[T] = token.as(v) + + def value: Word.Kind = token.extract + } + + object Word { + + enum Kind { + case Module, Aqua + + def fold[A]( + module: => A, + aqua: => A + ): A = this match { + case Kind.Module => module + case Kind.Aqua => aqua + } + } + } type NameOrAb[F[_]] = Either[Name[F], Ability[F]] - val nameOrAb: Parser[NameOrAb[Span.S]] = + private val nameOrAb: Parser[NameOrAb[Span.S]] = Name.p.map(Left(_)) | Ability.ab.map(Right(_)) - val nameOrAbList: Parser[List[NameOrAb[Span.S]]] = + private val nameOrAbList: Parser[List[NameOrAb[Span.S]]] = comma[NameOrAb[Span.S]](nameOrAb).map(_.toList) - val nameOrAbListOrAll: Parser[Either[List[NameOrAb[Span.S]], Token[Span.S]]] = + private val nameOrAbListOrAll: Parser[Either[List[NameOrAb[Span.S]], Token[Span.S]]] = nameOrAbList.map(Left(_)) | `star`.lift.map(Token.lift(_)).map(Right(_)) + private val moduleWord: Parser[Word[Span.S]] = + (`module`.as(Word.Kind.Module).lift.backtrack | + `aqua-word`.as(Word.Kind.Aqua).lift).map(Word(_)) + override val p: Parser[ModuleExpr[Span.S]] = - ((`module` | `aqua-word`) *> ` ` *> Ability.dotted ~ - (` declares ` *> nameOrAbListOrAll).?).map { - case (name, None) => - ModuleExpr(name, None, Nil, Nil) - case (name, Some(Left(exportMembers))) => + ( + (` *`.with1 *> moduleWord) ~ + (` ` *> Ability.dotted) ~ + (` declares ` *> nameOrAbListOrAll).? + ).map { + case ((word, name), None) => + ModuleExpr(word, name, None, Nil, Nil) + case ((word, name), Some(Left(exportMembers))) => ModuleExpr( + word, name, None, exportMembers.collect { case Left(x) => x }, exportMembers.collect { case Right(x) => x } ) - case (name, Some(Right(point))) => + case ((word, name), Some(Right(point))) => ModuleExpr( + word, name, Some(point), Nil, diff --git a/parser/src/main/scala/aqua/parser/head/UseExpr.scala b/parser/src/main/scala/aqua/parser/head/UseExpr.scala index 613cd7dc..bdba355b 100644 --- a/parser/src/main/scala/aqua/parser/head/UseExpr.scala +++ b/parser/src/main/scala/aqua/parser/head/UseExpr.scala @@ -3,11 +3,12 @@ package aqua.parser.head import aqua.parser.lexer.Token.* import aqua.parser.lexer.{Ability, LiteralToken, ValueToken} import aqua.parser.lift.LiftParser +import aqua.parser.lift.Span +import aqua.parser.lift.Span.{P0ToSpan, PToSpan} + import cats.Comonad import cats.parse.Parser import cats.~> -import aqua.parser.lift.Span -import aqua.parser.lift.Span.{P0ToSpan, PToSpan} case class UseExpr[F[_]]( filename: LiteralToken[F], @@ -21,7 +22,7 @@ case class UseExpr[F[_]]( s"use ${filename.value}${asModule.map(_.value).fold("")(" as " + _)}" } -object UseExpr extends HeaderExpr.Leaf { +object UseExpr extends HeaderExpr.Companion { override val p: Parser[HeaderExpr[Span.S]] = (`use` *> ` ` *> ValueToken.string ~ (` as ` *> Ability.ab).?).map { diff --git a/parser/src/main/scala/aqua/parser/head/UseFromExpr.scala b/parser/src/main/scala/aqua/parser/head/UseFromExpr.scala index 88b54fc0..ca38a8b5 100644 --- a/parser/src/main/scala/aqua/parser/head/UseFromExpr.scala +++ b/parser/src/main/scala/aqua/parser/head/UseFromExpr.scala @@ -3,12 +3,13 @@ package aqua.parser.head import aqua.parser.lexer.Token.* import aqua.parser.lexer.{Ability, LiteralToken, Name, ValueToken} import aqua.parser.lift.LiftParser +import aqua.parser.lift.Span +import aqua.parser.lift.Span.{P0ToSpan, PToSpan} + import cats.Comonad import cats.data.NonEmptyList import cats.parse.Parser import cats.~> -import aqua.parser.lift.Span -import aqua.parser.lift.Span.{P0ToSpan, PToSpan} case class UseFromExpr[F[_]]( imports: NonEmptyList[FromExpr.NameOrAbAs[F]], @@ -23,7 +24,7 @@ case class UseFromExpr[F[_]]( s"use ${FromExpr.show(imports)} from ${filename.value} as ${asModule.value}" } -object UseFromExpr extends HeaderExpr.Leaf { +object UseFromExpr extends HeaderExpr.Companion { override val p: Parser[UseFromExpr[Span.S]] = (`use` *> FromExpr.importFrom.surroundedBy( diff --git a/parser/src/main/scala/aqua/parser/lexer/Token.scala b/parser/src/main/scala/aqua/parser/lexer/Token.scala index 318e35bf..7f65dc9b 100644 --- a/parser/src/main/scala/aqua/parser/lexer/Token.scala +++ b/parser/src/main/scala/aqua/parser/lexer/Token.scala @@ -56,6 +56,7 @@ object Token { val `via`: P[Unit] = P.string("via") val `%init_peer_id%` : P[Unit] = P.string("%init_peer_id%") val `for`: P[Unit] = P.string("for") + val `rec`: P[Unit] = P.string("rec") val `if`: P[Unit] = P.string("if") val `eqs`: P[Unit] = P.string("==") val `neq`: P[Unit] = P.string("!=") diff --git a/parser/src/main/scala/aqua/parser/lexer/ValueToken.scala b/parser/src/main/scala/aqua/parser/lexer/ValueToken.scala index 98152a09..bbe05c4b 100644 --- a/parser/src/main/scala/aqua/parser/lexer/ValueToken.scala +++ b/parser/src/main/scala/aqua/parser/lexer/ValueToken.scala @@ -1,7 +1,6 @@ package aqua.parser.lexer import aqua.parser.Expr -import aqua.parser.head.FilenameExpr import aqua.parser.lexer.NamedArg.namedArgs import aqua.parser.lexer.Token.* import aqua.parser.lift.LiftParser diff --git a/parser/src/main/scala/aqua/parser/lift/FileSpan.scala b/parser/src/main/scala/aqua/parser/lift/FileSpan.scala index abd10324..ea991e09 100644 --- a/parser/src/main/scala/aqua/parser/lift/FileSpan.scala +++ b/parser/src/main/scala/aqua/parser/lift/FileSpan.scala @@ -2,7 +2,6 @@ package aqua.parser.lift import cats.parse.{LocationMap, Parser => P, Parser0} import cats.{Comonad, Eval} - import scala.language.implicitConversions // TODO: rewrite FileSpan and Span under one trait @@ -16,10 +15,11 @@ case class FileSpan(name: String, locationMap: Eval[LocationMap], span: Span) { * @return FileSpan.Focus */ def focus(ctx: Int): Option[FileSpan.Focus] = - span.focus(locationMap.value, ctx).map(FileSpan.Focus(name, locationMap, ctx, _)) + span. + focus(locationMap.value, ctx).map(FileSpan.Focus(name, locationMap, ctx, _)) override def hashCode(): Int = (name, span).hashCode() - + override def equals(obj: Any): Boolean = { obj match { case FileSpan(n, _, s) => n == name && s == span @@ -56,29 +56,4 @@ object FileSpan { override def map[A, B](fa: F[A])(f: A ⇒ B): F[B] = fa.copy(_2 = f(fa._2)) } - def fileSpanLiftParser(name: String, source: String): LiftParser[F] = new LiftParser[F] { - - private val memoizedLocationMap = Eval.later(LocationMap(source)).memoize - - override def lift[T](p: P[T]): P[F[T]] = { - implicitly[LiftParser[Span.S]].lift(p).map { case (span, value) => - (FileSpan(name, memoizedLocationMap, span), value) - } - } - - override def lift0[T](p0: Parser0[T]): Parser0[(FileSpan, T)] = { - implicitly[LiftParser[Span.S]].lift0(p0).map { case (span, value) => - (FileSpan(name, memoizedLocationMap, span), value) - } - } - - override def wrapErr(e: P.Error): (FileSpan, P.Error) = ( - FileSpan( - name, - memoizedLocationMap, - Span(e.failedAtOffset, e.failedAtOffset + 1) - ), - e - ) - } } diff --git a/parser/src/test/scala/aqua/AquaSpec.scala b/parser/src/test/scala/aqua/AquaSpec.scala index 6aca46db..07080fe8 100644 --- a/parser/src/test/scala/aqua/AquaSpec.scala +++ b/parser/src/test/scala/aqua/AquaSpec.scala @@ -67,6 +67,9 @@ object AquaSpec { def toBool(n: Boolean): LiteralToken[Id] = LiteralToken[Id](n.toString, bool) def toStr(n: String): LiteralToken[Id] = LiteralToken[Id]("\"" + n + "\"", string) + def toArr(arr: List[ValueToken[Id]]): CollectionToken[Id] = + CollectionToken[Id](CollectionToken.Mode.ArrayMode, arr) + def toNamedType(str: String): NamedTypeToken[Id] = NamedTypeToken[Id](str) def toArrayType(str: String): ArrayTypeToken[Id] = ArrayTypeToken[Id]((), str) diff --git a/parser/src/test/scala/aqua/parser/ClosureExprSpec.scala b/parser/src/test/scala/aqua/parser/ClosureExprSpec.scala index c27b2b4a..ae24ee67 100644 --- a/parser/src/test/scala/aqua/parser/ClosureExprSpec.scala +++ b/parser/src/test/scala/aqua/parser/ClosureExprSpec.scala @@ -31,7 +31,9 @@ class ClosureExprSpec extends AnyFlatSpec with Matchers with AquaSpec { "closure" should "parse" in { val script = - """func f() -> string: + """aqua Test + | + |func f() -> string: | closure = (s: string) -> string: | LocalSrv.inside() | p2Id <- Peer.identify() diff --git a/parser/src/test/scala/aqua/parser/ForExprSpec.scala b/parser/src/test/scala/aqua/parser/ForExprSpec.scala index ec0ab277..e89f9571 100644 --- a/parser/src/test/scala/aqua/parser/ForExprSpec.scala +++ b/parser/src/test/scala/aqua/parser/ForExprSpec.scala @@ -2,6 +2,7 @@ package aqua.parser import aqua.AquaSpec import aqua.parser.expr.func.ForExpr + import cats.Id import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -9,30 +10,48 @@ import org.scalatest.matchers.should.Matchers class ForExprSpec extends AnyFlatSpec with Matchers with AquaSpec { import AquaSpec.{given, *} + def forTestSuite( + modeStr: String, + mode: Option[ForExpr.Mode] + ): Unit = { + parseFor(s"for some <- 1$modeStr") should be( + ForExpr[Id]("some", toNumber(1), mode) + ) + + parseFor(s"for some <- false$modeStr") should be( + ForExpr[Id]("some", toBool(false), mode) + ) + + parseFor(s"for some <- \"a\"$modeStr") should be( + ForExpr[Id]("some", toStr("a"), mode) + ) + + parseFor(s"for i <- []$modeStr") should be( + ForExpr[Id]("i", toArr(Nil), mode) + ) + + parseFor(s"for i <- [1, 2, 3]$modeStr") should be( + ForExpr[Id]("i", toArr(List(toNumber(1), toNumber(2), toNumber(3))), mode) + ) + + parseFor(s"for i <- stream$modeStr") should be( + ForExpr[Id]("i", toVar("stream"), mode) + ) + } + "for expression" should "be parsed" in { - parseFor("for some <- \"a\"") should be( - ForExpr[Id]("some", toStr("a"), None) - ) + forTestSuite("", None) + } - parseFor("for some <- \"a\"") should be( - ForExpr[Id]("some", toStr("a"), None) - ) + "for par expression" should "be parsed" in { + forTestSuite(" par", Some(ForExpr.Mode.ParMode)) + } - parseFor("for some <- 1") should be( - ForExpr[Id]("some", toNumber(1), None) - ) - - parseFor("for some <- false") should be( - ForExpr[Id]("some", toBool(false), None) - ) - - parseFor("for some <- false par") should be( - ForExpr[Id]("some", toBool(false), Some(ForExpr.Mode.ParMode)) - ) - - parseFor("for some <- false try") should be( - ForExpr[Id]("some", toBool(false), Some(ForExpr.Mode.TryMode)) - ) + "for try expression" should "be parsed" in { + forTestSuite(" try", Some(ForExpr.Mode.TryMode)) + } + "for rec expression" should "be parsed" in { + forTestSuite(" rec", Some(ForExpr.Mode.RecMode)) } } diff --git a/parser/src/test/scala/aqua/parser/FuncExprSpec.scala b/parser/src/test/scala/aqua/parser/FuncExprSpec.scala index 83943d45..ba4410a9 100644 --- a/parser/src/test/scala/aqua/parser/FuncExprSpec.scala +++ b/parser/src/test/scala/aqua/parser/FuncExprSpec.scala @@ -22,7 +22,7 @@ import scala.language.implicitConversions class FuncExprSpec extends AnyFlatSpec with Matchers with Inside with Inspectors with AquaSpec { import AquaSpec.{given, *} - private val parser = Parser.spanParser + private val parser = RootExpr.ast0 "func header" should "parse" in { funcExpr("func some") should be( @@ -237,7 +237,7 @@ class FuncExprSpec extends AnyFlatSpec with Matchers with Inside with Inspectors val tree = parser.parseAll(script).value.toEither.value - val qTree = tree.tree.foldLeft(mutable.Queue.empty[Expr[Id]]) { case (acc, tag) => + val qTree = tree.foldLeft(mutable.Queue.empty[Expr[Id]]) { case (acc, tag) => acc.enqueue(tag.mapK(nat)) } @@ -311,8 +311,7 @@ class FuncExprSpec extends AnyFlatSpec with Matchers with Inside with Inspectors |""".stripMargin inside(parser.parseAll(script).value) { case Valid(ast) => - ast - .cata[Int]((expr, results) => + Cofree.cata[Chain, Expr[Span.S], Int](ast)((expr, results) => // Count `if`s inside the tree Eval.later(results.sumAll + (expr match { case IfExpr(_) => 1 diff --git a/parser/src/test/scala/aqua/parser/head/ImportFromSpec.scala b/parser/src/test/scala/aqua/parser/head/ImportFromSpec.scala index 359b88cd..e5f90393 100644 --- a/parser/src/test/scala/aqua/parser/head/ImportFromSpec.scala +++ b/parser/src/test/scala/aqua/parser/head/ImportFromSpec.scala @@ -5,6 +5,7 @@ import aqua.parser.expr.func.ServiceIdExpr import aqua.parser.lexer.{LiteralToken, Token} import aqua.parser.lift.LiftParser.Implicits.* import aqua.types.LiteralType + import cats.Id import cats.data.NonEmptyList import org.scalatest.flatspec.AnyFlatSpec @@ -23,15 +24,9 @@ class ImportFromSpec extends AnyFlatSpec with Matchers with AquaSpec { ) ) - HeadExpr.ast - .parseAll(s"""import MyModule, func as fn from "file.aqua" - |""".stripMargin) + ImportFromExpr.p + .parseAll("""import MyModule, func as fn from "file.aqua"""") .value - .tail - .value - .headOption - .get - .head .mapK(spanToId) should be( ImportFromExpr( NonEmptyList.fromListUnsafe( diff --git a/parser/src/test/scala/aqua/parser/head/ModuleSpec.scala b/parser/src/test/scala/aqua/parser/head/ModuleSpec.scala index c2b7c355..fead0754 100644 --- a/parser/src/test/scala/aqua/parser/head/ModuleSpec.scala +++ b/parser/src/test/scala/aqua/parser/head/ModuleSpec.scala @@ -3,18 +3,20 @@ package aqua.parser.head import aqua.AquaSpec import aqua.parser.expr.func.ServiceIdExpr import aqua.parser.lexer.{LiteralToken, Token} +import aqua.parser.lift.LiftParser.Implicits.* import aqua.types.LiteralType + import cats.Id import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers -import aqua.parser.lift.LiftParser.Implicits.* class ModuleSpec extends AnyFlatSpec with Matchers with AquaSpec { import AquaSpec.* "module header" should "be parsed" in { - ModuleExpr.p.parseAll("module MyModule").value.mapK(spanToId) should be( + ModuleExpr.p.parseAll("aqua MyModule").value.mapK(spanToId) should be( ModuleExpr( + ModuleExpr.Word[Id](Id(ModuleExpr.Word.Kind.Aqua)), toAb("MyModule"), None, Nil, @@ -22,13 +24,16 @@ class ModuleSpec extends AnyFlatSpec with Matchers with AquaSpec { ) ) - HeadExpr.ast - .parseAll(s"""module MyModule declares * + Header.p + .parseAll(s"""aqua MyModule declares * |""".stripMargin) .value - .head + .headers + .headOption + .get .mapK(spanToId) should be( ModuleExpr( + ModuleExpr.Word[Id](Id(ModuleExpr.Word.Kind.Aqua)), toAb("MyModule"), Some(Token.lift[Id, Unit](())), Nil, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa525805..d13f5a76 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: api/api-npm: devDependencies: '@fluencelabs/interfaces': - specifier: 0.9.0 - version: 0.9.0 + specifier: 0.10.0 + version: 0.10.0 prettier: specifier: 3.1.1 version: 3.1.1 @@ -27,8 +27,8 @@ importers: specifier: 1.1.2 version: 1.1.2 '@fluencelabs/js-client': - specifier: 0.5.5 - version: 0.5.5 + specifier: 0.6.0 + version: 0.6.0 deep-equal: specifier: 2.2.1 version: 2.2.1 @@ -37,11 +37,8 @@ importers: version: 1.8.1 devDependencies: '@fluencelabs/aqua-api': - specifier: 0.13.3 + specifier: 0.13.4 version: link:../api/api-npm - '@fluencelabs/aqua-dht': - specifier: 0.2.5 - version: 0.2.5 '@fluencelabs/aqua-lib': specifier: 0.9.0 version: 0.9.0 @@ -430,15 +427,15 @@ packages: dependencies: '@chainsafe/as-chacha20poly1305': 0.1.0 '@chainsafe/as-sha256': 0.4.1 - '@libp2p/crypto': 3.0.1 - '@libp2p/interface': 1.0.1 - '@libp2p/peer-id': 4.0.1 + '@libp2p/crypto': 3.0.2 + '@libp2p/interface': 1.1.2 + '@libp2p/peer-id': 4.0.5 '@noble/ciphers': 0.4.1 '@noble/curves': 1.1.0 '@noble/hashes': 1.3.1 it-byte-stream: 1.0.1 it-length-prefixed: 9.0.3 - it-length-prefixed-stream: 1.0.2 + it-length-prefixed-stream: 1.1.5 it-pair: 2.0.6 it-pipe: 3.0.1 it-stream-types: 2.0.1 @@ -446,19 +443,17 @@ packages: uint8arraylist: 2.4.3 uint8arrays: 4.0.6 wherearewe: 2.0.1 - transitivePeerDependencies: - - supports-color dev: false /@chainsafe/libp2p-yamux@6.0.1: resolution: {integrity: sha512-8ar6jph9ZuUUxQ8t8W1MaZqH7f7KvGK2wR7TDGnN0r4QtZc07ICNgVjnolnI9/8bclrI5Um4uMa8QCYKTrdvDQ==} dependencies: - '@libp2p/interface': 1.0.1 - '@libp2p/utils': 5.1.0 + '@libp2p/interface': 1.1.2 + '@libp2p/utils': 5.2.2 get-iterator: 2.0.1 it-foreach: 2.0.4 it-pipe: 3.0.1 - it-pushable: 3.2.1 + it-pushable: 3.2.3 uint8arraylist: 2.4.3 transitivePeerDependencies: - supports-color @@ -477,36 +472,26 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@fluencelabs/aqua-dht@0.2.5: - resolution: {integrity: sha512-8jWUCeAftRtafqD6MgC7vkCnLOD6pwJspGHykPbXpg2pKbwANAAzAb/w8XbIScBzbIonZ5N7FfSVlTet383A3w==} - dependencies: - '@fluencelabs/aqua-lib': 0.1.14 - dev: true - - /@fluencelabs/aqua-lib@0.1.14: - resolution: {integrity: sha512-H2Q4gIvociUxc4J2mwmH0D+mrU2N2Z+enKCHgBCanMVEE2wZDsZ80GTbDKsQjEq+gpqbnJIk8lJBYW6lyvLJTg==} - dev: true - /@fluencelabs/aqua-lib@0.9.0: resolution: {integrity: sha512-V0xhc0UXBF6kjfL9Y/agWGQuW+ie2zckj37KWv8Dq4teYuo9N94O4Ynm7XULWHaaWtbWvzFcDcc6nc9qG7gxcQ==} dev: true - /@fluencelabs/avm@0.54.0: - resolution: {integrity: sha512-5GgROVly/vC7gasltr6/3TIY8vfV6b+SPfWUAGWnyXdbWt4jJANLO2YtXdaUsdNk9PiwOep7TMjLnypljdyMjQ==} + /@fluencelabs/avm@0.55.0: + resolution: {integrity: sha512-4KaVnSCkWtoyXSX1UezKX5KRKkBdR+VmXdZwAGqgcqsDKuzTFstfsMO6SCp/njbCOK1Wm/t5Fb1HFDob/6vIog==} dev: false /@fluencelabs/fluence-network-environment@1.1.2: resolution: {integrity: sha512-1Bp2gBy3oMEILMynFpOIFK/q2Pj792xpnb3AJs5QcTQAaHz9V2nrEI8OOPwBAFTmjmLBirXBqQQX63O+ePH7yg==} dev: false - /@fluencelabs/interfaces@0.9.0: - resolution: {integrity: sha512-k3VGi1ziX1SC0/DtKNDr2sWAlQ1MspuQOd2TZ5ex1SlwhRAPTSOoKWHpujSto5RKCQ3wiyQiNBVgkTRVd17gfg==} + /@fluencelabs/interfaces@0.10.0: + resolution: {integrity: sha512-KD6GKk4whhQyt0fYpD1EFoi1JidQ6w37edS+akrHritySl9gxVAZqd7Ho6AolLEVHkMMBVQYC6sSjU9DcNueRg==} engines: {node: '>=10', pnpm: '>=3'} - /@fluencelabs/js-client-isomorphic@0.3.1: - resolution: {integrity: sha512-KdvT4fn9HPunJTkH4AHO913LeIQB0kS33wukL+/5xCh/lfi3GCJr3nfVBdw3tcYtmL6dE/ZmvoAM34NOm2jLnQ==} + /@fluencelabs/js-client-isomorphic@0.4.0: + resolution: {integrity: sha512-Qnehq/UnE0O2pZy9n6mDouY2f623UuUVIWwd6EN9n4cHuM6URyLiWrvJ0TeTUNTJiEJyVy6mSb01SmUUrPKScw==} dependencies: - '@fluencelabs/avm': 0.54.0 + '@fluencelabs/avm': 0.55.0 '@fluencelabs/marine-js': 0.8.0 '@fluencelabs/marine-worker': 0.5.1 '@fluencelabs/threads': 2.0.0 @@ -514,32 +499,33 @@ packages: - supports-color dev: false - /@fluencelabs/js-client@0.5.5: - resolution: {integrity: sha512-Rh2lT6ermry6624VXN4RKmaLwKN/AF6aviFR13soRvQRHnJ8phDWPOsVubyMlz7N0G31sXkTCajAPGJJ6zm6VQ==} + /@fluencelabs/js-client@0.6.0: + resolution: {integrity: sha512-uKmz622Zh22TgAnCkfLJw3RqO2s5x63vFnyr6zAjwHDNTkXh1Srnoj/df7aWzQoIdVaqeUmrov/R7ozQd3VByw==} engines: {node: '>=10', pnpm: '>=8'} dependencies: '@chainsafe/libp2p-noise': 14.0.0 '@chainsafe/libp2p-yamux': 6.0.1 - '@fluencelabs/avm': 0.54.0 - '@fluencelabs/interfaces': 0.9.0 - '@fluencelabs/js-client-isomorphic': 0.3.1 + '@fluencelabs/avm': 0.55.0 + '@fluencelabs/interfaces': 0.10.0 + '@fluencelabs/js-client-isomorphic': 0.4.0 '@fluencelabs/marine-worker': 0.5.1 '@fluencelabs/threads': 2.0.0 - '@libp2p/crypto': 3.0.1 - '@libp2p/identify': 1.0.4 - '@libp2p/interface': 1.0.1 - '@libp2p/peer-id': 4.0.1 - '@libp2p/peer-id-factory': 4.0.0 - '@libp2p/ping': 1.0.4 - '@libp2p/websockets': 8.0.5 - '@multiformats/multiaddr': 11.3.0 + '@libp2p/crypto': 4.0.1 + '@libp2p/identify': 1.0.11 + '@libp2p/interface': 1.1.2 + '@libp2p/peer-id': 4.0.5 + '@libp2p/peer-id-factory': 4.0.5 + '@libp2p/ping': 1.0.10 + '@libp2p/utils': 5.2.2 + '@libp2p/websockets': 8.0.12 + '@multiformats/multiaddr': 12.1.12 bs58: 5.0.0 debug: 4.3.4 it-length-prefixed: 9.0.3 it-map: 3.0.5 it-pipe: 3.0.1 js-base64: 3.7.5 - libp2p: 1.0.7 + libp2p: 1.2.0 multiformats: 11.0.1 rxjs: 7.5.5 uint8arrays: 4.0.3 @@ -857,25 +843,10 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /@libp2p/crypto@3.0.1: - resolution: {integrity: sha512-CvqzsWvAYaga/Du3gDRChN9d8PUnOoCQg3VlugKf6tfw5+1pd7sMDhyMLajXqFsWqQUY6FojgB1TS4izpODMpw==} - dependencies: - '@libp2p/interface': 1.0.1 - '@noble/curves': 1.1.0 - '@noble/hashes': 1.3.1 - multiformats: 12.1.3 - node-forge: 1.3.1 - protons-runtime: 5.0.0(uint8arraylist@2.4.3) - uint8arraylist: 2.4.3 - uint8arrays: 4.0.6 - transitivePeerDependencies: - - supports-color - dev: false - /@libp2p/crypto@3.0.2: resolution: {integrity: sha512-dZuQ+UGv1fOc5i+RQ2e/c7CUy2iE7UnmQ9XuHrLb24fe4pmb6YmGl/5TPm09O+8d5q4htOyg0RrU3GfmqmpMZQ==} dependencies: - '@libp2p/interface': 1.0.2 + '@libp2p/interface': 1.1.2 '@noble/curves': 1.1.0 '@noble/hashes': 1.3.1 multiformats: 12.1.3 @@ -883,36 +854,46 @@ packages: protons-runtime: 5.0.0(uint8arraylist@2.4.3) uint8arraylist: 2.4.3 uint8arrays: 5.0.0 - transitivePeerDependencies: - - supports-color dev: false - /@libp2p/identify@1.0.4: - resolution: {integrity: sha512-2cjmrlzl68OIQpmgCEK+tjX1d+J+33xTRvx23O3zpRiXOGA59dWRTgvB9ehkfmTov9eu37wY8qCcHjXrjmg7nA==} + /@libp2p/crypto@4.0.1: + resolution: {integrity: sha512-lKGbX8TvQt4JbqlttdexEz2VtYJnTwY31kVBDQviwt0pMF+6Uy2hzNnEQ1FHZBwnow8BIlyb6UevHfgyOFlnkw==} dependencies: - '@libp2p/interface': 1.0.1 - '@libp2p/interface-internal': 1.0.3 - '@libp2p/peer-id': 4.0.1 - '@libp2p/peer-record': 7.0.2 - '@multiformats/multiaddr': 12.1.11 + '@libp2p/interface': 1.1.2 + '@noble/curves': 1.1.0 + '@noble/hashes': 1.3.3 + asn1js: 3.0.5 + multiformats: 13.0.1 + protons-runtime: 5.0.0(uint8arraylist@2.4.8) + uint8arraylist: 2.4.8 + uint8arrays: 5.0.0 + dev: false + + /@libp2p/identify@1.0.11: + resolution: {integrity: sha512-/f6E2Z+H9sU332DipP3wuxtq06WfP1g4gNnjM7EUJjZ3b6igz8sFRnSVhTq5DGcsPBPT01zct3mrKFCj7ag4Uw==} + dependencies: + '@libp2p/interface': 1.1.2 + '@libp2p/interface-internal': 1.0.7 + '@libp2p/peer-id': 4.0.5 + '@libp2p/peer-record': 7.0.6 + '@multiformats/multiaddr': 12.1.12 '@multiformats/multiaddr-matcher': 1.1.0 - it-length-prefixed: 9.0.3 - it-protobuf-stream: 1.0.2 - protons-runtime: 5.0.0(uint8arraylist@2.4.3) - uint8arraylist: 2.4.3 - uint8arrays: 4.0.6 + it-protobuf-stream: 1.1.2 + protons-runtime: 5.0.0(uint8arraylist@2.4.8) + uint8arraylist: 2.4.8 + uint8arrays: 5.0.0 wherearewe: 2.0.1 transitivePeerDependencies: - supports-color dev: false - /@libp2p/interface-internal@1.0.3: - resolution: {integrity: sha512-6zOsp3QjyU6Ml4SQVTvW6TO9uajb7PCGTfTozSg4Pn6s3ChRy0wLJnii4ilRyXSCJJq4rAY1h1Ish39Lp8ORSw==} + /@libp2p/interface-internal@1.0.7: + resolution: {integrity: sha512-r1nGpnGdkq0U7ow5i093OPWPBJXQP3BGwijino8cCZokYwF2P/CU+yeYvL8ncL8fPYLKuuUjLNGO4Z8Th5sqSQ==} dependencies: - '@libp2p/interface': 1.0.2 - '@libp2p/peer-collections': 5.1.1 - '@multiformats/multiaddr': 12.1.11 - uint8arraylist: 2.4.3 + '@libp2p/interface': 1.1.2 + '@libp2p/peer-collections': 5.1.5 + '@multiformats/multiaddr': 12.1.12 + uint8arraylist: 2.4.8 transitivePeerDependencies: - supports-color dev: false @@ -920,9 +901,9 @@ packages: /@libp2p/interface@0.1.2: resolution: {integrity: sha512-Q5t27434Mvn+R6AUJlRH+q/jSXarDpP+KXVkyGY7S1fKPI2berqoFPqT61bRRBYsCH2OPZiKBB53VUzxL9uEvg==} dependencies: - '@multiformats/multiaddr': 12.1.11 + '@multiformats/multiaddr': 12.1.12 abortable-iterator: 5.0.1 - it-pushable: 3.2.1 + it-pushable: 3.2.3 it-stream-types: 2.0.1 multiformats: 12.1.3 p-defer: 4.0.0 @@ -931,26 +912,15 @@ packages: - supports-color dev: false - /@libp2p/interface@1.0.1: - resolution: {integrity: sha512-TRo1YxJ+AVjt5ms+mTOp8xcoCis5HAUMzv0XfCvxtIw77Bog6TPR5VdkGutlEQOKUMzXtLP0lW88fTQBeiiOnA==} + /@libp2p/interface@1.1.2: + resolution: {integrity: sha512-uC4hxtEJuWiDiZfokkSNEEbCzdyZrqb5kp67Wc5PjZsySZ2IoImdIfie003yQXlB1xBp/XUJzdC6kVu4M7LUmg==} dependencies: - '@multiformats/multiaddr': 12.1.11 - it-pushable: 3.2.1 - it-stream-types: 2.0.1 - multiformats: 12.1.3 - uint8arraylist: 2.4.3 - transitivePeerDependencies: - - supports-color - dev: false - - /@libp2p/interface@1.0.2: - resolution: {integrity: sha512-z/3Yyg+7cVyzRXwzdrDkJd7YmNaLE9iZjQaixo5luI/n9uk5OFFjb9ulAsNqpq8V1xylCo2DXIC7f94KClwzVw==} - dependencies: - '@multiformats/multiaddr': 12.1.11 + '@multiformats/multiaddr': 12.1.12 it-pushable: 3.2.3 it-stream-types: 2.0.1 - multiformats: 12.1.3 - uint8arraylist: 2.4.3 + multiformats: 13.0.1 + progress-events: 1.0.0 + uint8arraylist: 2.4.8 transitivePeerDependencies: - supports-color dev: false @@ -959,7 +929,7 @@ packages: resolution: {integrity: sha512-2JtRGBXiGfm1t5XneUIXQ2JusW7QwyYmxsW7hSAYS5J73RQJUicpt5le5obVRt7+OM39ei+nWEuC6Xvm1ugHkw==} dependencies: '@libp2p/interface': 0.1.2 - '@multiformats/multiaddr': 12.1.11 + '@multiformats/multiaddr': 12.1.12 debug: 4.3.4 interface-datastore: 8.2.3 multiformats: 12.1.3 @@ -967,171 +937,139 @@ packages: - supports-color dev: false - /@libp2p/logger@4.0.2: - resolution: {integrity: sha512-J9UMtMU9BKXNp+3c5kcI7HyWOPYg2B2E6sn1gEQckiSexTaz0wKJSlgTZ89f9F8bkC3AaC8ybXYuHbFQhwpTIg==} + /@libp2p/logger@4.0.5: + resolution: {integrity: sha512-cXETMNZINnxeQBlfQ2S4di92FDDU89R7RHagrpebGrM7oLl5nf/Mw6myc23kGaM3/2YG3ko2rl9sYjemu0azTA==} dependencies: - '@libp2p/interface': 1.0.2 - '@multiformats/multiaddr': 12.1.11 + '@libp2p/interface': 1.1.2 + '@multiformats/multiaddr': 12.1.12 debug: 4.3.4 interface-datastore: 8.2.3 - multiformats: 12.1.3 + multiformats: 13.0.1 transitivePeerDependencies: - supports-color dev: false - /@libp2p/multistream-select@5.0.3: - resolution: {integrity: sha512-FCS1k7md7kTygLeFb+GwVqgA7Gb8FLblZZ85TC0OemRgpX1xbpwpKSbRGWrv3tsjpkTUqNB5LwDZRMi221UITw==} + /@libp2p/multistream-select@5.1.2: + resolution: {integrity: sha512-QpECDuO3hAQLAcYZbIFVhNNJl3MMttTq+txlbpDOxVgbOfTTBImUCcvrtZRIe25gZ1uB+iS72opZNgilc1zl9g==} dependencies: - '@libp2p/interface': 1.0.2 + '@libp2p/interface': 1.1.2 it-length-prefixed: 9.0.3 it-length-prefixed-stream: 1.1.5 - it-pipe: 3.0.1 it-stream-types: 2.0.1 p-defer: 4.0.0 race-signal: 1.0.2 uint8-varint: 2.0.2 - uint8arraylist: 2.4.3 + uint8arraylist: 2.4.8 + uint8arrays: 5.0.0 + dev: false + + /@libp2p/peer-collections@5.1.5: + resolution: {integrity: sha512-/9VisdPC7+15n/0XntjGCzJ2Ky/zZnqdnuLNEwdu2LuTCbWTaqItG36ecgcVdO9L/V4mELwgY5XCjZKBDrYgjA==} + dependencies: + '@libp2p/interface': 1.1.2 + '@libp2p/peer-id': 4.0.5 + dev: false + + /@libp2p/peer-id-factory@4.0.5: + resolution: {integrity: sha512-9fy1TCiBViqIFuoFzW/o9fVh3j600IYDHaXUqvx6HQFeB/dEM8utRU4FxVZVv/MMcKfUf7mydHXVHRyp28uG8w==} + dependencies: + '@libp2p/crypto': 4.0.1 + '@libp2p/interface': 1.1.2 + '@libp2p/peer-id': 4.0.5 + protons-runtime: 5.0.0(uint8arraylist@2.4.8) + uint8arraylist: 2.4.8 + uint8arrays: 5.0.0 + dev: false + + /@libp2p/peer-id@4.0.5: + resolution: {integrity: sha512-/J9U6I/CWSOsYrTpFZpRQrhOhi+bp9WFp7+9Gc7kVt/oevIYTapUEjpxevjViem9ddR5RbdYeCj4ZLHA04QOoQ==} + dependencies: + '@libp2p/interface': 1.1.2 + multiformats: 13.0.1 + uint8arrays: 5.0.0 + dev: false + + /@libp2p/peer-record@7.0.6: + resolution: {integrity: sha512-mo7WyJltQU5byC1cwMzqGnzlrSsqkCg8AKhWb0wscuIz2LH6cevmkq+h9mzDnn0KGzJIpZvlInygRVxA/SHS3A==} + dependencies: + '@libp2p/crypto': 4.0.1 + '@libp2p/interface': 1.1.2 + '@libp2p/peer-id': 4.0.5 + '@libp2p/utils': 5.2.2 + '@multiformats/multiaddr': 12.1.12 + protons-runtime: 5.0.0(uint8arraylist@2.4.8) + uint8-varint: 2.0.2 + uint8arraylist: 2.4.8 uint8arrays: 5.0.0 transitivePeerDependencies: - supports-color dev: false - /@libp2p/peer-collections@5.1.1: - resolution: {integrity: sha512-IzFAlA/1+8NH9MAKEVY5w37+VxMKjuYQ22FwT4sf1RCLFy5SOtmcv1ccjYipYGKwhDkBQwXmEc13XPoq5MiUJQ==} + /@libp2p/peer-store@10.0.7: + resolution: {integrity: sha512-gZFa1qlYE51dRK+zW1Apq051L2BcC320CSGONYnxHTM1QNLCL3UIPgWeQEQb+OW0Qdv7VAT8OHaSM0nv2q0x9w==} dependencies: - '@libp2p/interface': 1.0.2 - '@libp2p/peer-id': 4.0.2 - transitivePeerDependencies: - - supports-color - dev: false - - /@libp2p/peer-id-factory@4.0.0: - resolution: {integrity: sha512-dFbQOpxqEw4CqV+ZalMc5UABqts+hskMoaqytjmR55pXgL4KDamOyg7hBT/HrHRp2sStf8E2vwQ5wnjv1W9uFQ==} - dependencies: - '@libp2p/crypto': 3.0.1 - '@libp2p/interface': 1.0.1 - '@libp2p/peer-id': 4.0.1 - multiformats: 12.1.3 - protons-runtime: 5.0.0(uint8arraylist@2.4.3) - uint8arraylist: 2.4.3 - uint8arrays: 4.0.6 - transitivePeerDependencies: - - supports-color - dev: false - - /@libp2p/peer-id-factory@4.0.1: - resolution: {integrity: sha512-Z1JSpB/vjE1B2W+sJGJXKKZ5aUave4sK4UYWauge6dFSpQvkUaJDzHLKwO6Tg0l7gekpHF8sdcIpk70GSKkA8g==} - dependencies: - '@libp2p/crypto': 3.0.2 - '@libp2p/interface': 1.0.2 - '@libp2p/peer-id': 4.0.2 - multiformats: 12.1.3 - protons-runtime: 5.0.0(uint8arraylist@2.4.3) - uint8arraylist: 2.4.3 - uint8arrays: 5.0.0 - transitivePeerDependencies: - - supports-color - dev: false - - /@libp2p/peer-id@4.0.1: - resolution: {integrity: sha512-rEgZ4YPSVh7gqIXxWE9HVw318Og8fJohI2vWXNx2h+Ib/iMQTGrqGgSaJhjUMWYIy8MadpjofCPXObPEIX3E3g==} - dependencies: - '@libp2p/interface': 1.0.1 - multiformats: 12.1.3 - uint8arrays: 4.0.6 - dev: false - - /@libp2p/peer-id@4.0.2: - resolution: {integrity: sha512-TkUA6MjLJ3CE82yyFOfGpH18eUkxouQC7FZcW4vMB1C6F1Y90sf0nPTcXPVZSabEcQxLeOzNk2oEqLgZw47E9w==} - dependencies: - '@libp2p/interface': 1.0.2 - multiformats: 12.1.3 - uint8arrays: 5.0.0 - transitivePeerDependencies: - - supports-color - dev: false - - /@libp2p/peer-record@7.0.2: - resolution: {integrity: sha512-vsbOgWIyGEGZ0l2eSf+SFrv0bxuRG3tMN7OS1Xs8Qz/Ed1GtEbPtpC2ndSrl8Ngjxfxj8Ph/GJDXhYZz5faXHQ==} - dependencies: - '@libp2p/crypto': 3.0.2 - '@libp2p/interface': 1.0.2 - '@libp2p/peer-id': 4.0.2 - '@libp2p/utils': 5.1.0 - '@multiformats/multiaddr': 12.1.11 - protons-runtime: 5.0.0(uint8arraylist@2.4.3) - uint8-varint: 2.0.1 - uint8arraylist: 2.4.3 - uint8arrays: 5.0.0 - transitivePeerDependencies: - - supports-color - dev: false - - /@libp2p/peer-store@10.0.3: - resolution: {integrity: sha512-mbNgF6VM4hcMRVKBAgRK0gK4MuMYOqZcTGgayRzxbiNWxR9awy0pVFEPN+oEO3RMbCKSpmBqYcPXqmsEilnG6Q==} - dependencies: - '@libp2p/interface': 1.0.2 - '@libp2p/peer-collections': 5.1.1 - '@libp2p/peer-id': 4.0.2 - '@libp2p/peer-id-factory': 4.0.1 - '@libp2p/peer-record': 7.0.2 - '@multiformats/multiaddr': 12.1.11 + '@libp2p/interface': 1.1.2 + '@libp2p/peer-collections': 5.1.5 + '@libp2p/peer-id': 4.0.5 + '@libp2p/peer-record': 7.0.6 + '@multiformats/multiaddr': 12.1.12 interface-datastore: 8.2.3 it-all: 3.0.3 mortice: 3.0.1 - multiformats: 12.1.3 - protons-runtime: 5.0.0(uint8arraylist@2.4.3) - uint8arraylist: 2.4.3 + multiformats: 13.0.1 + protons-runtime: 5.0.0(uint8arraylist@2.4.8) + uint8arraylist: 2.4.8 uint8arrays: 5.0.0 transitivePeerDependencies: - supports-color dev: false - /@libp2p/ping@1.0.4: - resolution: {integrity: sha512-LD8FNs5UbC4Y/0piW1ue1YFMPaWU9+fguFgOKroKVjsy3Hwq4ckgp9tKlp0LZGaWTvKfJCX1m6/GcXJ7Rk0fFg==} + /@libp2p/ping@1.0.10: + resolution: {integrity: sha512-OR5hJ07YoyKpeU8B5oAnhnOlztf7rtldtplO275O1MFAk9jj/Y1/TiIBZsbmOG/6mAp/SaY7XwfnQeoYI4bmVw==} dependencies: - '@libp2p/crypto': 3.0.1 - '@libp2p/interface': 1.0.1 - '@libp2p/interface-internal': 1.0.3 - '@libp2p/peer-id-factory': 4.0.0 - '@multiformats/multiaddr': 12.1.11 + '@libp2p/crypto': 4.0.1 + '@libp2p/interface': 1.1.2 + '@libp2p/interface-internal': 1.0.7 + '@multiformats/multiaddr': 12.1.12 it-first: 3.0.4 it-pipe: 3.0.1 - uint8arrays: 4.0.6 + uint8arrays: 5.0.0 transitivePeerDependencies: - supports-color dev: false - /@libp2p/utils@5.1.0: - resolution: {integrity: sha512-N7GeLNhpAhSkzdmZaLACGvZtU/qzFS8+QX0Kejr+IMY9DIq6t8HmAp7rBirPhrajVnbSR//8jKoFWxg35mdZ7A==} + /@libp2p/utils@5.2.2: + resolution: {integrity: sha512-h7pNWv8Kyn7Mji8oNE/H6boon66Qu/GCsjjC3zIrHscRqeLPK0zR2EZlhWhfffObF//s0v0++okQNH5HsFQIPQ==} dependencies: '@chainsafe/is-ip': 2.0.2 - '@libp2p/interface': 1.0.2 - '@libp2p/peer-collections': 5.1.1 - '@multiformats/multiaddr': 12.1.11 + '@libp2p/interface': 1.1.2 + '@libp2p/logger': 4.0.5 + '@multiformats/multiaddr': 12.1.12 '@multiformats/multiaddr-matcher': 1.1.0 + delay: 6.0.0 get-iterator: 2.0.1 is-loopback-addr: 2.0.1 it-pushable: 3.2.3 it-stream-types: 2.0.1 - p-queue: 8.0.1 + p-defer: 4.0.0 private-ip: 3.0.1 + race-event: 1.1.0 race-signal: 1.0.2 - uint8arraylist: 2.4.3 + uint8arraylist: 2.4.8 transitivePeerDependencies: - supports-color dev: false - /@libp2p/websockets@8.0.5: - resolution: {integrity: sha512-3q9B8ItjoHzV9IQ92htSvlywLKCr8iBG8DJCH2I5OnkM5v3M3WLu4Hpr5+tlbVNY8ZeBCgu3xy5KKHijCmyorA==} + /@libp2p/websockets@8.0.12: + resolution: {integrity: sha512-xJ1g6vrMvuEOwzABwCl1LIOdoKL7pwn6wdWlJs0RUYeFNaepYcDEd/gTipNNci+yoXICvx4/cBzMR3Kksj2ZFQ==} dependencies: - '@libp2p/interface': 1.0.1 - '@libp2p/utils': 5.1.0 + '@libp2p/interface': 1.1.2 + '@libp2p/utils': 5.2.2 '@multiformats/mafmt': 12.1.6 - '@multiformats/multiaddr': 12.1.11 + '@multiformats/multiaddr': 12.1.12 '@multiformats/multiaddr-to-uri': 9.0.7 '@types/ws': 8.5.5 - it-ws: 6.0.5 + it-ws: 6.1.1 p-defer: 4.0.0 wherearewe: 2.0.1 ws: 8.13.0 @@ -1144,7 +1082,7 @@ packages: /@multiformats/mafmt@12.1.6: resolution: {integrity: sha512-tlJRfL21X+AKn9b5i5VnaTD6bNttpSpcqwKVmDmSHLwxoz97fAHaepqFOk/l1fIu94nImIXneNbhsJx/RQNIww==} dependencies: - '@multiformats/multiaddr': 12.1.11 + '@multiformats/multiaddr': 12.1.12 transitivePeerDependencies: - supports-color dev: false @@ -1153,8 +1091,8 @@ packages: resolution: {integrity: sha512-B/QbKpAxaHYVXFnbTdTgYqPDxmqoF2RYffwYoOv1MWfi2vBCZLdzmEKUBKv6fQr6s+LJFSHn2j2vczmwMFCQIA==} dependencies: '@chainsafe/is-ip': 2.0.2 - '@multiformats/multiaddr': 12.1.11 - multiformats: 12.0.1 + '@multiformats/multiaddr': 12.1.12 + multiformats: 12.1.3 transitivePeerDependencies: - supports-color dev: false @@ -1163,35 +1101,21 @@ packages: resolution: {integrity: sha512-i3ldtPMN6XJt+MCi34hOl0wGuGEHfWWMw6lmNag5BpckPwPTf9XGOOFMmh7ed/uO3Vjah/g173iOe61HTQVoBA==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: - '@multiformats/multiaddr': 12.1.11 + '@multiformats/multiaddr': 12.1.12 transitivePeerDependencies: - supports-color dev: false - /@multiformats/multiaddr@11.3.0: - resolution: {integrity: sha512-Inrmp986nHe92pgYyOWNVnB8QDmYe5EhR/7TStc46O4YEm87pbc1i4DWiTlEJ6tOpL8V6IBH5ol8BZsIaN+Tww==} - engines: {node: '>=16.0.0', npm: '>=7.0.0'} - dependencies: - '@chainsafe/is-ip': 2.0.2 - dns-over-http-resolver: 2.1.1 - err-code: 3.0.1 - multiformats: 11.0.2 - uint8arrays: 4.0.6 - varint: 6.0.0 - transitivePeerDependencies: - - supports-color - dev: false - - /@multiformats/multiaddr@12.1.11: - resolution: {integrity: sha512-CWG9kETEGTTMdr1T+/JEuMwFld3r3fHNP8LkLoUcLvHRy6yr8sWdotVGEDNEdDO/vrKhuD7bQBws3xMSMMyylg==} + /@multiformats/multiaddr@12.1.12: + resolution: {integrity: sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==} dependencies: '@chainsafe/is-ip': 2.0.2 '@chainsafe/netmask': 2.0.0 - '@libp2p/interface': 1.0.1 + '@libp2p/interface': 1.1.2 dns-over-http-resolver: 3.0.0 - multiformats: 12.0.1 - uint8-varint: 2.0.1 - uint8arrays: 4.0.6 + multiformats: 13.0.1 + uint8-varint: 2.0.2 + uint8arrays: 5.0.0 transitivePeerDependencies: - supports-color dev: false @@ -1211,6 +1135,11 @@ packages: engines: {node: '>= 16'} dev: false + /@noble/hashes@1.3.3: + resolution: {integrity: sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==} + engines: {node: '>= 16'} + dev: false + /@protobufjs/aspromise@1.1.2: resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} dev: false @@ -1394,7 +1323,7 @@ packages: resolution: {integrity: sha512-hlZ5Z8UwqrKsJcelVPEqDduZowJPBQJ9ZhBC2FXpja3lXy8X6MoI5uMzIgmrA8+3jcVnp8TF/tx+IBBqYJNUrg==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: - get-iterator: 2.0.0 + get-iterator: 2.0.1 it-stream-types: 2.0.1 dev: false @@ -1470,6 +1399,15 @@ packages: is-array-buffer: 3.0.2 dev: false + /asn1js@3.0.5: + resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==} + engines: {node: '>=12.0.0'} + dependencies: + pvtsutils: 1.3.5 + pvutils: 1.1.3 + tslib: 2.5.3 + dev: false + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -1630,13 +1568,6 @@ packages: ieee754: 1.2.1 dev: false - /busboy@1.6.0: - resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} - engines: {node: '>=10.16.0'} - dependencies: - streamsearch: 1.1.0 - dev: false - /call-bind@1.0.2: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: @@ -1770,7 +1701,7 @@ packages: it-map: 3.0.5 it-merge: 3.0.1 it-pipe: 3.0.1 - it-pushable: 3.2.1 + it-pushable: 3.2.3 it-sort: 3.0.3 it-take: 3.0.3 uint8arrays: 4.0.6 @@ -1854,18 +1785,6 @@ packages: engines: {node: '>=0.3.1'} dev: true - /dns-over-http-resolver@2.1.1: - resolution: {integrity: sha512-Lm/eXB7yAQLJ5WxlBGwYfBY7utduXPZykcSmcG6K7ozM0wrZFvxZavhT6PqI0kd/5CUTfev/RrEFQqyU4CGPew==} - engines: {node: '>=16.0.0', npm: '>=7.0.0'} - dependencies: - debug: 4.3.4 - native-fetch: 4.0.2(undici@5.22.1) - receptacle: 1.3.2 - undici: 5.22.1 - transitivePeerDependencies: - - supports-color - dev: false - /dns-over-http-resolver@3.0.0: resolution: {integrity: sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==} dependencies: @@ -2066,10 +1985,6 @@ packages: has-symbols: 1.0.3 dev: false - /get-iterator@2.0.0: - resolution: {integrity: sha512-BDJawD5PU2gZv6Vlp8O28H4GnZcsr3h9gZUvnAP5xXP3WOy/QAoOsyMepSkw21jur+4t5Vppde72ChjhTIzxzg==} - dev: false - /get-iterator@2.0.1: resolution: {integrity: sha512-7HuY/hebu4gryTDT7O/XY/fvY9wRByEGdK6QOa4of8npTcv0+NS6frFKABcf6S9EBAsveTuKTsZQQBFMMNILIg==} dev: false @@ -2386,11 +2301,6 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true - /iso-url@1.2.1: - resolution: {integrity: sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==} - engines: {node: '>=12'} - dev: false - /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} engines: {node: '>=8'} @@ -2444,7 +2354,7 @@ packages: /it-byte-stream@1.0.1: resolution: {integrity: sha512-Nu1/y8ObmrEmpHfWBHrWKtla9xwTdnMceB7v1z7tM+H84VP5Ou59wyFiJHsyvuIETLfKFY+TfhEbOJy24FRGjQ==} dependencies: - it-pushable: 3.2.1 + it-pushable: 3.2.3 it-stream-types: 2.0.1 uint8arraylist: 2.4.3 dev: false @@ -2469,16 +2379,6 @@ packages: it-peekable: 3.0.2 dev: false - /it-length-prefixed-stream@1.0.2: - resolution: {integrity: sha512-gWevodoctgwWUaRJN9t+xEs1H1GQNYAjLCR7FO50fon9Ph4OJGgrxPKTc26QXKrC/cIQZLkHYClphUw0wl1k2A==} - dependencies: - it-byte-stream: 1.0.1 - it-length-prefixed: 9.0.3 - it-stream-types: 2.0.1 - uint8-varint: 2.0.1 - uint8arraylist: 2.4.3 - dev: false - /it-length-prefixed-stream@1.1.5: resolution: {integrity: sha512-r/txldLo3Dq4EqLJY2mSK6y59qY7peRyomdjyhCmBlQYr7fPmiS1UA5A8mLwQV3k+WPD5zK0cu/7EpvzD4T+ew==} dependencies: @@ -2496,7 +2396,7 @@ packages: err-code: 3.0.1 it-reader: 6.0.4 it-stream-types: 2.0.1 - uint8-varint: 2.0.1 + uint8-varint: 2.0.2 uint8arraylist: 2.4.3 uint8arrays: 4.0.6 dev: false @@ -2511,7 +2411,7 @@ packages: resolution: {integrity: sha512-I6hjU1ABO+k3xY1H6JtCSDXvUME88pxIXSgKeT4WI5rPYbQzpr98ldacVuG95WbjaJxKl6Qot6lUdxduLBQPHA==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: - it-pushable: 3.2.1 + it-pushable: 3.2.3 dev: false /it-pair@2.0.6: @@ -2522,6 +2422,12 @@ packages: p-defer: 4.0.0 dev: false + /it-parallel@3.0.6: + resolution: {integrity: sha512-i7UM7I9LTkDJw3YIqXHFAPZX6CWYzGc+X3irdNrVExI4vPazrJdI7t5OqrSVN8CONXLAunCiqaSV/zZRbQR56A==} + dependencies: + p-defer: 4.0.0 + dev: false + /it-peekable@3.0.2: resolution: {integrity: sha512-nWwUdhNQ1CfAuoJmsaUotNMYUrfNIlY9gBA1jwWfWSu1I0mLY2brwreKHGOUptXLJUiG5pR04He0xYZMWBRiGA==} dev: false @@ -2531,24 +2437,17 @@ packages: engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: it-merge: 3.0.1 - it-pushable: 3.2.1 + it-pushable: 3.2.3 it-stream-types: 2.0.1 dev: false - /it-protobuf-stream@1.0.2: - resolution: {integrity: sha512-2lESJIeZS2ZlYJc/1SKs6LL4Y83rCCvZv750xV1e4uuP9114yNkw2MhIGCtSReg+qNWCvzGqOwjQbKV0LFE6wQ==} + /it-protobuf-stream@1.1.2: + resolution: {integrity: sha512-epZBuG+7cPaTxCR/Lf3ApshBdA9qfflGPQLfLLrp9VQ0w67Z2xo4H+SLLetav57/29oPtAXwVaoyemg99JOWzA==} dependencies: - it-length-prefixed-stream: 1.0.2 + it-length-prefixed-stream: 1.1.5 it-stream-types: 2.0.1 - protons-runtime: 5.0.0(uint8arraylist@2.4.3) - uint8arraylist: 2.4.3 - dev: false - - /it-pushable@3.2.1: - resolution: {integrity: sha512-sLFz2Q0oyDCJpTciZog7ipP4vSftfPy3e6JnH6YyztRa1XqkpGQaafK3Jw/JlfEBtCXfnX9uVfcpu3xpSAqCVQ==} - engines: {node: '>=16.0.0', npm: '>=7.0.0'} - dependencies: - p-defer: 4.0.0 + protons-runtime: 5.0.0(uint8arraylist@2.4.8) + uint8arraylist: 2.4.8 dev: false /it-pushable@3.2.3: @@ -2580,15 +2479,14 @@ packages: resolution: {integrity: sha512-Ay5SXEyrBKD0tO8PQif2QjrStImIsLIg0F50Uu4EeXOw8C9DfVIGfsGL3X9s65F2I9skDp9mLgBzl71IToMxNw==} dev: false - /it-ws@6.0.5: - resolution: {integrity: sha512-xp7tF4fHgx8+vN3Qy/8wGiWUKbC9E1U1g9PwtlbdxD7pY4zld71ZyWZVFHLxnxxg14T9mVNK5uO7U9HK11VQ5g==} + /it-ws@6.1.1: + resolution: {integrity: sha512-oyk4eCeZto2lzWDnJOa3j1S2M+VOGKUh8isEf94ySoaL6IFlyie0T4P9E0ZUaIvX8LyJxYFHFKCt8Zk7Sm/XPQ==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: '@types/ws': 8.5.5 event-iterator: 2.0.0 - iso-url: 1.2.1 it-stream-types: 2.0.1 - uint8arrays: 4.0.6 + uint8arrays: 5.0.0 ws: 8.13.0 transitivePeerDependencies: - bufferutil @@ -3047,42 +2945,29 @@ packages: engines: {node: '>=6'} dev: true - /libp2p@1.0.7: - resolution: {integrity: sha512-Wo/Ht01QwcnKKZlS759/72jrWIl1Zbf6lz4/qsgK26+DNXLuxeGn+lPDFwttNP3LdYR+s3OS26S11o8yZMcshQ==} + /libp2p@1.2.0: + resolution: {integrity: sha512-ATtldazSGZqkSLPFD4t00Cizvbex4N0XilFHEIp5IRu0r6klOVLwD9s6/XtZswQqXQmkv71UW6nnNa30EAHsvA==} dependencies: - '@libp2p/crypto': 3.0.1 - '@libp2p/interface': 1.0.1 - '@libp2p/interface-internal': 1.0.3 - '@libp2p/logger': 4.0.2 - '@libp2p/multistream-select': 5.0.3 - '@libp2p/peer-collections': 5.1.1 - '@libp2p/peer-id': 4.0.1 - '@libp2p/peer-id-factory': 4.0.0 - '@libp2p/peer-store': 10.0.3 - '@libp2p/utils': 5.1.0 - '@multiformats/mafmt': 12.1.6 - '@multiformats/multiaddr': 12.1.11 - '@multiformats/multiaddr-matcher': 1.1.0 + '@libp2p/crypto': 4.0.1 + '@libp2p/interface': 1.1.2 + '@libp2p/interface-internal': 1.0.7 + '@libp2p/logger': 4.0.5 + '@libp2p/multistream-select': 5.1.2 + '@libp2p/peer-collections': 5.1.5 + '@libp2p/peer-id': 4.0.5 + '@libp2p/peer-id-factory': 4.0.5 + '@libp2p/peer-store': 10.0.7 + '@libp2p/utils': 5.2.2 + '@multiformats/multiaddr': 12.1.12 any-signal: 4.1.1 datastore-core: 9.2.2 - delay: 6.0.0 interface-datastore: 8.2.3 - it-all: 3.0.3 - it-drain: 3.0.3 - it-filter: 3.0.3 - it-first: 3.0.4 - it-map: 3.0.5 it-merge: 3.0.1 - it-pipe: 3.0.1 - it-stream-types: 2.0.1 + it-parallel: 3.0.6 merge-options: 3.0.4 - multiformats: 12.1.3 - p-defer: 4.0.0 - p-queue: 7.4.1 + multiformats: 13.0.1 private-ip: 3.0.1 - rate-limiter-flexible: 3.0.6 - uint8arraylist: 2.4.3 - uint8arrays: 4.0.6 + uint8arrays: 5.0.0 transitivePeerDependencies: - supports-color dev: false @@ -3205,30 +3090,21 @@ packages: engines: {node: '>=16.0.0', npm: '>=7.0.0'} dev: false - /multiformats@12.0.1: - resolution: {integrity: sha512-s01wijBJoDUqESWSzePY0lvTw7J3PVO9x2Cc6ASI5AMZM2Gnhh7BC17+nlFhHKU7dDzaCaRfb+NiqNzOsgPUoQ==} - engines: {node: '>=16.0.0', npm: '>=7.0.0'} - dev: false - /multiformats@12.1.3: resolution: {integrity: sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} dev: false + /multiformats@13.0.1: + resolution: {integrity: sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==} + dev: false + /nanoid@4.0.2: resolution: {integrity: sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==} engines: {node: ^14 || ^16 || >=18} hasBin: true dev: false - /native-fetch@4.0.2(undici@5.22.1): - resolution: {integrity: sha512-4QcVlKFtv2EYVS5MBgsGX5+NWKtbDbIECdUXDBGDMAZXq3Jkv9zf+y8iS7Ub8fEdga3GpYeazp9gauNqXHJOCg==} - peerDependencies: - undici: '*' - dependencies: - undici: 5.22.1 - dev: false - /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -3345,14 +3221,6 @@ packages: p-timeout: 5.1.0 dev: false - /p-queue@8.0.1: - resolution: {integrity: sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA==} - engines: {node: '>=18'} - dependencies: - eventemitter3: 5.0.1 - p-timeout: 6.1.2 - dev: false - /p-timeout@5.1.0: resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} engines: {node: '>=12'} @@ -3451,6 +3319,11 @@ packages: netmask: 2.0.2 dev: false + /progress-events@1.0.0: + resolution: {integrity: sha512-zIB6QDrSbPfRg+33FZalluFIowkbV5Xh1xSuetjG+rlC5he6u2dc6VQJ0TbMdlN3R1RHdpOqxEFMKTnQ+itUwA==} + engines: {node: '>=16.0.0', npm: '>=7.0.0'} + dev: false + /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -3488,10 +3361,35 @@ packages: uint8arraylist: 2.4.3 dev: false + /protons-runtime@5.0.0(uint8arraylist@2.4.8): + resolution: {integrity: sha512-QqjGnPGkpvbzq0dITzhG9DVK10rRIHf7nePcU2QQVVpFGuYbwrOWnvGSvei1GcceAzB9syTz6vHzvTPmGRR0PA==} + engines: {node: '>=16.0.0', npm: '>=7.0.0'} + peerDependencies: + uint8arraylist: ^2.3.2 + dependencies: + protobufjs: 7.2.3 + uint8arraylist: 2.4.8 + dev: false + /pure-rand@6.0.2: resolution: {integrity: sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==} dev: true + /pvtsutils@1.3.5: + resolution: {integrity: sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==} + dependencies: + tslib: 2.6.2 + dev: false + + /pvutils@1.1.3: + resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} + engines: {node: '>=6.0.0'} + dev: false + + /race-event@1.1.0: + resolution: {integrity: sha512-8BTiN6IAbov8mqkVEc3LiYbtUzanLfzFhwPF7kZV74ztYeQXdFPIgMCd/sy8xie6ZMtf2JPeMBedx78/RRNO3g==} + dev: false + /race-signal@1.0.2: resolution: {integrity: sha512-o3xNv0iTcIDQCXFlF6fPAMEBRjFxssgGoRqLbg06m+AdzEXXLUmoNOoUHTVz2NoBI8hHwKFKoC6IqyNtWr2bww==} dev: false @@ -3509,10 +3407,6 @@ packages: safe-buffer: 5.2.1 dev: false - /rate-limiter-flexible@3.0.6: - resolution: {integrity: sha512-tlvbee6lyse/XTWmsuBDS4MT8N65FyM151bPmQlFyfhv9+RIHs7d3rSTXoz0j35H910dM01mH0yTIeWYo8+aAw==} - dev: false - /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true @@ -3658,11 +3552,6 @@ packages: internal-slot: 1.0.5 dev: false - /streamsearch@1.1.0: - resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} - engines: {node: '>=10.0.0'} - dev: false - /string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -3847,6 +3736,10 @@ packages: resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} dev: false + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: false + /type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} @@ -3863,13 +3756,6 @@ packages: hasBin: true dev: true - /uint8-varint@2.0.1: - resolution: {integrity: sha512-euvmpuulJstK5+xNuI4S1KfnxJnbI5QP52RXIR3GZ3/ZMkOsEK2AgCtFpNvEQLXMxMx2o0qcyevK1fJwOZJagQ==} - dependencies: - uint8arraylist: 2.4.3 - uint8arrays: 4.0.6 - dev: false - /uint8-varint@2.0.2: resolution: {integrity: sha512-LZXmBT0jiHR7J4oKM1GUhtdLFW1yPauzI8NjJlotXn92TprO9u8VMvEVR4QMk8xhUVUd+2fqfU2/kGbVHYSSWw==} dependencies: @@ -3884,6 +3770,12 @@ packages: uint8arrays: 4.0.6 dev: false + /uint8arraylist@2.4.8: + resolution: {integrity: sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==} + dependencies: + uint8arrays: 5.0.1 + dev: false + /uint8arrays@4.0.3: resolution: {integrity: sha512-b+aKlI2oTnxnfeSQWV1sMacqSNxqhtXySaH6bflvONGxF8V/fT3ZlYH7z2qgGfydsvpVo4JUgM/Ylyfl2YouCg==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} @@ -3894,25 +3786,24 @@ packages: /uint8arrays@4.0.6: resolution: {integrity: sha512-4ZesjQhqOU2Ip6GPReIwN60wRxIupavL8T0Iy36BBHr2qyMrNxsPJvr7vpS4eFt8F8kSguWUPad6ZM9izs/vyw==} dependencies: - multiformats: 12.0.1 + multiformats: 12.1.3 dev: false /uint8arrays@5.0.0: resolution: {integrity: sha512-RWO7gR4x6syxnKDfZO8mDCsaaYs1/BqZCxlHgrcRge50E9GTnLmtoA4kwFSGIL4s3dQkryeTkvtG6oEFEya3yg==} dependencies: - multiformats: 12.0.1 + multiformats: 12.1.3 + dev: false + + /uint8arrays@5.0.1: + resolution: {integrity: sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==} + dependencies: + multiformats: 13.0.1 dev: false /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - /undici@5.22.1: - resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} - engines: {node: '>=14.0'} - dependencies: - busboy: 1.6.0 - dev: false - /update-browserslist-db@1.0.11(browserslist@4.21.9): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} hasBin: true @@ -3946,10 +3837,6 @@ packages: convert-source-map: 1.9.0 dev: true - /varint@6.0.0: - resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} - dev: false - /walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} dependencies: diff --git a/project/plugins.sbt b/project/plugins.sbt index edb88a30..2be0600c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.5") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16") diff --git a/semantics/src/main/scala/aqua/semantics/CompilerState.scala b/semantics/src/main/scala/aqua/semantics/CompilerState.scala index 1ea49212..ef7783d5 100644 --- a/semantics/src/main/scala/aqua/semantics/CompilerState.scala +++ b/semantics/src/main/scala/aqua/semantics/CompilerState.scala @@ -1,12 +1,12 @@ package aqua.semantics +import aqua.mangler.ManglerState import aqua.parser.lexer.Token import aqua.raw.Raw import aqua.raw.RawContext import aqua.semantics.rules.abilities.AbilitiesState import aqua.semantics.rules.definitions.DefinitionsState import aqua.semantics.rules.locations.LocationsState -import aqua.semantics.rules.mangler.ManglerState import aqua.semantics.rules.names.NamesState import aqua.semantics.rules.report.ReportState import aqua.semantics.rules.types.TypesState diff --git a/semantics/src/main/scala/aqua/semantics/ExprSem.scala b/semantics/src/main/scala/aqua/semantics/ExprSem.scala index 9cb4fb7c..1c04cd95 100644 --- a/semantics/src/main/scala/aqua/semantics/ExprSem.scala +++ b/semantics/src/main/scala/aqua/semantics/ExprSem.scala @@ -1,9 +1,9 @@ package aqua.semantics -import aqua.raw.Raw import aqua.parser.Expr import aqua.parser.expr.* import aqua.parser.expr.func.* +import aqua.raw.Raw import aqua.semantics.expr.* import aqua.semantics.expr.func.* import aqua.semantics.rules.ValuesAlgebra @@ -20,7 +20,7 @@ object ExprSem { def getProg[S[_], G[_]: Monad]( expr: Expr[S] - )(implicit + )(using A: AbilitiesAlgebra[S, G], N: NamesAlgebra[S, G], T: TypesAlgebra[S, G], diff --git a/semantics/src/main/scala/aqua/semantics/Semantics.scala b/semantics/src/main/scala/aqua/semantics/Semantics.scala index bf76ea63..9eebb9aa 100644 --- a/semantics/src/main/scala/aqua/semantics/Semantics.scala +++ b/semantics/src/main/scala/aqua/semantics/Semantics.scala @@ -1,9 +1,8 @@ package aqua.semantics import aqua.parser.Ast -import aqua.semantics.SemanticError -import cats.data.{Chain, EitherNec, EitherT, NonEmptyChain, ValidatedNec, Writer} +import cats.data.{Chain, EitherT, NonEmptyChain, Writer} trait Semantics[S[_], C] { diff --git a/semantics/src/main/scala/aqua/semantics/expr/func/ForSem.scala b/semantics/src/main/scala/aqua/semantics/expr/func/ForSem.scala index 1e384bf6..0a2f8c74 100644 --- a/semantics/src/main/scala/aqua/semantics/expr/func/ForSem.scala +++ b/semantics/src/main/scala/aqua/semantics/expr/func/ForSem.scala @@ -1,11 +1,10 @@ package aqua.semantics.expr.func import aqua.parser.expr.func.ForExpr -import aqua.parser.expr.func.ForExpr.Mode import aqua.parser.lexer.{Name, ValueToken} import aqua.raw.Raw import aqua.raw.ops.* -import aqua.raw.ops.ForTag +import aqua.raw.ops.ForTag.Mode import aqua.raw.value.ValueRaw import aqua.semantics.Prog import aqua.semantics.expr.func.FuncOpSem @@ -40,18 +39,17 @@ class ForSem[S[_]](val expr: ForExpr[S]) extends AnyVal { (iterable, ops) match { case (Some(vm), FuncOp(op)) => FuncOpSem.restrictStreamsInScope(op).map { restricted => - val innerTag = expr.mode.fold(SeqTag) { - case ForExpr.Mode.ParMode => ParTag - case ForExpr.Mode.TryMode => TryTag + val mode = expr.mode.fold(ForTag.Mode.SeqMode) { + case ForExpr.Mode.ParMode => ForTag.Mode.ParMode + case ForExpr.Mode.TryMode => ForTag.Mode.TryMode + case ForExpr.Mode.RecMode => ForTag.Mode.RecMode } - /** - * `for ... par` => blocking (`never` as `last` in `fold`) - * `for` and `for ... try` => non blocking (`null` as `last` in `fold`) - */ - val mode = expr.mode.fold(ForTag.Mode.NonBlocking) { - case ForExpr.Mode.ParMode => ForTag.Mode.Blocking - case Mode.TryMode => ForTag.Mode.NonBlocking + val innerTag = mode match { + case ForTag.Mode.SeqMode => SeqTag + case ForTag.Mode.ParMode => ParTag + case ForTag.Mode.TryMode => TryTag + case ForTag.Mode.RecMode => ParTag } val forTag = ForTag(expr.item.value, vm, mode).wrap( @@ -61,9 +59,15 @@ class ForSem[S[_]](val expr: ForExpr[S]) extends AnyVal { ) ) - // Fix: continue execution after fold par immediately, without finding a path out from par branches - if (innerTag == ParTag) ParTag.Detach.wrap(forTag).toFuncOp - else forTag.toFuncOp + // Fix: continue execution after fold par immediately, + // without finding a path out from par branches + val result = mode match { + case ForTag.Mode.ParMode | ForTag.Mode.RecMode => + ParTag.Detach.wrap(forTag) + case _ => forTag + } + + result.toFuncOp } case _ => Raw.error("Wrong body of the `for` expression").pure[F] } diff --git a/semantics/src/main/scala/aqua/semantics/expr/func/ParSeqSem.scala b/semantics/src/main/scala/aqua/semantics/expr/func/ParSeqSem.scala index 670154e7..852f9502 100644 --- a/semantics/src/main/scala/aqua/semantics/expr/func/ParSeqSem.scala +++ b/semantics/src/main/scala/aqua/semantics/expr/func/ParSeqSem.scala @@ -64,11 +64,11 @@ class ParSeqSem[S[_]](val expr: ParSeqExpr[S]) extends AnyVal { strategy = OnTag.ReturnStrategy.Relay.some ) /** - * `parseq` => blocking (`never` as `last` in `fold`) + * `parseq` => par (`never` as `last` in `fold`) * So that peer initiating `parseq` would not continue execution past it */ tag = ForTag - .blocking(expr.item.value, vm) + .par(expr.item.value, vm) .wrap( ParTag.wrap( onTag.wrap(restricted), diff --git a/semantics/src/main/scala/aqua/semantics/expr/func/ServiceIdSem.scala b/semantics/src/main/scala/aqua/semantics/expr/func/ServiceIdSem.scala index 7274c844..32dfc65a 100644 --- a/semantics/src/main/scala/aqua/semantics/expr/func/ServiceIdSem.scala +++ b/semantics/src/main/scala/aqua/semantics/expr/func/ServiceIdSem.scala @@ -31,11 +31,11 @@ class ServiceIdSem[S[_]](val expr: ServiceIdExpr[S]) extends AnyVal { ) serviceType <- EitherT.fromOptionF( T.resolveServiceType(expr.service), - Raw.error("Can not resolve service type") + Raw.error("Cannot resolve service type") ) name <- EitherT.fromOptionF( A.renameService(expr.service), - Raw.error("Can not set service ID") + Raw.error("Cannot set service ID") ) _ <- EitherT.liftF( N.derive( diff --git a/semantics/src/main/scala/aqua/semantics/header/HeaderHandler.scala b/semantics/src/main/scala/aqua/semantics/header/HeaderHandler.scala index 4cadd52b..b8b8b2ba 100644 --- a/semantics/src/main/scala/aqua/semantics/header/HeaderHandler.scala +++ b/semantics/src/main/scala/aqua/semantics/header/HeaderHandler.scala @@ -18,6 +18,7 @@ import cats.syntax.foldable.* import cats.syntax.functor.* import cats.syntax.option.* import cats.syntax.semigroup.* +import cats.syntax.traverse.* import cats.syntax.validated.* import cats.{Comonad, Eval, Monoid} @@ -104,55 +105,63 @@ class HeaderHandler[S[_]: Comonad, C](using ) ) - // Handler for every header expression, will be combined later - val onExpr: PartialFunction[HeaderExpr[S], Res[S, C]] = { - // Module header, like `module A declares *` - case ModuleExpr(name, declareAll, declareNames, declareCustom) => + val handleModule: ModuleExpr[S] => Res[S, C] = { + case ModuleExpr(word, name, declareAll, declareNames, declareCustom) => val shouldDeclare = declareNames.map(_.value).toSet ++ declareCustom.map(_.value) - validNec( - HeaderSem[S, C]( - // Save module header info - acm.empty.setModule( - name.value, - shouldDeclare - ), - (ctx, _) => - // When file is handled, check that all the declarations exists - if (declareAll.nonEmpty) { - validNec( - ctx.setModule(name.value, declares = ctx.all) - ) - } else - ( - declareNames.fproductLeft(_.value) ::: declareCustom.fproductLeft(_.value) - ).map { case (n, t) => - ctx - .pick(n, None, ctx.module.nonEmpty) - .toValidNec( - error( - t, - s"`$n` is expected to be declared, but declaration is not found in the file" - ) + + lazy val sem = HeaderSem( + // Save module header info + acm.empty.setModule( + name.value, + shouldDeclare + ), + (ctx, _) => + // When file is handled, check that all the declarations exists + if (declareAll.nonEmpty) + ctx.setModule(name.value, declares = ctx.all).validNec + else + ( + declareNames.fproductLeft(_.value) ::: declareCustom.fproductLeft(_.value) + ).map { case (n, t) => + ctx + .pick(n, None, ctx.module.nonEmpty) + .toValidNec( + error( + t, + s"`$n` is expected to be declared, but declaration is not found in the file" ) - .void - }.combineAll - .as( - // TODO: why module name and declares is lost? where is it lost? - ctx.setModule(name.value, declares = shouldDeclare) ) - ) + .void + }.combineAll.as( + // TODO: why module name and declares is lost? where is it lost? + ctx.setModule(name.value, declares = shouldDeclare) + ) ) + word.value.fold( + module = error( + word, + "Keyword `module` is deprecated, use `aqua` instead" + ).invalidNec, + aqua = sem.validNec + ) + } + + // Handler for every header expression, will be combined later + val onExpr: HeaderExpr[S] => Res[S, C] = { + case m: ModuleExpr[S] => + error(m.token, "Module header is expected to be at the top").invalidNec + case f @ ImportExpr(_) => // Import everything from a file - resolve(f).map(fc => HeaderSem[S, C](fc, (c, _) => validNec(c))) + resolve(f).map(fc => HeaderSem(fc, (c, _) => validNec(c))) case f @ ImportFromExpr(_, _) => // Import, map declarations resolve(f) .andThen(getFrom(f, _)) .map { ctx => - HeaderSem[S, C](ctx, (c, _) => validNec(c)) + HeaderSem(ctx, (c, _) => validNec(c)) } case f @ UseExpr(_, asModule) => @@ -160,7 +169,7 @@ class HeaderHandler[S[_]: Comonad, C](using resolve(f) .andThen(toModule(_, f.token, asModule)) .map { fc => - HeaderSem[S, C](fc, (c, _) => validNec(c)) + HeaderSem(fc, (c, _) => validNec(c)) } case f @ UseFromExpr(_, _, asModule) => @@ -169,86 +178,66 @@ class HeaderHandler[S[_]: Comonad, C](using .andThen(getFrom(f, _)) .andThen(toModule(_, f.token, Some(asModule))) .map { fc => - HeaderSem[S, C](fc, (c, _) => validNec(c)) + HeaderSem(fc, (c, _) => validNec(c)) } case ExportExpr(pubs) => // Save exports, finally handle them - validNec( - HeaderSem[S, C]( - // Nothing there - picker.blank, - (ctx, initCtx) => - val sumCtx = initCtx |+| ctx + HeaderSem( + // Nothing there + picker.blank, + (ctx, initCtx) => + val sumCtx = initCtx |+| ctx - pubs - .map( - _.bimap( - _.bimap(n => (n, n.value), _.map(_.value)), - _.bimap(n => (n, n.value), _.map(_.value)) - ).merge - ) - .map { case ((token, name), rename) => - sumCtx - .pick(name, rename, declared = false) - .as(Map(name -> rename)) - .toValid( - error( - token, - s"File has no $name declaration or import, " + - s"cannot export, available functions: ${sumCtx.funcNames.mkString(", ")}" - ) + pubs + .map( + _.bimap( + _.bimap(n => (n, n.value), _.map(_.value)), + _.bimap(n => (n, n.value), _.map(_.value)) + ).merge + ) + .map { case ((token, name), rename) => + sumCtx + .pick(name, rename, declared = false) + .as(Map(name -> rename)) + .toValid( + error( + token, + s"File has no $name declaration or import, " + + s"cannot export, available functions: ${sumCtx.funcNames.mkString(", ")}" ) - .ensure( - error( - token, - s"Can not export '$name' as it is an ability" - ) - )(_ => !sumCtx.isAbility(name)) - .toValidatedNec <* exportFuncChecks(sumCtx, token, name) - } - .prepend(validNec(ctx.exports)) - .combineAll - .map(ctx.setExports) - ) - ) - - case HeadExpr(token) => - // Old file exports everything that it declares - validNec( - HeaderSem[S, C]( - acm.empty, - (ctx, initCtx) => { - val sumCtx = initCtx |+| ctx - ctx.funcNames.toList - .traverse_(name => - // TODO: Provide better token for this error - exportFuncChecks(sumCtx, token, name) - ) - .combine( - ctx.definedAbilityNames.toList.traverse_(name => - // TODO: Provide better token for this error - error(token, s"Can not export '$name' as it is an ability ").invalidNec ) - ) - .as( - // Export everything - ctx.setExports( - ctx.all.map(_ -> None).toMap - ) - ) - } - ) - ) + .ensure( + error( + token, + s"Can not export '$name' as it is an ability" + ) + )(_ => !sumCtx.isAbility(name)) + .toValidatedNec <* exportFuncChecks(sumCtx, token, name) + } + .prepend(validNec(ctx.exports)) + .combineAll + .map(ctx.setExports) + ).validNec case f: FilenameExpr[S] => - resolve(f).map(fc => HeaderSem[S, C](fc, (c, _) => validNec(c))) + resolve(f).map(fc => HeaderSem(fc, (c, _) => validNec(c))) } - Cofree - .cata[Chain, HeaderExpr[S], Res[S, C]](header) { case (expr, children) => - onExpr.lift.apply(expr).fold(Eval.later(children.combineAll))(combineAnd(children)) - } - .value + val (module, other) = + header.headers.uncons.collect { case (m: ModuleExpr[S], rest) => + (m.some, rest) + }.getOrElse((none, header.headers)) + .bimap( + _.toValidNec( + error( + header.begin, + "Missing module header at the top of the file" + ) + ).andThen(handleModule), + _.foldMap(onExpr) + ) + + module |+| other } } diff --git a/semantics/src/main/scala/aqua/semantics/rules/ValuesAlgebra.scala b/semantics/src/main/scala/aqua/semantics/rules/ValuesAlgebra.scala index 4ddded3d..ca12c51a 100644 --- a/semantics/src/main/scala/aqua/semantics/rules/ValuesAlgebra.scala +++ b/semantics/src/main/scala/aqua/semantics/rules/ValuesAlgebra.scala @@ -17,6 +17,7 @@ import cats.data.{NonEmptyList, OptionT} import cats.instances.list.* import cats.syntax.applicative.* import cats.syntax.apply.* +import cats.syntax.bifunctor.* import cats.syntax.flatMap.* import cats.syntax.foldable.* import cats.syntax.functor.* @@ -52,29 +53,38 @@ class ValuesAlgebra[S[_], Alg[_]: Monad](using private def resolveSingleProperty(rootType: Type, op: PropertyOp[S]): Alg[Option[PropertyRaw]] = op match { case op: IntoField[S] => - T.resolveField(rootType, op) - case op: IntoArrow[S] => - for { - maybeArgs <- op.arguments.traverse(valueToRaw) - arrowProp <- maybeArgs.sequence.flatTraverse( - T.resolveArrow(rootType, op, _) + OptionT(T.resolveIntoField(op, rootType)) + .map( + _.fold( + field = t => IntoFieldRaw(op.value, t), + property = t => FunctorRaw(op.value, t) + ) ) - } yield arrowProp + .value + case op: IntoArrow[S] => + (for { + args <- op.arguments.traverse(arg => OptionT(valueToRaw(arg))) + argTypes = args.map(_.`type`) + arrowType <- OptionT(T.resolveIntoArrow(op, rootType, argTypes)) + } yield IntoArrowRaw(op.name.value, arrowType, args)).value case op: IntoCopy[S] => (for { _ <- OptionT.liftF( reportNamedArgsDuplicates(op.args) ) - fields <- op.args.traverse(arg => OptionT(valueToRaw(arg.argValue)).map(arg -> _)) - prop <- OptionT(T.resolveCopy(op, rootType, fields)) - } yield prop).value - case op: IntoIndex[S] => - for { - maybeIdx <- op.idx.fold(LiteralRaw.Zero.some.pure)(valueToRaw) - idxProp <- maybeIdx.flatTraverse( - T.resolveIndex(rootType, op, _) + args <- op.args.traverse(arg => + OptionT(valueToRaw(arg.argValue)).map( + arg.argName.value -> _ + ) ) - } yield idxProp + argsTypes = args.map { case (_, raw) => raw.`type` } + structType <- OptionT(T.resolveIntoCopy(op, rootType, argsTypes)) + } yield IntoCopyRaw(structType, args.toNem)).value + case op: IntoIndex[S] => + (for { + idx <- OptionT(op.idx.fold(LiteralRaw.Zero.some.pure)(valueToRaw)) + valueType <- OptionT(T.resolveIntoIndex(op, rootType, idx.`type`)) + } yield IntoIndexRaw(idx, valueType)).value } def valueToRaw(v: ValueToken[S]): Alg[Option[ValueRaw]] = @@ -136,27 +146,23 @@ class ValuesAlgebra[S[_], Alg[_]: Monad](using reportNamedArgsDuplicates(fields) ) fieldsGiven <- fields - .traverse(arg => OptionT(valueToRaw(arg.argValue)).map(arg.argName.value -> _)) + .traverse(arg => + OptionT(valueToRaw(arg.argValue)).map(valueRaw => + arg.argName.value -> (arg, valueRaw) + ) + ) .map(_.toNem) // Take only last value for a field - fieldsGivenTypes = fieldsGiven.map(_.`type`) - generated <- OptionT.fromOption( - resolvedType match { - case struct: StructType => - ( - struct.copy(fields = fieldsGivenTypes), - MakeStructRaw(fieldsGiven, struct) - ).some - case ability: AbilityType => - ( - ability.copy(fields = fieldsGivenTypes), - AbilityRaw(fieldsGiven, ability) - ).some - } - ) - (genType, genData) = generated + fieldsGivenRaws = fieldsGiven.map { case (_, raw) => raw } + fieldsGivenTypes = fieldsGiven.map(_.map(_.`type`)) + generated = resolvedType match { + case struct: StructType => + MakeStructRaw(fieldsGivenRaws, struct) + case ability: AbilityType => + AbilityRaw(fieldsGivenRaws, ability) + } data <- OptionT.whenM( - T.ensureTypeMatches(dvt, resolvedType, genType) - )(genData.pure) + T.ensureTypeConstructibleFrom(dvt, resolvedType, fieldsGivenTypes) + )(generated.pure) } yield data).value case ct @ CollectionToken(_, values) => diff --git a/semantics/src/main/scala/aqua/semantics/rules/locations/LocationsState.scala b/semantics/src/main/scala/aqua/semantics/rules/locations/LocationsState.scala index dd11b98e..d2178fe2 100644 --- a/semantics/src/main/scala/aqua/semantics/rules/locations/LocationsState.scala +++ b/semantics/src/main/scala/aqua/semantics/rules/locations/LocationsState.scala @@ -21,8 +21,9 @@ case class LocationsState[S[_]]( name: String, token: Token[S] ): List[VariableInfo[S]] = { - if (!vars.exists(_.definition.name == name)) - logger.error(s"Unexpected. Cannot add occurrence for $name") + // TODO: this code lasts too long, but we can find errors in it. + // if (!vars.exists(_.definition.name == name)) + // logger.error(s"Unexpected. Cannot add occurrence for $name") vars.updateFirst(_.definition.name == name, v => v.copy(occurrences = token +: v.occurrences)) } diff --git a/semantics/src/main/scala/aqua/semantics/rules/mangler/ManglerInterpreter.scala b/semantics/src/main/scala/aqua/semantics/rules/mangler/ManglerInterpreter.scala index 0eff5d80..ef97b0a6 100644 --- a/semantics/src/main/scala/aqua/semantics/rules/mangler/ManglerInterpreter.scala +++ b/semantics/src/main/scala/aqua/semantics/rules/mangler/ManglerInterpreter.scala @@ -1,27 +1,17 @@ package aqua.semantics.rules.mangler +import aqua.mangler.ManglerState + import cats.data.State import monocle.Lens -import monocle.macros.GenLens class ManglerInterpreter[X](using lens: Lens[X, ManglerState] ) extends ManglerAlgebra[State[X, *]] { override def rename(name: String): State[X, String] = - for { - s <- get - newName = LazyList - .from(0) - .map(i => s"$name-$i") - .dropWhile(s.isForbidden) - .head - _ <- modify(_.forbid(newName)) - } yield newName + apply(_.forbidAndRename(name)) - private lazy val get: State[X, ManglerState] = - State.get[X].map(lens.get) - - private def modify(f: ManglerState => ManglerState): State[X, Unit] = - State.modify[X](lens.modify(f)) + private def apply[A](f: ManglerState => (ManglerState, A)): State[X, A] = + State.apply(lens.modifyF(f andThen (_.swap)) andThen (_.swap)) } diff --git a/semantics/src/main/scala/aqua/semantics/rules/mangler/ManglerState.scala b/semantics/src/main/scala/aqua/semantics/rules/mangler/ManglerState.scala deleted file mode 100644 index 7d7f5dca..00000000 --- a/semantics/src/main/scala/aqua/semantics/rules/mangler/ManglerState.scala +++ /dev/null @@ -1,24 +0,0 @@ -package aqua.semantics.rules.mangler - -import cats.kernel.Monoid - -final case class ManglerState( - forbidden: Set[String] = Set.empty -) { - - def isForbidden(name: String): Boolean = - forbidden.contains(name) - - def forbid(name: String): ManglerState = - copy(forbidden = forbidden + name) -} - -object ManglerState { - - given Monoid[ManglerState] with { - override val empty: ManglerState = ManglerState() - - override def combine(x: ManglerState, y: ManglerState): ManglerState = - ManglerState(forbidden = x.forbidden ++ y.forbidden) - } -} diff --git a/semantics/src/main/scala/aqua/semantics/rules/types/TypesAlgebra.scala b/semantics/src/main/scala/aqua/semantics/rules/types/TypesAlgebra.scala index 742ae69d..e28a0313 100644 --- a/semantics/src/main/scala/aqua/semantics/rules/types/TypesAlgebra.scala +++ b/semantics/src/main/scala/aqua/semantics/rules/types/TypesAlgebra.scala @@ -40,26 +40,95 @@ trait TypesAlgebra[S[_], Alg[_]] { def defineAlias(name: NamedTypeToken[S], target: Type): Alg[Boolean] - def resolveIndex(rootT: Type, op: IntoIndex[S], idx: ValueRaw): Alg[Option[PropertyRaw]] - - def resolveCopy( - token: IntoCopy[S], + /** + * Resolve `IntoIndex` property on value with `rootT` type + * + * @param op property to resolve + * @param rootT type of the value to which property is applied + * @param idxType type of the index + * @return type of the value at given index if property application is valid + */ + def resolveIntoIndex( + op: IntoIndex[S], rootT: Type, - fields: NonEmptyList[(NamedArg[S], ValueRaw)] - ): Alg[Option[PropertyRaw]] + idxType: Type + ): Alg[Option[DataType]] - def resolveField(rootT: Type, op: IntoField[S]): Alg[Option[PropertyRaw]] - - def resolveArrow( + /** + * Resolve `IntoCopy` property on value with `rootT` type + * + * @param op property to resolve + * @param rootT type of the value to which property is applied + * @param types types of arguments passed + * @return struct type if property application is valid + * @note `types` should correspond to `op.args` + */ + def resolveIntoCopy( + op: IntoCopy[S], rootT: Type, + types: NonEmptyList[Type] + ): Alg[Option[StructType]] + + enum IntoFieldRes(`type`: Type) { + case Field(`type`: Type) extends IntoFieldRes(`type`) + case Property(`type`: Type) extends IntoFieldRes(`type`) + + def fold[A](field: Type => A, property: Type => A): A = + this match { + case Field(t) => field(t) + case Property(t) => property(t) + } + } + + /** + * Resolve `IntoField` property on value with `rootT` type + * + * @param op property to resolve + * @param rootT type of the value to which property is applied + * @return if property application is valid, return + * Field(type) if it's a field of rootT (fields of structs or abilities), + * Property(type) if it's a property of rootT (functors of collections) + */ + def resolveIntoField( + op: IntoField[S], + rootT: Type + ): Alg[Option[IntoFieldRes]] + + /** + * Resolve `IntoArrow` property on value with `rootT` type + * + * @param op property to resolve + * @param rootT type of the value to which property is applied + * @param types types of arguments passed + * @return arrow type if property application is valid + * @note `types` should correspond to `op.arguments` + */ + def resolveIntoArrow( op: IntoArrow[S], - arguments: List[ValueRaw] - ): Alg[Option[PropertyRaw]] + rootT: Type, + types: List[Type] + ): Alg[Option[ArrowType]] def ensureValuesComparable(token: Token[S], left: Type, right: Type): Alg[Boolean] def ensureTypeMatches(token: Token[S], expected: Type, givenType: Type): Alg[Boolean] + /** + * Check if given type (ability or struct) + * can be constructed from given arguments + * + * @param token token of construction expression (for error reporting) + * @param expected type to construct + * @param arguments arguments to construct with (name -> (named arg, type)) + * @return true if type can be constructed from given arguments + * reports error and warnings if necessary + */ + def ensureTypeConstructibleFrom( + token: Token[S], + expected: AbilityType | StructType, + arguments: NonEmptyMap[String, (NamedArg[S], Type)] + ): Alg[Boolean] + def typeToCollectible(token: Token[S], givenType: Type): OptionT[Alg, CollectibleType] def typeToStream(token: Token[S], givenType: Type): OptionT[Alg, StreamType] diff --git a/semantics/src/main/scala/aqua/semantics/rules/types/TypesInterpreter.scala b/semantics/src/main/scala/aqua/semantics/rules/types/TypesInterpreter.scala index 4f76de4d..c609821e 100644 --- a/semantics/src/main/scala/aqua/semantics/rules/types/TypesInterpreter.scala +++ b/semantics/src/main/scala/aqua/semantics/rules/types/TypesInterpreter.scala @@ -1,7 +1,9 @@ package aqua.semantics.rules.types +import aqua.errors.Errors.internalError import aqua.parser.lexer.* import aqua.raw.value.* +import aqua.semantics.Levenshtein import aqua.semantics.rules.StackInterpreter import aqua.semantics.rules.locations.{DefinitionInfo, LocationsAlgebra} import aqua.semantics.rules.report.ReportAlgebra @@ -16,6 +18,7 @@ import cats.syntax.apply.* import cats.syntax.flatMap.* import cats.syntax.foldable.* import cats.syntax.functor.* +import cats.syntax.monad.* import cats.syntax.option.* import cats.syntax.traverse.* import cats.{Applicative, ~>} @@ -186,132 +189,177 @@ class TypesInterpreter[S[_], X](using .as(true) } - override def resolveField(rootT: Type, op: IntoField[S]): State[X, Option[PropertyRaw]] = { + override def resolveIntoField( + op: IntoField[S], + rootT: Type + ): State[X, Option[IntoFieldRes]] = { rootT match { case nt: NamedType => - nt.fields(op.value) - .fold( + nt.fields(op.value) match { + case Some(t) => + locations + .pointFieldLocation(nt.name, op.value, op) + .as(Some(IntoFieldRes.Field(t))) + case None => + val fields = nt.fields.keys.map(k => s"`$k`").toList.mkString(", ") report .error( op, - s"Field `${op.value}` not found in type `${nt.name}`, available: ${nt.fields.toNel.toList.map(_._1).mkString(", ")}" + s"Field `${op.value}` not found in type `${nt.name}`, available: $fields" ) .as(None) - ) { t => - locations.pointFieldLocation(nt.name, op.value, op).as(Some(IntoFieldRaw(op.value, t))) - } + } case t => t.properties - .get(op.value) - .fold( + .get(op.value) match { + case Some(t) => + State.pure(Some(IntoFieldRes.Property(t))) + case None => report .error( op, - s"Expected data type to resolve a field '${op.value}' or a type with this property. Got: $rootT" + s"Property `${op.value}` not found in type `$t`" ) .as(None) - )(t => State.pure(Some(FunctorRaw(op.value, t)))) - + } } } - override def resolveArrow( - rootT: Type, + override def resolveIntoArrow( op: IntoArrow[S], - arguments: List[ValueRaw] - ): State[X, Option[PropertyRaw]] = { + rootT: Type, + types: List[Type] + ): State[X, Option[ArrowType]] = { + /* Safeguard to check condition on arguments */ + if (op.arguments.length != types.length) + internalError(s"Invalid arguments, lists do not match: ${op.arguments} and $types") + + val opName = op.name.value + rootT match { case ab: GeneralAbilityType => - val name = ab.name - val fields = ab.fields - lazy val fieldNames = fields.toNel.toList.map(_._1).mkString(", ") - fields(op.name.value) - .fold( - report - .error( - op, - s"Arrow `${op.name.value}` not found in type `$name`, " + - s"available: $fieldNames" - ) - .as(None) - ) { - case at @ ArrowType(_, _) => - locations - .pointFieldLocation(name, op.name.value, op) - .as(Some(IntoArrowRaw(op.name.value, at, arguments))) - case _ => + val abName = ab.fullName + + ab.fields.lookup(opName) match { + case Some(at: ArrowType) => + val reportNotEnoughArguments = + /* Report at position of arrow application */ report .error( op, - s"Unexpected. `${op.name.value}` must be an arrow." + s"Not enough arguments for arrow `$opName` in `$abName`, " + + s"expected: ${at.domain.length}, given: ${op.arguments.length}" ) - .as(None) - } - case t => - t.properties - .get(op.name.value) - .fold( - report - .error( - op, - s"Expected type to resolve an arrow '${op.name.value}' or a type with this property. Got: $rootT" - ) - .as(None) - )(t => State.pure(Some(FunctorRaw(op.name.value, t)))) + .whenA(op.arguments.length < at.domain.length) + val reportTooManyArguments = + /* Report once at position of the first extra argument */ + op.arguments.drop(at.domain.length).headOption.traverse_ { arg => + report + .error( + arg, + s"Too many arguments for arrow `$opName` in `$abName`, " + + s"expected: ${at.domain.length}, given: ${op.arguments.length}" + ) + } + val checkArgumentTypes = + op.arguments + .zip(types) + .zip(at.domain.toList) + .forallM { case ((arg, argType), expectedType) => + ensureTypeMatches(arg, expectedType, argType) + } + locations.pointFieldLocation(abName, opName, op) *> + reportNotEnoughArguments *> + reportTooManyArguments *> + checkArgumentTypes.map(typesMatch => + Option.when( + typesMatch && at.domain.length == op.arguments.length + )(at) + ) + + case Some(t) => + report + .error(op, s"Field `$opName` has non arrow type `$t` in `$abName`") + .as(None) + case None => + val available = ab.arrowFields.keys.map(k => s"`$k`").mkString(", ") + report + .error(op, s"Arrow `$opName` not found in `$abName`, available: $available") + .as(None) + } + case t => + /* NOTE: Arrows are only supported on services and abilities, + (`.copy(...)` for structs is resolved by separate method) */ + report + .error(op, s"Arrow `$opName` not found in `$t`") + .as(None) } } - // TODO actually it's stateless, exists there just for reporting needs - override def resolveCopy( - token: IntoCopy[S], + override def resolveIntoCopy( + op: IntoCopy[S], rootT: Type, - args: NonEmptyList[(NamedArg[S], ValueRaw)] - ): State[X, Option[PropertyRaw]] = + types: NonEmptyList[Type] + ): State[X, Option[StructType]] = { + if (op.args.length != types.length) + internalError(s"Invalid arguments, lists do not match: ${op.args} and $types") + rootT match { case st: StructType => - args.forallM { case (arg, value) => - val fieldName = arg.argName.value - st.fields.lookup(fieldName) match { - case Some(t) => - ensureTypeMatches(arg.argValue, t, value.`type`) - case None => - report.error(arg.argName, s"No field with name '$fieldName' in $rootT").as(false) + op.args + .zip(types) + .forallM { case (arg, argType) => + val fieldName = arg.argName.value + st.fields.lookup(fieldName) match { + case Some(fieldType) => + ensureTypeMatches(arg.argValue, fieldType, argType) + case None => + report + .error( + arg.argName, + s"No field with name '$fieldName' in `$st`" + ) + .as(false) + } } - }.map( - Option.when(_)( - IntoCopyRaw( - st, - args.map { case (arg, value) => - arg.argName.value -> value - }.toNem - ) + .map(Option.when(_)(st)) + case t => + report + .error( + op, + s"Non data type `$t` does not support `.copy`" ) - ) - - case _ => - report.error(token, s"Expected $rootT to be a data type").as(None) + .as(None) } + } - // TODO actually it's stateless, exists there just for reporting needs - override def resolveIndex( - rootT: Type, + override def resolveIntoIndex( op: IntoIndex[S], - idx: ValueRaw - ): State[X, Option[PropertyRaw]] = - if (!ScalarType.i64.acceptsValueOf(idx.`type`)) - report.error(op, s"Expected numeric index, got $idx").as(None) - else - rootT match { - case ot: OptionType => - op.idx.fold( - State.pure(Some(IntoIndexRaw(idx, ot.element))) - )(v => report.error(v, s"Options might have only one element, use ! to get it").as(None)) - case rt: CollectionType => - State.pure(Some(IntoIndexRaw(idx, rt.element))) - case _ => - report.error(op, s"Expected $rootT to be a collection type").as(None) - } + rootT: Type, + idxType: Type + ): State[X, Option[DataType]] = + ensureTypeOneOf( + op.idx.getOrElse(op), + ScalarType.integer, + idxType + ) *> (rootT match { + case ot: OptionType => + op.idx.fold(State.pure(Some(ot.element)))(v => + // TODO: Is this a right place to report this error? + // It is not a type error, but rather a syntax error + report.error(v, s"Options might have only one element, use ! to get it").as(None) + ) + case rt: CollectionType => + State.pure(Some(rt.element)) + case t => + report + .error( + op, + s"Non collection type `$t` does not support indexing" + ) + .as(None) + }) override def ensureValuesComparable( token: Token[S], @@ -415,6 +463,47 @@ class TypesInterpreter[S[_], X](using } } + override def ensureTypeConstructibleFrom( + token: Token[S], + expected: AbilityType | StructType, + arguments: NonEmptyMap[String, (NamedArg[S], Type)] + ): State[X, Boolean] = for { + /* Check that required fields are present + among arguments and have correct types */ + enough <- expected.fields.toNel.forallM { case (name, typ) => + arguments.lookup(name) match { + case Some(arg -> givenType) => + ensureTypeMatches(arg.argValue, typ, givenType) + case None => + report + .error( + token, + s"Missing argument '$name' of type '$typ'" + ) + .as(false) + } + } + expectedKeys = expected.fields.keys.toNonEmptyList + /* Report unexpected arguments */ + _ <- arguments.toNel.traverse_ { case (name, arg -> typ) => + expected.fields.lookup(name) match { + case Some(_) => State.pure(()) + case None => + lazy val similar = Levenshtein + .mostSimilar(name, expectedKeys, 3) + .map(s => s"'$s'") + .mkString(", ") + val message = + if (enough) + s"Unexpected argument '$name'" + else + s"Unexpected argument '$name', did you mean $similar?" + + report.warning(arg.argName, message) + } + } + } yield enough + private def typeTo[T <: Type]( token: Token[S], givenType: Type, diff --git a/semantics/src/test/scala/aqua/semantics/HeaderSpec.scala b/semantics/src/test/scala/aqua/semantics/HeaderSpec.scala index fa89dc54..35f1995b 100644 --- a/semantics/src/test/scala/aqua/semantics/HeaderSpec.scala +++ b/semantics/src/test/scala/aqua/semantics/HeaderSpec.scala @@ -1,6 +1,8 @@ package aqua.semantics +import aqua.parser.Ast import aqua.parser.head.{ExportExpr, FromExpr, HeaderExpr, ModuleExpr} +import aqua.parser.lexer.Token import aqua.parser.lexer.{Ability, Name} import aqua.raw.RawContext import aqua.raw.arrow.{ArrowRaw, FuncRaw} @@ -11,8 +13,8 @@ import aqua.types.{AbilityType, ArrowType, NilType, ProductType, ScalarType} import cats.data.{Chain, NonEmptyList, NonEmptyMap, Validated} import cats.free.Cofree -import cats.{Eval, Id, Monoid} import cats.syntax.applicative.* +import cats.{Eval, Id, Monoid} import org.scalatest.Inside import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers @@ -23,26 +25,25 @@ class HeaderSpec extends AnyFlatSpec with Matchers with Inside { val handler = new HeaderHandler[Id, RawContext]() - def exportHeader(funcName: String): Cofree[Chain, HeaderExpr[Id]] = { + def exportHeader(funcName: String): Ast.Head[Id] = { val exp: FromExpr.NameOrAbAs[Id] = Left((Name(funcName), None)) /** * aqua TestModule * export */ - Cofree( - ModuleExpr( - name = Ability[Id]("TestModule"), - declareAll = None, - declareNames = Nil, - declareCustom = Nil - ), + Ast.Head( + Token.lift(()), Chain( - Cofree( - ExportExpr(NonEmptyList.of(exp)), - Chain.empty.pure - ) - ).pure + ModuleExpr( + word = ModuleExpr.Word[Id](Id(ModuleExpr.Word.Kind.Aqua)), + name = Ability[Id]("TestModule"), + declareAll = None, + declareNames = Nil, + declareCustom = Nil + ), + ExportExpr(NonEmptyList.of(exp)) + ) ) } diff --git a/semantics/src/test/scala/aqua/semantics/SemanticsSpec.scala b/semantics/src/test/scala/aqua/semantics/SemanticsSpec.scala index 2da479bb..257164d9 100644 --- a/semantics/src/test/scala/aqua/semantics/SemanticsSpec.scala +++ b/semantics/src/test/scala/aqua/semantics/SemanticsSpec.scala @@ -33,6 +33,9 @@ class SemanticsSpec extends AnyFlatSpec with Matchers with Inside { val semantics = new RawSemantics[Span.S]() + private def addAqua(script: String) = + if (script.startsWith("aqua")) script else "aqua Test\n" + script + def insideResult(script: String)( test: PartialFunction[ ( @@ -41,7 +44,7 @@ class SemanticsSpec extends AnyFlatSpec with Matchers with Inside { ), Any ] - ): Unit = inside(parser(script)) { case Validated.Valid(ast) => + ): Unit = inside(parser(addAqua(script))) { case Validated.Valid(ast) => val init = RawContext.blank.copy( parts = Chain .fromSeq(ConstantRaw.defaultConstants()) @@ -60,7 +63,7 @@ class SemanticsSpec extends AnyFlatSpec with Matchers with Inside { } def insideSemErrors(script: String)(test: NonEmptyChain[SemanticError[Span.S]] => Any): Unit = - inside(parser(script)) { case Validated.Valid(ast) => + inside(parser(addAqua(script))) { case Validated.Valid(ast) => val init = RawContext.blank inside(semantics.process(ast, init).value.value) { case Left(errors) => test(errors) @@ -607,7 +610,7 @@ class SemanticsSpec extends AnyFlatSpec with Matchers with Inside { |""".stripMargin insideBody(script) { body => - matchSubtree(body) { case (ForTag("p", _, ForTag.Mode.Blocking), forTag) => + matchSubtree(body) { case (ForTag("p", _, ForTag.Mode.ParMode), forTag) => matchChildren(forTag) { case (ParTag, parTag) => matchChildren(parTag)( { case (OnTag(_, _, strat), _) => @@ -620,6 +623,30 @@ class SemanticsSpec extends AnyFlatSpec with Matchers with Inside { } } + it should "generate right model for `for ... rec`" in { + val script = """ + |func test(): + | stream: *i32 + | for i <- stream rec: + | stream <<- i + |""".stripMargin + + insideBody(script) { body => + matchSubtree(body) { case (ForTag("i", stream, ForTag.Mode.RecMode), forTag) => + stream.`type` shouldBe StreamType(ScalarType.i32) + matchChildren(forTag) { case (ParTag, parTag) => + matchChildren(parTag)( + { case (PushToStreamTag(VarRaw(varName, _), Call.Export(streamName, _)), _) => + varName shouldBe "i" + streamName shouldBe "stream" + }, + { case (NextTag("i"), _) => } + ) + } + } + } + } + it should "forbid abilities or streams in struct fields" in { val scriptAbility = """ diff --git a/semantics/src/test/scala/aqua/semantics/ValuesAlgebraSpec.scala b/semantics/src/test/scala/aqua/semantics/ValuesAlgebraSpec.scala index 5fce10b0..85ce9a14 100644 --- a/semantics/src/test/scala/aqua/semantics/ValuesAlgebraSpec.scala +++ b/semantics/src/test/scala/aqua/semantics/ValuesAlgebraSpec.scala @@ -65,12 +65,30 @@ class ValuesAlgebraSpec extends AnyFlatSpec with Matchers with Inside { def stream(values: ValueToken[Id]*): CollectionToken[Id] = CollectionToken[Id](CollectionToken.Mode.StreamMode, values.toList) + def serviceCall( + srv: String, + method: String, + args: List[ValueToken[Id]] = Nil + ): PropertyToken[Id] = + PropertyToken( + variable(srv), + NonEmptyList.of( + IntoArrow( + Name[Id](method), + args + ) + ) + ) + def allPairs[A](list: List[A]): List[(A, A)] = for { a <- list b <- list } yield (a, b) - def genState(vars: Map[String, Type] = Map.empty) = { + def genState( + vars: Map[String, Type] = Map.empty, + types: Map[String, Type] = Map.empty + ) = { val init = RawContext.blank.copy( parts = Chain .fromSeq(ConstantRaw.defaultConstants()) @@ -88,6 +106,10 @@ class ValuesAlgebraSpec extends AnyFlatSpec with Matchers with Inside { ) :: _ ) ) + .focus(_.types) + .modify(types.foldLeft(_) { case (st, (name, t)) => + st.defineType(NamedTypeToken(name), t) + }) } def valueOfType(t: Type)( @@ -626,4 +648,72 @@ class ValuesAlgebraSpec extends AnyFlatSpec with Matchers with Inside { value.`type` shouldBe OptionType(BottomType) } } + + it should "type check service calls" in { + val srvName = "TestSrv" + val methodName = "testMethod" + val methodType = ArrowType( + ProductType(ScalarType.i8 :: ScalarType.string :: Nil), + ProductType(Nil) + ) + + def test(args: List[ValueToken[Id]], vars: Map[String, Type] = Map.empty) = { + val state = genState( + vars, + types = Map( + srvName -> ServiceType( + srvName, + NonEmptyMap.of( + methodName -> methodType + ) + ) + ) + ) + + val call = serviceCall(srvName, methodName, args) + + val alg = algebra() + val (st, res) = alg + .valueToRaw(call) + .run(state) + .value + + res shouldBe None + atLeast(1, st.errors.toList) shouldBe a[RulesViolated[Id]] + } + + // not enough arguments + // TestSrv.testMethod() + test(List.empty) + // TestSrv.testMethod(42) + test(literal("42", LiteralType.unsigned) :: Nil) + // TestSrv.testMethod(var) + test(variable("var") :: Nil, Map("var" -> ScalarType.i8)) + + // wrong argument type + // TestSrv.testMethod([42, var]) + test( + array(literal("42", LiteralType.unsigned), variable("var")) :: Nil, + Map("var" -> ScalarType.i8) + ) + // TestSrv.testMethod(42, var) + test( + literal("42", LiteralType.unsigned) :: variable("var") :: Nil, + Map("var" -> ScalarType.i64) + ) + // TestSrv.testMethod("test", var) + test( + literal("test", LiteralType.string) :: variable("var") :: Nil, + Map("var" -> ScalarType.string) + ) + + // too many arguments + // TestSrv.testMethod(42, "test", var) + test( + literal("42", LiteralType.unsigned) :: + literal("test", LiteralType.string) :: + variable("var") :: Nil, + Map("var" -> ScalarType.string) + ) + } } diff --git a/types/src/main/scala/aqua/types/Type.scala b/types/src/main/scala/aqua/types/Type.scala index 1ddd8058..25fd1199 100644 --- a/types/src/main/scala/aqua/types/Type.scala +++ b/types/src/main/scala/aqua/types/Type.scala @@ -370,6 +370,11 @@ sealed trait NamedType extends Type { def fields: NonEmptyMap[String, Type] + def arrowFields: Map[String, ArrowType] = + fields.toSortedMap.collect { case (name, at: ArrowType) => + name -> at + } + /** * Get all fields defined in this type and its fields of named type. * Paths to fields are returned **without** type name diff --git a/types/src/test/scala/aqua/types/IntersectTypesSpec.scala b/types/src/test/scala/aqua/types/IntersectTypesSpec.scala index 12470209..42b4ed8b 100644 --- a/types/src/test/scala/aqua/types/IntersectTypesSpec.scala +++ b/types/src/test/scala/aqua/types/IntersectTypesSpec.scala @@ -1,9 +1,9 @@ package aqua.types -import org.scalatest.flatspec.AnyFlatSpec -import org.scalatest.matchers.should.Matchers import cats.data.NonEmptyMap import cats.syntax.partialOrder._ +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should.Matchers class IntersectTypesSpec extends AnyFlatSpec with Matchers { diff --git a/types/src/test/scala/aqua/types/UniteTypesSpec.scala b/types/src/test/scala/aqua/types/UniteTypesSpec.scala index de367f57..9db2906f 100644 --- a/types/src/test/scala/aqua/types/UniteTypesSpec.scala +++ b/types/src/test/scala/aqua/types/UniteTypesSpec.scala @@ -1,8 +1,8 @@ package aqua.types +import cats.syntax.partialOrder._ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers -import cats.syntax.partialOrder._ class UniteTypesSpec extends AnyFlatSpec with Matchers { diff --git a/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala b/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala index 36c29a62..62cacf1b 100644 --- a/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala +++ b/utils/logging/src/main/scala/aqua/logging/LogFormatter.scala @@ -6,10 +6,10 @@ import scribe.{Level, Logger} object LogFormatter { val formatter: Formatter = - formatter"$date ${string("[")}$levelColored${string("]")} $messages$mdc" + formatter"$date $timeStamp ${string("[")}$levelColored${string("]")} $messages$mdc" val formatterWithFilename: Formatter = - formatter"$date $fileName ${string("[")}$levelColored${string("]")} $messages$mdc" + formatter"$date $timeStamp $fileName ${string("[")}$levelColored${string("]")} $messages$mdc" def initLogger(level: Option[Level]): Logger = { scribe.Logger.root diff --git a/utils/mangler/src/main/scala/aqua/mangler/ManglerState.scala b/utils/mangler/src/main/scala/aqua/mangler/ManglerState.scala new file mode 100644 index 00000000..2cad6086 --- /dev/null +++ b/utils/mangler/src/main/scala/aqua/mangler/ManglerState.scala @@ -0,0 +1,65 @@ +package aqua.mangler + +import cats.Monoid + +import scala.annotation.tailrec + +case class ManglerState(namesNumbers: Map[String, Int] = Map.empty) { + + private def genName(name: String, n: Int) = + s"$name-$n" + + // find unique names that have not yet been used + def findNewNames(introduce: Set[String]): (ManglerState, Map[String, String]) = { + introduce.foldLeft(this, Map.empty[String, String]) { + case ((state, newNames), name) => + val namesNumbers = state.namesNumbers + if (!namesNumbers.contains(name)) { + val newState = state.copy( + namesNumbers = namesNumbers + .updated(name, 0) + ) + + (newState, newNames) + } else { + val (newNumber, newName) = LazyList + .from(namesNumbers.getOrElse(name, 0)) + .map(n => n -> genName(name, n)) + .dropWhile { case (_, newName) => + namesNumbers.contains(newName) + } + .head + val newState = copy( + namesNumbers = namesNumbers + .updated(name, newNumber + 1) + .updated(newName, 0) + ) + + (newState, newNames + (name -> newName)) + } + } + } + + // add names to used list + def forbid(names: Set[String]): ManglerState = { + val newLastNumbers = names.map(n => n -> namesNumbers.getOrElse(n, 0)).toMap + copy(namesNumbers = newLastNumbers ++ namesNumbers) + } + + // forbid name and return unique + def forbidAndRename(name: String): (ManglerState, String) = { + val set = Set(name) + val (newState, newNames) = forbid(set).findNewNames(set) + (newState, newNames(name)) + } +} + +object ManglerState { + + given Monoid[ManglerState] with { + override val empty: ManglerState = ManglerState() + + override def combine(x: ManglerState, y: ManglerState): ManglerState = + ManglerState(namesNumbers = x.namesNumbers ++ y.namesNumbers) + } +}