From 590febed64fd56a2991fc9ca3b4cc5ac111a0bbf Mon Sep 17 00:00:00 2001 From: Gabriel Pizarro Date: Mon, 6 Dec 2021 19:46:38 -0800 Subject: [PATCH] =?UTF-8?q?Many=20Javascript=20bug=20fixes=20=F0=9F=AA=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- brac-kt-api/build.gradle.kts | 16 + .../brackt/api/quantum/QuantumCircuit.kt | 7 + .../brackt/api/quantum/QuantumMacro.kt | 5 + .../brackt/api/util/assertions/Assertions.kt | 7 + .../javaman/brackt/api/util/logging/Logger.kt | 8 +- brac-kt-ibmq-provider/build.gradle.kts | 16 + .../brackt/providers/ibmq/IbmqProvider.kt | 8 +- .../brackt/providers/ibmq/api/IbmqApi.kt | 4 + .../providers/ibmq/api/models/ApiToken.kt | 4 + .../providers/ibmq/api/models/Backends.kt | 7 + .../providers/ibmq/api/models/Common.kt | 8 + .../brackt/providers/ibmq/api/models/Job.kt | 10 + .../brackt/providers/ibmq/api/models/Jobs.kt | 9 + .../providers/ibmq/api/models/JobsLimit.kt | 5 +- .../providers/ibmq/api/models/Lastest.kt | 5 +- .../ibmq/api/models/LogInWithToken.kt | 6 + .../providers/ibmq/api/models/Networks.kt | 9 + .../providers/ibmq/api/models/Result.kt | 12 + .../ibmq/api/models/ResultDownloadUrl.kt | 4 + .../ibmq/api/models/RunExperiment.kt | 19 +- .../ibmq/transpiler/QasmTranspiler.kt | 5 + .../brackt/providers/ibmq/IbmqProvider.kt | 81 + .../brackt/providers/ibmq/api/IbmqApi.kt | 58 + .../brackt/providers/ibmq/IbmqProvider.kt | 80 + .../brackt/providers/ibmq/api/IbmqApi.kt | 52 + build.gradle.kts | 2 +- example-js-typescript/package-lock.json | 1588 +++++++++++++++++ example-js-typescript/package.json | 20 + example-js-typescript/src/app.ts | 10 + example-js-typescript/tsconfig.json | 109 ++ example-jvm-java/build.gradle.kts | 11 - .../src/main/java/Application.java | 16 +- .../src/main/kotlin/BracKtIntegration.kt | 27 - src/extension.ts | 26 + src/test/runTest.ts | 23 + src/test/suite/extension.test.ts | 15 + src/test/suite/index.ts | 38 + 38 files changed, 2278 insertions(+), 55 deletions(-) create mode 100644 brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt create mode 100644 brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt create mode 100644 brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt create mode 100644 brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt create mode 100644 example-js-typescript/package-lock.json create mode 100644 example-js-typescript/package.json create mode 100644 example-js-typescript/src/app.ts create mode 100644 example-js-typescript/tsconfig.json delete mode 100644 example-jvm-java/src/main/kotlin/BracKtIntegration.kt create mode 100644 src/extension.ts create mode 100644 src/test/runTest.ts create mode 100644 src/test/suite/extension.test.ts create mode 100644 src/test/suite/index.ts diff --git a/.gitignore b/.gitignore index b173208..4cd1d86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .gradle/ .idea/ *.hprof - build/ */build/ +*/node_modules/ +*/dist/ diff --git a/brac-kt-api/build.gradle.kts b/brac-kt-api/build.gradle.kts index 5d17f6b..8a06964 100644 --- a/brac-kt-api/build.gradle.kts +++ b/brac-kt-api/build.gradle.kts @@ -27,6 +27,7 @@ kotlin { } } js(IR) { + moduleName = "brac-kt-api" browser { testTask { useKarma { @@ -39,6 +40,21 @@ kotlin { useMocha {} } } + compilations["main"].packageJson { + customField("name" to "@thenewjavaman/brac-kt-api") + customField("description" to "A Kotlin/Multiplatform interface for quantum computing") + customField("homepage" to "https://github.com/TheNewJavaman/brac-kt") + customField("author" to mapOf( + "name" to "Gabriel Pizarro", + "email" to "gpizarro@javaman.net", + "url" to "https://javaman.net" + )) + customField("repository" to mapOf( + "type" to "git", + "url" to "https://github.com/TheNewJavaman/brac-kt" + )) + customField("private" to false) + } binaries.executable() } sourceSets { diff --git a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumCircuit.kt b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumCircuit.kt index c1df46c..9dd23b8 100644 --- a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumCircuit.kt +++ b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumCircuit.kt @@ -1,6 +1,11 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.api.quantum import net.javaman.brackt.api.util.assertions.assert +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +import kotlin.js.JsName import kotlin.jvm.JvmOverloads /** @@ -25,6 +30,7 @@ import kotlin.jvm.JvmOverloads * ``` */ @Suppress("TooManyFunctions") // Needs all QuantumGates +@JsExport class QuantumCircuit @JvmOverloads constructor( val name: String? = null, val numQubits: Int, @@ -33,6 +39,7 @@ class QuantumCircuit @JvmOverloads constructor( //private val bits: List = List(numBits) { Bit(it) }, val circuit: MutableList = mutableListOf() ) { + @JsName("QuantumCircuitCompose") constructor( name: String? = null, numQubits: Int, diff --git a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumMacro.kt b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumMacro.kt index c64cc97..b4e8df9 100644 --- a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumMacro.kt +++ b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/quantum/QuantumMacro.kt @@ -1,6 +1,10 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.api.quantum import net.javaman.brackt.api.util.assertions.assert +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport import kotlin.jvm.JvmStatic /** @@ -19,6 +23,7 @@ import kotlin.jvm.JvmStatic * } * ``` */ +@JsExport class QuantumMacro(val numQubits: Int, val macro: QuantumCircuit.(qubitMap: QubitMap) -> Unit) { var safeMacro: QuantumCircuit.(qubitMap: QubitMap) -> Unit diff --git a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/assertions/Assertions.kt b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/assertions/Assertions.kt index 87576e6..1773c59 100644 --- a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/assertions/Assertions.kt +++ b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/assertions/Assertions.kt @@ -1,10 +1,17 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.api.util.assertions +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport + /** * Assert conditions in pure Kotlin and a clean syntax */ +@JsExport fun assert(block: () -> Boolean) { if (!block()) throw AssertionException("Assertion failed") } +@JsExport class AssertionException(message: String) : Exception(message) diff --git a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/logging/Logger.kt b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/logging/Logger.kt index 4e290bd..364d318 100644 --- a/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/logging/Logger.kt +++ b/brac-kt-api/src/commonMain/kotlin/net/javaman/brackt/api/util/logging/Logger.kt @@ -1,3 +1,5 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.api.util.logging import kotlinx.datetime.Clock @@ -5,12 +7,16 @@ import net.javaman.brackt.api.util.formatters.PadDirection import net.javaman.brackt.api.util.formatters.pretty import net.javaman.brackt.api.util.formatters.withLength import net.javaman.brackt.api.util.reflection.getPlatformQualifiedName +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +import kotlin.js.JsName import kotlin.jvm.JvmStatic import kotlin.reflect.KClass /** * Prints well-formatted messages to the console using pure Kotlin and a clean syntax. Useful for multiplatform projects */ +@JsExport class Logger(val className: String) { companion object { @JvmStatic @@ -22,7 +28,7 @@ class Logger(val className: String) { val LEVEL_CHARS = LoggingLevel.values().maxOf { it.name.length } } - constructor(kClass: KClass<*>) : this(kClass.getPlatformQualifiedName()) + @JsName("LoggerByClass") constructor(kClass: KClass<*>) : this(kClass.getPlatformQualifiedName()) fun log(level: LoggingLevel, block: () -> Any) { if (acceptableLevel.severity <= level.severity) { diff --git a/brac-kt-ibmq-provider/build.gradle.kts b/brac-kt-ibmq-provider/build.gradle.kts index 045e769..d42781b 100644 --- a/brac-kt-ibmq-provider/build.gradle.kts +++ b/brac-kt-ibmq-provider/build.gradle.kts @@ -29,6 +29,7 @@ kotlin { } } js(IR) { + moduleName = "brac-kt-ibmq-provider" browser { testTask { useKarma { @@ -41,6 +42,21 @@ kotlin { useMocha {} } } + compilations["main"].packageJson { + customField("name" to "@thenewjavaman/brac-kt-ibmq-provider") + customField("description" to "A Kotlin/Multiplatform interface for quantum computing") + customField("homepage" to "https://github.com/TheNewJavaman/brac-kt") + customField("author" to mapOf( + "name" to "Gabriel Pizarro", + "email" to "gpizarro@javaman.net", + "url" to "https://javaman.net" + )) + customField("repository" to mapOf( + "type" to "git", + "url" to "https://github.com/TheNewJavaman/brac-kt" + )) + customField("private" to false) + } binaries.executable() } sourceSets { diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt index f5ea225..2fcfc85 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt @@ -1,3 +1,5 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq import io.ktor.client.request.get @@ -30,6 +32,8 @@ import net.javaman.brackt.providers.ibmq.api.models.RunExperimentResponse import net.javaman.brackt.providers.ibmq.api.models.VersionsRequest import net.javaman.brackt.providers.ibmq.api.models.VersionsResponse import net.javaman.brackt.providers.ibmq.transpiler.toQasm +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport import kotlin.js.JsName import kotlin.jvm.JvmStatic import kotlin.time.Duration @@ -60,7 +64,7 @@ class IbmqProvider { @OptIn(ExperimentalTime::class) @JvmStatic - private val JOB_TIMEOUT_DURATION = 5.minutes + val JOB_TIMEOUT_DURATION = 5.minutes @OptIn(ExperimentalTime::class) @JvmStatic @@ -303,6 +307,8 @@ class IbmqProvider { } } +@JsExport class DeviceNotAvailableException(message: String) : Exception(message) +@JsExport class JobTimeoutException(message: String) : Exception(message) diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt index c55852c..f29a397 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt @@ -1,3 +1,5 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api import io.ktor.client.request.get @@ -25,6 +27,8 @@ import net.javaman.brackt.providers.ibmq.api.models.RunExperimentRequest import net.javaman.brackt.providers.ibmq.api.models.RunExperimentResponse import net.javaman.brackt.providers.ibmq.api.models.VersionsRequest import net.javaman.brackt.providers.ibmq.api.models.VersionsResponse +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport /** * An HTTP client for [IBM Quantum](https://quantum-computing.ibm.com/) diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ApiToken.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ApiToken.kt index c8c0a2a..70adcca 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ApiToken.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ApiToken.kt @@ -1,10 +1,14 @@ @file:Suppress("MatchingDeclarationName") // Keep the naming convention of the package +@file:OptIn(ExperimentalJsExport::class) package net.javaman.brackt.providers.ibmq.api.models import kotlinx.datetime.Instant import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class ApiTokenResponse( val apiToken: String, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Backends.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Backends.kt index b208e46..195ee3c 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Backends.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Backends.kt @@ -1,9 +1,14 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport typealias BackendsResponse = List +@JsExport @Serializable data class BackendResponse( val hasAccess: Boolean, @@ -25,6 +30,7 @@ data class BackendResponse( val category: String? = null ) +@JsExport @Serializable data class BackendProcessorType( val family: String, @@ -33,6 +39,7 @@ data class BackendProcessorType( val segment: String? = null ) +@JsExport @Serializable data class BackendDeviceStatus( val state: Boolean, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Common.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Common.kt index 1d702d7..3f7187a 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Common.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Common.kt @@ -1,10 +1,15 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models import kotlinx.datetime.Clock import kotlinx.datetime.Instant import kotlinx.serialization.Required import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class Code( @Required @@ -36,12 +41,14 @@ enum class QasmVersion { QASM2 } +@JsExport @Serializable data class Backend( val id: String? = null, val name: String ) +@JsExport @Serializable data class HubInfo( val hub: HubInfoName, @@ -49,6 +56,7 @@ data class HubInfo( val project: HubInfoName ) +@JsExport @Serializable data class HubInfoName( val name: String diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Job.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Job.kt index bb55fd1..b6038be 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Job.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Job.kt @@ -1,9 +1,14 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models import kotlinx.datetime.Instant import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class JobResponse( val kind: String? = null, @@ -28,6 +33,7 @@ data class JobResponse( val clientInfo: JobClientInfo ) +@JsExport @Serializable data class JobSummaryData( val size: JobSummaryDataSize, @@ -36,12 +42,14 @@ data class JobSummaryData( val resultTime: Double? = null ) +@JsExport @Serializable data class JobSummaryDataSize( val input: Int, val output: Int? = null ) +@JsExport @Serializable data class JobSummaryDataSummary( @SerialName("qobj_config") @@ -56,6 +64,7 @@ data class JobSummaryDataSummary( val maxQubitsUsed: Int ) +@JsExport @Serializable data class JobSummaryDataSummaryQobjConfig( @SerialName("n_qubits") @@ -67,6 +76,7 @@ data class JobSummaryDataSummaryQobjConfig( val cost: Double ) +@JsExport @Serializable data class JobClientInfo( val name: String diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Jobs.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Jobs.kt index c248fc4..8854cf8 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Jobs.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Jobs.kt @@ -1,14 +1,20 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models import kotlinx.datetime.Instant import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class JobsResponse( val meta: JobsMeta, val items: List ) +@JsExport @Serializable data class JobsMeta( val skip: Int, @@ -16,6 +22,7 @@ data class JobsMeta( val count: Int ) +@JsExport @Serializable data class JobsItem( val id: String, @@ -33,6 +40,7 @@ data class JobsItem( val infoQueue: JobsItemInfoQueue? = null ) +@JsExport @Serializable data class JobsItemProvider( val hub: String, @@ -41,6 +49,7 @@ data class JobsItemProvider( val backend: String ) +@JsExport @Serializable data class JobsItemInfoQueue( val status: String, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/JobsLimit.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/JobsLimit.kt index f7a97a7..122cca2 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/JobsLimit.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/JobsLimit.kt @@ -1,10 +1,13 @@ @file:Suppress("MatchingDeclarationName") // Keep the naming convention of the package +@file:OptIn(ExperimentalJsExport::class) package net.javaman.brackt.providers.ibmq.api.models import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport -@Suppress("MatchingDeclarationName") // Keep the naming convention of the package +@JsExport @Serializable data class JobsLimitResponse( val maximumJobs: Int, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Lastest.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Lastest.kt index f9f2858..5cd79e9 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Lastest.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Lastest.kt @@ -1,10 +1,13 @@ @file:Suppress("MatchingDeclarationName") // Keep the naming convention of the package +@file:OptIn(ExperimentalJsExport::class) package net.javaman.brackt.providers.ibmq.api.models import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport -@Suppress("MatchingDeclarationName") // Keep the naming convention of the package +@JsExport @Serializable data class LastestResponse( val total: Int, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/LogInWithToken.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/LogInWithToken.kt index d6b8c2b..5eb4076 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/LogInWithToken.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/LogInWithToken.kt @@ -1,13 +1,19 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models import kotlinx.datetime.Instant import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class LogInWithTokenRequest( val apiToken: String ) +@JsExport @Serializable data class LogInWithTokenResponse( val id: String, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Networks.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Networks.kt index 802dff5..b4aebe0 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Networks.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Networks.kt @@ -1,3 +1,5 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models import kotlinx.datetime.Instant @@ -5,9 +7,12 @@ import kotlinx.serialization.Contextual import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonElement +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport typealias NetworksResponse = List +@JsExport @Serializable data class NetworkHub( val name: String, @@ -28,6 +33,7 @@ data class NetworkHub( val groups: Map, ) +@JsExport @Serializable data class NetworkGroup( val name: String, @@ -39,6 +45,7 @@ data class NetworkGroup( val projects: Map ) +@JsExport @Serializable data class NetworkProject( val name: String, @@ -51,6 +58,7 @@ data class NetworkProject( val users: Map ) +@JsExport @Serializable data class NetworkDevice( val priority: Int, @@ -60,6 +68,7 @@ data class NetworkDevice( val configuration: NetworkDeviceConfiguration? = null ) +@JsExport @Serializable data class NetworkDeviceConfiguration( val limit: Int? = null, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Result.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Result.kt index 9d349fc..9828aab 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Result.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/Result.kt @@ -1,9 +1,14 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonArray +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class ResultResponse( @SerialName("backend_name") @@ -24,6 +29,7 @@ data class ResultResponse( val timeTaken: Double ) +@JsExport @Serializable data class ResultHeader( @SerialName("backend_name") @@ -32,6 +38,7 @@ data class ResultHeader( val backendVersion: String, ) +@JsExport @Serializable data class ResultMetadata( @SerialName("max_gpu_memory_mb") @@ -50,6 +57,7 @@ data class ResultMetadata( val timeTaken: Double ) +@JsExport @Serializable data class ResultResult( val data: ResultResultData, @@ -64,6 +72,7 @@ data class ResultResult( val timeTaken: Double ) +@JsExport @Serializable data class ResultResultData( val counts: Map @@ -76,6 +85,7 @@ data class ResultResultData( } } +@JsExport @Serializable data class ResultResultHeader( @SerialName("clbit_labels") @@ -96,6 +106,7 @@ data class ResultResultHeader( val qubitLabels: List ) +@JsExport @Serializable data class ResultResultMetadata( @SerialName("active_input_qubits") @@ -120,6 +131,7 @@ data class ResultResultMetadata( val remappedQubits: Boolean ) +@JsExport @Serializable data class ResultResultFusion( val enabled: Boolean diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ResultDownloadUrl.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ResultDownloadUrl.kt index b99b7e8..2166417 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ResultDownloadUrl.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/ResultDownloadUrl.kt @@ -1,9 +1,13 @@ @file:Suppress("MatchingDeclarationName") // Keep the naming convention of the package +@file:OptIn(ExperimentalJsExport::class) package net.javaman.brackt.providers.ibmq.api.models import kotlinx.serialization.Serializable +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class ResultDownloadUrlResponse( val url: String diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/RunExperiment.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/RunExperiment.kt index 281f04d..28283ea 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/RunExperiment.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/api/models/RunExperiment.kt @@ -1,19 +1,14 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.api.models -import kotlinx.datetime.Clock import kotlinx.datetime.Instant import kotlinx.serialization.Required import kotlinx.serialization.Serializable -import net.javaman.brackt.api.util.formatters.decodedUrl -import net.javaman.brackt.api.util.injections.injection -import net.javaman.brackt.api.util.logging.Logger -import net.javaman.brackt.providers.ibmq.IbmqProvider -import net.javaman.brackt.providers.ibmq.JobTimeoutException -import kotlin.time.Duration -import kotlin.time.Duration.Companion.milliseconds -import kotlin.time.Duration.Companion.minutes -import kotlin.time.ExperimentalTime +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport +@JsExport @Serializable data class RunExperimentRequest( val qasms: List, @@ -27,16 +22,19 @@ data class RunExperimentRequest( val tags: List = emptyList() ) +@JsExport @Serializable data class RunExperimentQasm( val qasm: String ) +@JsExport @Serializable data class RunExperimentBackend( val name: String ) +@JsExport @Serializable data class RunExperimentResponse( val qasms: List, @@ -57,6 +55,7 @@ data class RunExperimentResponse( val userId: String ) +@JsExport @Serializable data class RunExperimentIp( val ip: String, diff --git a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/transpiler/QasmTranspiler.kt b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/transpiler/QasmTranspiler.kt index c412888..74da5d2 100644 --- a/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/transpiler/QasmTranspiler.kt +++ b/brac-kt-ibmq-provider/src/commonMain/kotlin/net/javaman/brackt/providers/ibmq/transpiler/QasmTranspiler.kt @@ -1,12 +1,17 @@ +@file:OptIn(ExperimentalJsExport::class) + package net.javaman.brackt.providers.ibmq.transpiler import net.javaman.brackt.api.quantum.QuantumCircuit import net.javaman.brackt.api.quantum.QuantumGate import net.javaman.brackt.api.quantum.QuantumMacro import net.javaman.brackt.api.quantum.QubitMap +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport import kotlin.math.max @Suppress("ComplexMethod") // The conditionals are simple, there are just a lot of them +@JsExport fun QuantumCircuit.toQasm(): String = (listOf( "OPENQASM 2.0", "include \"qelib1.inc\"", diff --git a/brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt b/brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt new file mode 100644 index 0000000..654f28c --- /dev/null +++ b/brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt @@ -0,0 +1,81 @@ +@file:OptIn(DelicateCoroutinesApi::class, ExperimentalJsExport::class) +@file:JsExport + +package net.javaman.brackt.providers.ibmq + +import kotlinx.coroutines.DelicateCoroutinesApi +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.promise +import net.javaman.brackt.api.quantum.QuantumCircuit +import net.javaman.brackt.providers.ibmq.api.models.BackendsResponse +import net.javaman.brackt.providers.ibmq.api.models.NetworksResponse +import net.javaman.brackt.providers.ibmq.api.models.NewRequest +import net.javaman.brackt.providers.ibmq.api.models.RunExperimentRequest +import net.javaman.brackt.providers.ibmq.api.models.VersionsRequest +import kotlin.time.Duration + +fun IbmqProvider.logInAsync(apiToken: String) = GlobalScope.promise { logIn(apiToken) } + +fun IbmqProvider.getApiTokenAsync() = GlobalScope.promise { getApiToken() } + +fun IbmqProvider.selectNetworkAsync() = GlobalScope.promise { selectNetwork() } + +@JsName("selectNetworkWithPickerAsync") +fun IbmqProvider.selectNetworkAsync( + picker: IbmqProvider.(NetworksResponse) -> Unit +) = GlobalScope.promise { selectNetwork(picker) } + +fun IbmqProvider.selectDeviceAsync( + simulator: Boolean = true, + minQubits: Int = 5 +) = GlobalScope.promise { selectDevice(simulator, minQubits) } + +@JsName("selectDeviceWithPickerAsync") +fun IbmqProvider.selectDeviceAsync( + picker: IbmqProvider.(BackendsResponse) -> Unit +) = GlobalScope.promise { selectDevice(picker) } + +fun IbmqProvider.getJobsAsync() = GlobalScope.promise { getJobs() } + +fun IbmqProvider.getJobsLimitAsync() = GlobalScope.promise { getJobsLimit() } + +@JsName("runExperimentWithRequestAsync") +fun IbmqProvider.runExperimentAsync(request: RunExperimentRequest) = GlobalScope.promise { runExperiment(request) } + +fun IbmqProvider.runExperimentAsync( + qc: QuantumCircuit, + shots: Int = 1024, + name: String = "" +) = GlobalScope.promise { runExperiment(qc, shots, name) } + +fun IbmqProvider.updateExperimentAsync( + codeId: String, + request: VersionsRequest +) = GlobalScope.promise { updateExperiment(codeId, request) } + +fun IbmqProvider.getExperimentAsync(codeId: String) = GlobalScope.promise { getExperiment(codeId) } + +fun IbmqProvider.getExperimentsAsync() = GlobalScope.promise { getExperiments() } + +fun IbmqProvider.newExperimentAsync(request: NewRequest) = GlobalScope.promise { newExperiment(request) } + +fun IbmqProvider.getRunAsync(jobId: String) = GlobalScope.promise { getRun(jobId) } + +fun IbmqProvider.getResultDownloadUrlAsync(jobId: String) = GlobalScope.promise { getResultDownloadUrl(jobId) } + +fun IbmqProvider.getResultAsync(url: String) = GlobalScope.promise { getResult(url) } + +fun IbmqProvider.andWaitAsync( + timeoutDuration: Duration = IbmqProvider.JOB_TIMEOUT_DURATION +) = GlobalScope.promise { andWait(timeoutDuration) } + +@JsName("runExperimentAndWaitWithRequestAsync") +fun IbmqProvider.runExperimentAndWaitAsync( + request: RunExperimentRequest, + timeoutDuration: Duration = IbmqProvider.JOB_TIMEOUT_DURATION +) = GlobalScope.promise { runExperimentAndWait(request, timeoutDuration) } + +fun IbmqProvider.runExperimentAndWaitAsync( + qc: QuantumCircuit, + timeoutDuration: Duration = IbmqProvider.JOB_TIMEOUT_DURATION +) = GlobalScope.promise { runExperimentAndWait(qc, timeoutDuration) } diff --git a/brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt b/brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt new file mode 100644 index 0000000..977ea7d --- /dev/null +++ b/brac-kt-ibmq-provider/src/jsMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt @@ -0,0 +1,58 @@ +@file:OptIn(DelicateCoroutinesApi::class, ExperimentalJsExport::class) +@file:JsExport + +package net.javaman.brackt.providers.ibmq.api + +import kotlinx.coroutines.DelicateCoroutinesApi +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.promise +import net.javaman.brackt.providers.ibmq.api.models.LogInWithTokenRequest +import net.javaman.brackt.providers.ibmq.api.models.NewRequest +import net.javaman.brackt.providers.ibmq.api.models.RunExperimentRequest +import net.javaman.brackt.providers.ibmq.api.models.VersionsRequest + +fun IbmqApi.logInWithTokenAsync(request: LogInWithTokenRequest) = GlobalScope.promise { logInWithToken(request) } + +fun IbmqApi.apiTokenAsync(accessToken: String, userId: String) = GlobalScope.promise { apiToken(accessToken, userId) } + +fun IbmqApi.networksAsync(accessToken: String) = GlobalScope.promise { networks(accessToken) } + +fun IbmqApi.backendsAsync(accessToken: String) = GlobalScope.promise { backends(accessToken) } + +fun IbmqApi.jobsAsync(accessToken: String) = GlobalScope.promise { jobs(accessToken) } + +fun IbmqApi.jobsLimitAsync( + accessToken: String, + network: String, + group: String, + project: String, + device: String +) = GlobalScope.promise { jobsLimit(accessToken, network, group, project, device) } + +fun IbmqApi.runExperimentAsync( + accessToken: String, + request: RunExperimentRequest, + network: String, + group: String, + project: String +) = GlobalScope.promise { runExperiment(accessToken, request, network, group, project) } + +fun IbmqApi.versionsAsync( + accessToken: String, + request: VersionsRequest, + code: String +) = GlobalScope.promise { versions(accessToken, request, code) } + +fun IbmqApi.latestAsync(accessToken: String, codeId: String) = GlobalScope.promise { latest(accessToken, codeId) } + +fun IbmqApi.lastestAsync(accessToken: String, userId: String) = GlobalScope.promise { lastest(accessToken, userId) } + +fun IbmqApi.newCodeAsync(accessToken: String, request: NewRequest) = + GlobalScope.promise { newCode(accessToken, request) } + +fun IbmqApi.jobAsync(accessToken: String, jobId: String) = GlobalScope.promise { job(accessToken, jobId) } + +fun IbmqApi.resultDownloadUrlAsync( + accessToken: String, + jobId: String +) = GlobalScope.promise { resultDownloadUrl(accessToken, jobId) } diff --git a/brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt b/brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt new file mode 100644 index 0000000..9c0bc4b --- /dev/null +++ b/brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/IbmqProvider.kt @@ -0,0 +1,80 @@ +package net.javaman.brackt.providers.ibmq + +import kotlinx.coroutines.runBlocking +import net.javaman.brackt.api.quantum.QuantumCircuit +import net.javaman.brackt.providers.ibmq.api.models.BackendsResponse +import net.javaman.brackt.providers.ibmq.api.models.NetworksResponse +import net.javaman.brackt.providers.ibmq.api.models.NewRequest +import net.javaman.brackt.providers.ibmq.api.models.RunExperimentRequest +import net.javaman.brackt.providers.ibmq.api.models.VersionsRequest +import kotlin.time.Duration + +fun IbmqProvider.logInSync(apiToken: String) = runBlocking { logIn(apiToken) } + +fun IbmqProvider.getApiTokenSync() = runBlocking { getApiToken() } + +fun IbmqProvider.selectNetworkSync() = runBlocking { selectNetwork() } + +fun IbmqProvider.selectNetworkSync( + picker: IbmqProvider.(NetworksResponse) -> Unit +) = runBlocking { selectNetwork(picker) } + +@JvmOverloads +fun IbmqProvider.selectDeviceSync( + simulator: Boolean = true, + minQubits: Int = 5 +) = runBlocking { selectDevice(simulator, minQubits) } + +fun IbmqProvider.selectDeviceSync( + picker: IbmqProvider.(BackendsResponse) -> Unit +) = runBlocking { selectDevice(picker) } + +fun IbmqProvider.getJobsSync() = runBlocking { getJobs() } + +fun IbmqProvider.getJobsLimitSync() = runBlocking { getJobsLimit() } + +fun IbmqProvider.runExperimentSync(request: RunExperimentRequest) = runBlocking { runExperiment(request) } + +@JvmOverloads +fun IbmqProvider.runExperimentSync( + qc: QuantumCircuit, + shots: Int = 1024, + name: String = "" +) = runBlocking { runExperiment(qc, shots, name) } + +fun IbmqProvider.updateExperimentSync( + codeId: String, + request: VersionsRequest +) = runBlocking { updateExperiment(codeId, request) } + +fun IbmqProvider.getExperimentSync(codeId: String) = runBlocking { getExperiment(codeId) } + +fun IbmqProvider.getExperimentsSync() = runBlocking { getExperiments() } + +fun IbmqProvider.newExperimentSync(request: NewRequest) = runBlocking { newExperiment(request) } + +fun IbmqProvider.getRunSync(jobId: String) = runBlocking { getRun(jobId) } + +fun IbmqProvider.getResultDownloadUrlSync(jobId: String) = runBlocking { getResultDownloadUrl(jobId) } + +fun IbmqProvider.getResultSync(url: String) = runBlocking { getResult(url) } + +fun IbmqProvider.andWaitSync( + timeoutDuration: Duration = IbmqProvider.JOB_TIMEOUT_DURATION +) = runBlocking { andWait(timeoutDuration) } + +fun IbmqProvider.andWaitSync() = runBlocking { andWait() } + +fun IbmqProvider.runExperimentAndWaitSync( + request: RunExperimentRequest, + timeoutDuration: Duration = IbmqProvider.JOB_TIMEOUT_DURATION +) = runBlocking { runExperimentAndWait(request, timeoutDuration) } + +fun IbmqProvider.runExperimentAndWaitSync(request: RunExperimentRequest) = runBlocking { runExperimentAndWait(request) } + +fun IbmqProvider.runExperimentAndWaitSync( + qc: QuantumCircuit, + timeoutDuration: Duration = IbmqProvider.JOB_TIMEOUT_DURATION +) = runBlocking { runExperimentAndWait(qc, timeoutDuration) } + +fun IbmqProvider.runExperimentAndWaitSync(qc: QuantumCircuit) = runBlocking { runExperimentAndWait(qc) } diff --git a/brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt b/brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt new file mode 100644 index 0000000..b5ea8f3 --- /dev/null +++ b/brac-kt-ibmq-provider/src/jvmMain/kotlin/net/javaman/brackt/providers/ibmq/api/IbmqApi.kt @@ -0,0 +1,52 @@ +package net.javaman.brackt.providers.ibmq.api + +import kotlinx.coroutines.runBlocking +import net.javaman.brackt.providers.ibmq.api.models.LogInWithTokenRequest +import net.javaman.brackt.providers.ibmq.api.models.NewRequest +import net.javaman.brackt.providers.ibmq.api.models.RunExperimentRequest +import net.javaman.brackt.providers.ibmq.api.models.VersionsRequest + +fun IbmqApi.logInWithTokenSync(request: LogInWithTokenRequest) = runBlocking { logInWithToken(request) } + +fun IbmqApi.apiTokenSync(accessToken: String, userId: String) = runBlocking { apiToken(accessToken, userId) } + +fun IbmqApi.networksSync(accessToken: String) = runBlocking { networks(accessToken) } + +fun IbmqApi.backendsSync(accessToken: String) = runBlocking { backends(accessToken) } + +fun IbmqApi.jobsSync(accessToken: String) = runBlocking { jobs(accessToken) } + +fun IbmqApi.jobsLimitSync( + accessToken: String, + network: String, + group: String, + project: String, + device: String +) = runBlocking { jobsLimit(accessToken, network, group, project, device) } + +fun IbmqApi.runExperimentSync( + accessToken: String, + request: RunExperimentRequest, + network: String, + group: String, + project: String +) = runBlocking { runExperiment(accessToken, request, network, group, project) } + +fun IbmqApi.versionsSync( + accessToken: String, + request: VersionsRequest, + code: String +) = runBlocking { versions(accessToken, request, code) } + +fun IbmqApi.latestSync(accessToken: String, codeId: String) = runBlocking { latest(accessToken, codeId) } + +fun IbmqApi.lastestSync(accessToken: String, userId: String) = runBlocking { lastest(accessToken, userId) } + +fun IbmqApi.newCodeSync(accessToken: String, request: NewRequest) = runBlocking { newCode(accessToken, request) } + +fun IbmqApi.jobSync(accessToken: String, jobId: String) = runBlocking { job(accessToken, jobId) } + +fun IbmqApi.resultDownloadUrlSync( + accessToken: String, + jobId: String +) = runBlocking { resultDownloadUrl(accessToken, jobId) } diff --git a/build.gradle.kts b/build.gradle.kts index c5808a1..74dc2c3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ repositories { subprojects { group = "net.javaman.brac-kt" - version = "0.1.2" + version = "0.1.3" apply(plugin = "io.gitlab.arturbosch.detekt") diff --git a/example-js-typescript/package-lock.json b/example-js-typescript/package-lock.json new file mode 100644 index 0000000..019480b --- /dev/null +++ b/example-js-typescript/package-lock.json @@ -0,0 +1,1588 @@ +{ + "name": "example-js-typescript", + "version": "0.1.3", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example-js-typescript", + "version": "0.1.3", + "dependencies": { + "@js-joda/core": "^4.3.1", + "@thenewjavaman/brac-kt-api": "^0.1.3", + "@thenewjavaman/brac-kt-ibmq-provider": "^0.1.3", + "eslint": "^8.4.1", + "typescript": "^4.5.2" + }, + "devDependencies": { + "@types/node": "^16.11.11" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.2.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + }, + "node_modules/@js-joda/core": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-4.3.1.tgz", + "integrity": "sha512-oeaetlodcqVsiZDxnEcqsbs+sXBkASxua0mXs5OXuPQXz3/wdPTMlxwfQ4z2HKcOik3S9voW3QJkp/KLWDhvRQ==" + }, + "node_modules/@thenewjavaman/brac-kt-api": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@thenewjavaman/brac-kt-api/-/brac-kt-api-0.1.3.tgz", + "integrity": "sha512-cHCFfPo23Jv1vkyFca+D+MikZSqCGi0/vgk07W+hAOwkTqSIUjbFULsnllmsGgfxjcou9ci9Ue5zTzw/DsPlMg==" + }, + "node_modules/@thenewjavaman/brac-kt-ibmq-provider": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@thenewjavaman/brac-kt-ibmq-provider/-/brac-kt-ibmq-provider-0.1.3.tgz", + "integrity": "sha512-ka5dOt+rj0WPoZfKfhYS+PTd3LGaInxa0VlDnGE0UgFtWqI3gl8NotqDB3aFgQqR1dtMnwqpC0qF3b9usvq2mw==" + }, + "node_modules/@types/node": { + "version": "16.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.11.tgz", + "integrity": "sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "engines": { + "node": ">=6" + } + }, + "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==", + "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==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "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==" + }, + "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==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "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/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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/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==", + "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==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "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==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", + "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", + "dependencies": { + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/espree": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", + "dependencies": { + "acorn": "^8.6.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.1.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "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==" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "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": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "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/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "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==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "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/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "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==", + "engines": { + "node": ">=8" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "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==", + "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==", + "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==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "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==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", + "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + }, + "dependencies": { + "@eslint/eslintrc": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.2.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + }, + "@js-joda/core": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-4.3.1.tgz", + "integrity": "sha512-oeaetlodcqVsiZDxnEcqsbs+sXBkASxua0mXs5OXuPQXz3/wdPTMlxwfQ4z2HKcOik3S9voW3QJkp/KLWDhvRQ==" + }, + "@thenewjavaman/brac-kt-api": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@thenewjavaman/brac-kt-api/-/brac-kt-api-0.1.3.tgz", + "integrity": "sha512-cHCFfPo23Jv1vkyFca+D+MikZSqCGi0/vgk07W+hAOwkTqSIUjbFULsnllmsGgfxjcou9ci9Ue5zTzw/DsPlMg==" + }, + "@thenewjavaman/brac-kt-ibmq-provider": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@thenewjavaman/brac-kt-ibmq-provider/-/brac-kt-ibmq-provider-0.1.3.tgz", + "integrity": "sha512-ka5dOt+rj0WPoZfKfhYS+PTd3LGaInxa0VlDnGE0UgFtWqI3gl8NotqDB3aFgQqR1dtMnwqpC0qF3b9usvq2mw==" + }, + "@types/node": { + "version": "16.11.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.11.tgz", + "integrity": "sha512-KB0sixD67CeecHC33MYn+eYARkqTheIRNuu97y2XMjR7Wu3XibO1vaY6VBV6O/a89SPI81cEUIYT87UqUWlZNw==", + "dev": true + }, + "acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==" + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "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==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "requires": { + "esutils": "^2.0.2" + } + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "eslint": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.4.1.tgz", + "integrity": "sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg==", + "requires": { + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^6.0.1", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.2.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" + } + } + }, + "eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==" + }, + "espree": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", + "requires": { + "acorn": "^8.6.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^3.1.0" + } + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "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==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "requires": { + "flat-cache": "^3.0.4" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "requires": { + "type-fest": "^0.20.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "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==", + "requires": { + "yallist": "^4.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "requires": { + "callsites": "^3.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "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==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "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==" + }, + "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==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, + "typescript": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", + "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/example-js-typescript/package.json b/example-js-typescript/package.json new file mode 100644 index 0000000..4b2b8b7 --- /dev/null +++ b/example-js-typescript/package.json @@ -0,0 +1,20 @@ +{ + "name": "example-js-typescript", + "version": "0.1.3", + "description": "A Kotlin/Multiplatform interface for quantum computing", + "main": "app.js", + "author": "Gabriel Pizarro", + "dependencies": { + "@js-joda/core": "^4.3.1", + "@thenewjavaman/brac-kt-api": "^0.1.3", + "@thenewjavaman/brac-kt-ibmq-provider": "^0.1.3", + "eslint": "^8.4.1", + "typescript": "^4.5.2" + }, + "scripts": { + "start": "tsc && node dist/app.js" + }, + "devDependencies": { + "@types/node": "^16.11.11" + } +} diff --git a/example-js-typescript/src/app.ts b/example-js-typescript/src/app.ts new file mode 100644 index 0000000..f9866f9 --- /dev/null +++ b/example-js-typescript/src/app.ts @@ -0,0 +1,10 @@ +require('@js-joda/core'); +const bracKtApi = require('@thenewjavaman/brac-kt-api').net.javaman.brackt.api; +const bracKtIbmqProvider = require('@thenewjavaman/brac-kt-ibmq-provider').net.javaman.brackt.providers.ibmq; + +const n = 3; +const qc = new bracKtApi.quantum.QuantumCircuit("Example Superposition", 3); +for (let i = 0; i < n; i++) qc.h(i); +for (let i = 0; i < n; i++) qc.measure(i, i); + +console.log(qc); diff --git a/example-js-typescript/tsconfig.json b/example-js-typescript/tsconfig.json new file mode 100644 index 0000000..43c5fc7 --- /dev/null +++ b/example-js-typescript/tsconfig.json @@ -0,0 +1,109 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + // "incremental": true, /* Enable incremental compilation */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", + /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ + // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + + /* Modules */ + "module": "commonjs", + /* Specify what module code is generated. */ + "rootDir": "./src", + /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "resolveJsonModule": true, /* Enable importing .json files */ + // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./dist", + /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, + /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, + /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, + /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ + // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ + // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true + /* Skip type checking all .d.ts files. */ + } +} diff --git a/example-jvm-java/build.gradle.kts b/example-jvm-java/build.gradle.kts index 6e3e79b..9482b47 100644 --- a/example-jvm-java/build.gradle.kts +++ b/example-jvm-java/build.gradle.kts @@ -1,7 +1,4 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { - kotlin("jvm") application } @@ -9,19 +6,11 @@ repositories { mavenCentral() } -val jvmTarget: String by ext - dependencies { implementation(project(":brac-kt-api")) implementation(project(":brac-kt-ibmq-provider")) } -tasks.withType().all { - kotlinOptions { - jvmTarget = jvmTarget - } -} - application { mainClass.set("Application") } diff --git a/example-jvm-java/src/main/java/Application.java b/example-jvm-java/src/main/java/Application.java index 4ea519d..f8767a6 100644 --- a/example-jvm-java/src/main/java/Application.java +++ b/example-jvm-java/src/main/java/Application.java @@ -1,6 +1,16 @@ +import net.javaman.brackt.api.BracKtApi; import net.javaman.brackt.api.quantum.QuantumCircuit; +import net.javaman.brackt.providers.ibmq.IbmqProvider; +import net.javaman.brackt.providers.ibmq.IbmqProviderKt; public class Application { + private static final IbmqProvider ibmqProvider = new IbmqProvider(); + + static { + BracKtApi.addInjections(); + IbmqProvider.addInjections(); + } + public static void main(String[] args) { // Construct the QuantumCircuit in Java int n = 3; @@ -9,6 +19,10 @@ public static void main(String[] args) { for (int i = 0; i < n; i++) qc.measure(i, i); // Let Kotlin handle the coroutines - BracKtIntegration.callIbmq(qc); + String apiToken = System.getenv("IBMQ_API_TOKEN"); + IbmqProviderKt.logInSync(ibmqProvider, apiToken); + IbmqProviderKt.selectNetworkSync(ibmqProvider); + IbmqProviderKt.selectDeviceSync(ibmqProvider); + IbmqProviderKt.runExperimentAndWaitSync(ibmqProvider, qc); } } diff --git a/example-jvm-java/src/main/kotlin/BracKtIntegration.kt b/example-jvm-java/src/main/kotlin/BracKtIntegration.kt deleted file mode 100644 index a4f4920..0000000 --- a/example-jvm-java/src/main/kotlin/BracKtIntegration.kt +++ /dev/null @@ -1,27 +0,0 @@ -import kotlinx.coroutines.runBlocking -import net.javaman.brackt.api.BracKtApi -import net.javaman.brackt.api.quantum.QuantumCircuit -import net.javaman.brackt.api.util.injections.injection -import net.javaman.brackt.api.util.properties.PropertyManager -import net.javaman.brackt.providers.ibmq.IbmqProvider - -class BracKtIntegration private constructor() { - companion object { - private val propertyManager: PropertyManager by injection() - private val ibmqProvider: IbmqProvider by injection() - - init { - BracKtApi.addInjections() - IbmqProvider.addInjections() - } - - @JvmStatic - fun callIbmq(qc: QuantumCircuit): Unit = runBlocking { - val apiToken: String = propertyManager["IBMQ_API_TOKEN"] - ibmqProvider.logIn(apiToken) - ibmqProvider.selectNetwork() - ibmqProvider.selectDevice() - ibmqProvider.runExperimentAndWait(qc) - } - } -} diff --git a/src/extension.ts b/src/extension.ts new file mode 100644 index 0000000..d066e8e --- /dev/null +++ b/src/extension.ts @@ -0,0 +1,26 @@ +// The module 'vscode' contains the VS Code extensibility API +// Import the module and reference it with the alias vscode in your code below +import * as vscode from 'vscode'; + +// this method is called when your extension is activated +// your extension is activated the very first time the command is executed +export function activate(context: vscode.ExtensionContext) { + + // Use the console to output diagnostic information (console.log) and errors (console.error) + // This line of code will only be executed once when your extension is activated + console.log('Congratulations, your extension "brac-kt" is now active!'); + + // The command has been defined in the package.json file + // Now provide the implementation of the command with registerCommand + // The commandId parameter must match the command field in package.json + let disposable = vscode.commands.registerCommand('brac-kt.helloWorld', () => { + // The code you place here will be executed every time your command is executed + // Display a message box to the user + vscode.window.showInformationMessage('Hello World from brac-kt!'); + }); + + context.subscriptions.push(disposable); +} + +// this method is called when your extension is deactivated +export function deactivate() {} diff --git a/src/test/runTest.ts b/src/test/runTest.ts new file mode 100644 index 0000000..27b3ceb --- /dev/null +++ b/src/test/runTest.ts @@ -0,0 +1,23 @@ +import * as path from 'path'; + +import { runTests } from '@vscode/test-electron'; + +async function main() { + try { + // The folder containing the Extension Manifest package.json + // Passed to `--extensionDevelopmentPath` + const extensionDevelopmentPath = path.resolve(__dirname, '../../'); + + // The path to test runner + // Passed to --extensionTestsPath + const extensionTestsPath = path.resolve(__dirname, './suite/index'); + + // Download VS Code, unzip it and run the integration test + await runTests({ extensionDevelopmentPath, extensionTestsPath }); + } catch (err) { + console.error('Failed to run tests'); + process.exit(1); + } +} + +main(); diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts new file mode 100644 index 0000000..4ca0ab4 --- /dev/null +++ b/src/test/suite/extension.test.ts @@ -0,0 +1,15 @@ +import * as assert from 'assert'; + +// You can import and use all API from the 'vscode' module +// as well as import your extension to test it +import * as vscode from 'vscode'; +// import * as myExtension from '../../extension'; + +suite('Extension Test Suite', () => { + vscode.window.showInformationMessage('Start all tests.'); + + test('Sample test', () => { + assert.strictEqual(-1, [1, 2, 3].indexOf(5)); + assert.strictEqual(-1, [1, 2, 3].indexOf(0)); + }); +}); diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts new file mode 100644 index 0000000..7029e38 --- /dev/null +++ b/src/test/suite/index.ts @@ -0,0 +1,38 @@ +import * as path from 'path'; +import * as Mocha from 'mocha'; +import * as glob from 'glob'; + +export function run(): Promise { + // Create the mocha test + const mocha = new Mocha({ + ui: 'tdd', + color: true + }); + + const testsRoot = path.resolve(__dirname, '..'); + + return new Promise((c, e) => { + glob('**/**.test.js', { cwd: testsRoot }, (err, files) => { + if (err) { + return e(err); + } + + // Add files to the test suite + files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))); + + try { + // Run the mocha test + mocha.run(failures => { + if (failures > 0) { + e(new Error(`${failures} tests failed.`)); + } else { + c(); + } + }); + } catch (err) { + console.error(err); + e(err); + } + }); + }); +}