From bd76188173e2fbb6ea6c3f18f67644fa39abe34d Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Thu, 1 Aug 2024 13:32:13 -0600 Subject: [PATCH 01/77] WIP --- Src/java/build.gradle | 46 ----- Src/java/build.gradle.kts | 14 ++ Src/java/buildSrc/build.gradle | 15 -- Src/java/buildSrc/build.gradle.kts | 16 ++ .../main/groovy/cql.fhir-conventions.gradle | 31 --- .../main/groovy/cql.java-conventions.gradle | 181 ----------------- .../groovy/cql.library-conventions.gradle | 19 -- .../main/groovy/cql.sca-conventions.gradle | 34 ---- .../main/groovy/cql.xjc-conventions.gradle | 26 +-- .../kotlin/cql.fhir-conventions.gradle.kts | 42 ++++ .../kotlin/cql.java-conventions.gradle.kts | 185 ++++++++++++++++++ .../kotlin/cql.library-conventions.gradle.kts | 12 ++ .../kotlin/cql.sca-conventions.gradle.kts | 25 +++ Src/java/cqf-fhir-npm/build.gradle | 10 - Src/java/cqf-fhir-npm/build.gradle.kts | 10 + Src/java/cqf-fhir/build.gradle | 3 - Src/java/cqf-fhir/build.gradle.kts | 3 + Src/java/cql-to-elm-cli/build.gradle | 24 --- Src/java/cql-to-elm-cli/build.gradle.kts | 24 +++ Src/java/cql-to-elm/build.gradle | 29 --- Src/java/cql-to-elm/build.gradle.kts | 25 +++ Src/java/cql/build.gradle | 18 +- Src/java/elm-fhir/build.gradle | 16 +- Src/java/elm-jackson/build.gradle | 14 -- Src/java/elm-jackson/build.gradle.kts | 11 ++ Src/java/elm-jaxb/build.gradle | 7 - Src/java/elm-jaxb/build.gradle.kts | 7 + Src/java/elm-test/build.gradle | 11 -- Src/java/elm-test/build.gradle.kts | 11 ++ Src/java/elm/build.gradle | 12 +- Src/java/model-jackson/build.gradle | 16 -- Src/java/model-jackson/build.gradle.kts | 13 ++ Src/java/model-jaxb/build.gradle | 7 - Src/java/model-jaxb/build.gradle.kts | 7 + Src/java/model/build.gradle | 8 +- Src/java/qdm/build.gradle | 12 +- Src/java/quick/build.gradle | 12 +- Src/java/settings.gradle | 26 --- Src/java/settings.gradle.kts | 36 ++++ Src/java/tools/cql-formatter/build.gradle | 10 +- Src/java/tools/cql-parsetree/build.gradle | 16 -- Src/java/tools/cql-parsetree/build.gradle.kts | 16 ++ Src/java/tools/xsd-to-modelinfo/build.gradle | 16 -- .../tools/xsd-to-modelinfo/build.gradle.kts | 16 ++ 44 files changed, 530 insertions(+), 562 deletions(-) delete mode 100644 Src/java/build.gradle create mode 100644 Src/java/build.gradle.kts delete mode 100644 Src/java/buildSrc/build.gradle create mode 100644 Src/java/buildSrc/build.gradle.kts delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts delete mode 100644 Src/java/cqf-fhir-npm/build.gradle create mode 100644 Src/java/cqf-fhir-npm/build.gradle.kts delete mode 100644 Src/java/cqf-fhir/build.gradle create mode 100644 Src/java/cqf-fhir/build.gradle.kts delete mode 100644 Src/java/cql-to-elm-cli/build.gradle create mode 100644 Src/java/cql-to-elm-cli/build.gradle.kts delete mode 100644 Src/java/cql-to-elm/build.gradle create mode 100644 Src/java/cql-to-elm/build.gradle.kts delete mode 100644 Src/java/elm-jackson/build.gradle create mode 100644 Src/java/elm-jackson/build.gradle.kts delete mode 100644 Src/java/elm-jaxb/build.gradle create mode 100644 Src/java/elm-jaxb/build.gradle.kts delete mode 100644 Src/java/elm-test/build.gradle create mode 100644 Src/java/elm-test/build.gradle.kts delete mode 100644 Src/java/model-jackson/build.gradle create mode 100644 Src/java/model-jackson/build.gradle.kts delete mode 100644 Src/java/model-jaxb/build.gradle create mode 100644 Src/java/model-jaxb/build.gradle.kts delete mode 100644 Src/java/settings.gradle create mode 100644 Src/java/settings.gradle.kts delete mode 100644 Src/java/tools/cql-parsetree/build.gradle create mode 100644 Src/java/tools/cql-parsetree/build.gradle.kts delete mode 100644 Src/java/tools/xsd-to-modelinfo/build.gradle create mode 100644 Src/java/tools/xsd-to-modelinfo/build.gradle.kts diff --git a/Src/java/build.gradle b/Src/java/build.gradle deleted file mode 100644 index 5cc640c3a..000000000 --- a/Src/java/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -plugins { - id 'idea' - id 'eclipse' -} - -idea { - project { - languageLevel = JavaVersion.VERSION_11 - ipr { - withXml { provider -> - provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git' - } - - whenMerged { project -> - def examples = new org.gradle.plugins.ide.idea.model.Path('file://$PROJECT_DIR$/examples.iml', 'file://$PROJECT_DIR$/examples.iml', '$PROJECT_DIR$/examples.iml') - if ((project.modulePaths.findAll { p -> p.url == examples.url }).empty) project.modulePaths.add(examples) - - def grammar = new org.gradle.plugins.ide.idea.model.Path('file://$PROJECT_DIR$/grammar.iml', 'file://$PROJECT_DIR$/grammar.iml', '$PROJECT_DIR$/grammar.iml') - if ((project.modulePaths.findAll { p -> p.url == grammar.url }).empty) project.modulePaths.add(grammar) - - def cqllm = new org.gradle.plugins.ide.idea.model.Path('file://$PROJECT_DIR$/cql-lm.iml', 'file://$PROJECT_DIR$/cql-lm.iml', '$PROJECT_DIR$/cql-lm.iml') - if ((project.modulePaths.findAll { p -> p.url == cqllm.url }).empty) project.modulePaths.add(cqllm) - } - } - } - workspace { - iws { - withXml { provider -> - def props = provider.node.component.find { it.@name == 'PropertiesComponent' } - - def propMap = [ - '$PROJECT_DIR$/../grammar/cql.g4::/output-dir' : '$PROJECT_DIR$/cql/src/generated/java', - '$PROJECT_DIR$/../grammar/cql.g4::/lib-dir' : '$PROJECT_DIR$/../grammar', - '$PROJECT_DIR$/../grammar/cql.g4::/package' : 'org.cqframework.cql.gen', - '$PROJECT_DIR$/../grammar/cql.g4::/gen-listener' : 'true', - '$PROJECT_DIR$/../grammar/cql.g4::/gen-visitor' : 'true' - ] - - propMap.each() { key, value -> - if (! props.property.find { it.@name == key }) - props.appendNode('property', ['name' : key, 'value' : value]) - } - } - } - } -} \ No newline at end of file diff --git a/Src/java/build.gradle.kts b/Src/java/build.gradle.kts new file mode 100644 index 000000000..42a967f58 --- /dev/null +++ b/Src/java/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + id("org.jetbrains.kotlin.jvm") +} + +repositories { + mavenCentral() +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") +} +kotlin { + jvmToolchain(11) +} \ No newline at end of file diff --git a/Src/java/buildSrc/build.gradle b/Src/java/buildSrc/build.gradle deleted file mode 100644 index b7ecf8ca3..000000000 --- a/Src/java/buildSrc/build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id 'groovy-gradle-plugin' -} - -repositories { - mavenCentral() - gradlePluginPortal() -} - -dependencies { - implementation 'net.ltgt.gradle:gradle-errorprone-plugin:3.1.0' - implementation 'ru.vyarus:gradle-animalsniffer-plugin:1.7.0' - implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14' - implementation 'com.diffplug.spotless:spotless-plugin-gradle:6.23.3' -} \ No newline at end of file diff --git a/Src/java/buildSrc/build.gradle.kts b/Src/java/buildSrc/build.gradle.kts new file mode 100644 index 000000000..b56888079 --- /dev/null +++ b/Src/java/buildSrc/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + `kotlin-dsl` + id("groovy-gradle-plugin") +} + +repositories { + mavenCentral() + gradlePluginPortal() +} + +dependencies { + implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0") + implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.0") + implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14") + implementation("com.diffplug.spotless:spotless-plugin-gradle:6.23.3") +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle deleted file mode 100644 index 80622c10c..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -ext { - hapiVersion = project['hapi.version'] -} - -dependencies { - api platform("ca.uhn.hapi.fhir:hapi-fhir-bom:${hapiVersion}") { - exclude group: 'org.eclipse.jetty' - exclude group: 'xpp3' - exclude group: 'org.junit' - } - - implementation "ca.uhn.hapi.fhir:hapi-fhir-base" - implementation "ca.uhn.hapi.fhir:hapi-fhir-converter" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-hl7org-dstu2" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r4" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r5" - - // This is to align with the FHIR core dependencies - // Note that this dependency hasn't been updated since 2013 - // we probably need to standardize on a fork up the dependency chain - implementation ('org.ogce:xpp3:1.1.6') { - exclude group: 'org.junit' - exclude group: 'org.hamcrest' - } -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle deleted file mode 100644 index 42614d30b..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle +++ /dev/null @@ -1,181 +0,0 @@ -plugins { - id 'java' - id 'maven-publish' - id 'jacoco' - id 'signing' - id 'cql.sca-conventions' - id 'com.diffplug.spotless' -} - -java { - withJavadocJar() - withSourcesJar() -} - -compileJava { - options.release = 11 -} - -repositories { - mavenLocal() - mavenCentral() - maven { - url "https://oss.sonatype.org/content/repositories/snapshots" - } -} - -dependencies { - implementation 'org.slf4j:slf4j-api:1.7.36' - testImplementation 'org.hamcrest:hamcrest-all:1.3' - testImplementation 'uk.co.datumedge:hamcrest-json:0.2' - testImplementation(platform('org.junit:junit-bom:5.10.2')) - testImplementation('org.junit.jupiter:junit-jupiter') - testImplementation 'org.slf4j:slf4j-simple:1.7.36' - - // These are JAXB dependencies excluded because the libraries need to work - // on Android. But for test purposes we use them pretty much everywhere. - testRuntimeOnly 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' - testRuntimeOnly 'org.eclipse.parsson:parsson:1.1.5' - testRuntimeOnly('org.junit.platform:junit-platform-launcher') -} - -jar { - manifest { - attributes('Implementation-Title': project.name, - 'Implementation-Version': project.version, - 'Specification-Title': 'HL7 Clinical Quality Language (CQL)', - 'Specification-Version': project['specification.version']) - } -} - -jacoco { - toolVersion = "0.8.11" -} - -test { - useJUnitPlatform() - testLogging { - events "skipped", "failed" - } - finalizedBy jacocoTestReport // report is always generated after tests run -} - -jacocoTestReport { - reports { - xml.required = true - } - dependsOn test // tests are required to run before generating the report -} - -tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') -} - -tasks.withType(JavaCompile) { - options.compilerArgs << '-Xlint:unchecked' - options.deprecation = true -} - -spotless { - java { - targetExclude '**/generated/**' - palantirJavaFormat() - } -} - -/* -A few things: - - You must have an OSSRH Jira account (https://issues.sonatype.org/secure/Signup!default.jspa) - - Your account must have privileges to upload info.cqframework artifacts (https://issues.sonatype.org/browse/OSSRH-15514) - - You must have a gpg key (http://central.sonatype.org/pages/working-with-pgp-signatures.html) - - You must set your account info and GPG key in your user's gradle.properties file. For example: - ossrhUsername=foo - ossrhPassword=b@r - signing.keyId=24875D73 - signing.password=secret - signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg - - If the library version ends with '-SNAPSHOT', it will be deployed to the snapshot repository, else it will be - deployed to the staging repository (which you then must manually release http://central.sonatype.org/pages/releasing-the-deployment.html). - - Repo for snapshots and releases for the translator modules: https://oss.sonatype.org/content/groups/public/info/cqframework/ - - Repo for snpashots, releases, and staged releases for the translator modules: https://oss.sonatype.org/content/groups/staging/info/cqframework/ - - Repo for snapshots and releases for the engine modules: https://oss.sonatype.org/content/groups/public/org/opencds/cqf/cql/ - - Repo for snapshots, releases, and staged releases for the engine modules: https://oss.sonatype.org/content/groups/staging/org/opencds/cqf/cql/ - */ -publishing { - publications { - mavenDeployer(MavenPublication) { - from components.java - - pom { - name = project.name - packaging = 'jar' - description = "The ${project.name} library for the Clinical Quality Language Java reference implementation" - url = 'http://cqframework.info' - - scm { - connection = 'scm:git:git@github.com:cqframework/clinical_quality_language.git' - developerConnection = 'scm:git:git@github.com:cqframework/clinical_quality_language.git' - url = 'git@github.com:cqframework/clinical_quality_language.git' - } - - licenses { - license { - name ='The Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - - developers { - developer { - name = 'Bryn Rhodes' - } - developer { - name = 'Chris Moesel' - } - developer { - name = 'Rob Dingwell' - } - developer { - name = 'Jason Walonoski' - } - developer { - name = 'Marc Hadley' - } - developer { - name = 'Jonathan Percival' - } - } - } - } - } - repositories { - maven { - credentials { - username project.hasProperty("ossrhUsername") ? ossrhUsername : System.getenv("OSSRH_USERNAME") != null ? System.getenv("OSSRH_USERNAME") : "" - password project.hasProperty("ossrhPassword") ? ossrhPassword : System.getenv("OSSRH_TOKEN") != null ? System.getenv("OSSRH_TOKEN") : "" - } - - /* Use these to test locally (but don't forget to comment out others!) - def releasesRepoUrl = "file://${buildDir}/repo" - def snapshotsRepoUrl = "file://${buildDir}/ssRepo" - */ - - // change URLs to point to your repos, e.g. http://my.org/repo - def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" - def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - } - } -} - -signing { - if (!version.endsWith('SNAPSHOT')){ - sign publishing.publications.mavenDeployer - } -} - -javadoc { - if(JavaVersion.current().isJava9Compatible()) { - options.addBooleanOption('html5', true) - } -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle deleted file mode 100644 index 52f3ea967..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'java-library' - id 'ru.vyarus.animalsniffer' - id 'cql.java-conventions' -} - -ext { - androidApiLevel = project['android.api.level'] -} - - -dependencies { - // Various libraries for Android signatures are available, Jackson uses this one - signature "com.toasttab.android:gummy-bears-api-${androidApiLevel}:0.5.0@signature" -} - -animalsniffer { - sourceSets = [sourceSets.main] -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle deleted file mode 100644 index d23a15b6b..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle +++ /dev/null @@ -1,34 +0,0 @@ -plugins { - id 'java' - id 'net.ltgt.errorprone' - id 'checkstyle' -} - -ext { - errorproneVersion = '2.24.1' -} - -dependencies { - errorprone "com.google.errorprone:error_prone_core:${errorproneVersion}" -} - -checkstyleMain.source = "src/main/java" -// TODO: Have a conversation with the team about enforcing checkstyle in tests -checkstyleTest.enabled = false - -tasks.withType(JavaCompile).configureEach { - // TODO: Change this once we fix all the errors - options.errorprone.disableAllWarnings = true - options.errorprone.disableWarningsInGeneratedCode = true - options.errorprone.disable("DoubleBraceInitialization") - // This applies recommended fixes to the source code in place - // options.errorprone.errorproneArgs = ["-XepPatchLocation:IN_PLACE"] -} - -tasks { - compileTestJava { - // TODO: Talk to the team about warnings in tests - options.errorprone.disableAllWarnings = true - options.errorprone.disableWarningsInGeneratedCode = true - } -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle index 8f9e15407..a31945517 100644 --- a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle +++ b/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle @@ -1,5 +1,5 @@ plugins { - id 'java' + id "java" } configurations { @@ -7,24 +7,24 @@ configurations { } dependencies { - xjc 'codes.rafael.jaxb2_commons:jaxb2-basics-ant:3.0.0' - xjc 'codes.rafael.jaxb2_commons:jaxb2-basics:3.0.0' - xjc 'codes.rafael.jaxb2_commons:jaxb2-fluent-api:3.0.0' + xjc "codes.rafael.jaxb2_commons:jaxb2-basics-ant:3.0.0" + xjc "codes.rafael.jaxb2_commons:jaxb2-basics:3.0.0" + xjc "codes.rafael.jaxb2_commons:jaxb2-fluent-api:3.0.0" // Eclipse has taken over all Java EE reference components // https://www.infoworld.com/article/3310042/eclipse-takes-over-all-java-ee-reference-components.html // https://wiki.eclipse.org/Jakarta_EE_Maven_Coordinates - xjc 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - xjc 'org.glassfish.jaxb:jaxb-xjc:3.0.2' - xjc 'org.glassfish.jaxb:jaxb-runtime:4.0.3' - xjc 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' - xjc 'org.slf4j:slf4j-simple:1.7.36' - api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - api 'codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0' + xjc "jakarta.xml.bind:jakarta.xml.bind-api:4.0.1" + xjc "org.glassfish.jaxb:jaxb-xjc:3.0.2" + xjc "org.glassfish.jaxb:jaxb-runtime:4.0.3" + xjc "org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2" + xjc "org.slf4j:slf4j-simple:1.7.36" + api "jakarta.xml.bind:jakarta.xml.bind-api:4.0.1" + api "codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0" } ext.xjc = [ destDir: "${buildDir}/generated/sources/$name/main/java", - args: '-disableXmlSecurity -Xfluent-api -Xequals -XhashCode -XtoString -Xsetters -Xsetters-mode=direct' + args: "-disableXmlSecurity -Xfluent-api -Xequals -XhashCode -XtoString -Xsetters -Xsetters-mode=direct" ] @@ -35,7 +35,7 @@ task generateSources { doLast { file(xjc.destDir).mkdirs() - ant.taskdef(name: 'xjc', classname: 'org.jvnet.jaxb2_commons.xjc.XJC2Task', classpath: configurations.xjc.asPath) + ant.taskdef(name: "xjc", classname: "org.jvnet.jaxb2_commons.xjc.XJC2Task", classpath: configurations.xjc.asPath) /* The above sets up the task, but the real work of the task should be specified in the subproject using generateSources.doLast. For example: diff --git a/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts new file mode 100644 index 000000000..844d11a8e --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts @@ -0,0 +1,42 @@ +plugins { + id("cql.library-conventions") +} + +// bug fix for the hapi-bom +configurations.all { + resolutionStrategy { + eachDependency { + if (requested.group == "org.eclipse.jetty" && requested.name == "jetty-continuation") { + useTarget("org.eclipse.jetty:jetty-continuation:9.4.55.v20240627") + because("version 12 jetty-continuation doesn't exist. There's a bug in the bom.") + } + } + } +} + + +dependencies { + + api(platform("ca.uhn.hapi.fhir:hapi-fhir-bom:${project.findProperty("hapi.version")}")) + + implementation("ca.uhn.hapi.fhir:hapi-fhir-base") { + exclude(group = "org.eclipse.jetty") + exclude(group = "xpp3") + exclude(group = "org.junit") + } + + implementation("ca.uhn.hapi.fhir:hapi-fhir-converter") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-hl7org-dstu2") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r4") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r5") + + // This is to align with the FHIR core dependencies + // Note that this dependency hasn"t been updated since 2013 + // we probably need to standardize on a fork up the dependency chain + implementation("org.ogce:xpp3:1.1.6") { + exclude(group = "org.junit") + exclude(group = "org.hamcrest") + } +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts new file mode 100644 index 000000000..f75f566cb --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts @@ -0,0 +1,185 @@ +plugins { + id("java") + id("maven-publish") + id("jacoco") + id("signing") + id("cql.sca-conventions") + id("com.diffplug.spotless") +} + +java { + withJavadocJar() + withSourcesJar() + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } +} + +repositories { + mavenLocal() + mavenCentral() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots") + mavenContent { + snapshotsOnly() + } + } +} + +dependencies { + implementation("org.slf4j:slf4j-api:1.7.36") + testImplementation("org.hamcrest:hamcrest-all:1.3") + testImplementation("uk.co.datumedge:hamcrest-json:0.2") + testImplementation(platform("org.junit:junit-bom:5.10.2")) + testImplementation("org.junit.jupiter:junit-jupiter") + testImplementation("org.slf4j:slf4j-simple:1.7.36") + + // These are JAXB dependencies excluded because the libraries need to work + // on Android. But for test purposes we use them pretty much everywhere. + testRuntimeOnly("org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2") + testRuntimeOnly("org.eclipse.parsson:parsson:1.1.5") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") +} + +tasks.jar { + manifest { + attributes["Implementation-Title"] = project.name + attributes["Implementation-Version"] = project.version + attributes["Specification-Title"] = "HL7 Clinical Quality Language (CQL)" + attributes["Specification-Version"] = project.findProperty("specification.version") ?: "" + } +} + +jacoco { + toolVersion = "0.8.11" +} + +tasks.withType { + useJUnitPlatform() + testLogging { + events("skipped", "failed") + } + finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run +} + +tasks.jacocoTestReport { + reports { + xml.required = true + } + dependsOn(tasks.test)// tests are required to run before generating the report +} + +tasks.javadoc { + options { + val standardOptions = this as StandardJavadocDocletOptions + standardOptions.addStringOption("Xdoclint:none", "-quiet") + } +} + +tasks.withType { + options.compilerArgs.add("-Xlint:unchecked") + options.isDeprecation = true +} + +spotless { + java { + targetExclude("**/generated/**") + palantirJavaFormat() + } +} + +/* +A few things: + - You must have an OSSRH Jira account (https://issues.sonatype.org/secure/Signup!valault.jspa) + - Your account must have privileges to upload info.cqframework artifacts (https://issues.sonatype.org/browse/OSSRH-15514) + - You must have a gpg key (http://central.sonatype.org/pages/working-with-pgp-signatures.html) + - You must set your account info and GPG key in your user"s gradle.properties file. For example: + ossrhUsername=foo + ossrhPassword=b@r + signing.keyId=24875D73 + signing.password=secret + signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg + - If the library version ends with "-SNAPSHOT", it will be deployed to the snapshot repository, else it will be + deployed to the staging repository (which you then must manually release http://central.sonatype.org/pages/releasing-the-deployment.html). + - Repo for snapshots and releases for the translator modules: https://oss.sonatype.org/content/groups/public/info/cqframework/ + - Repo for snpashots, releases, and staged releases for the translator modules: https://oss.sonatype.org/content/groups/staging/info/cqframework/ + - Repo for snapshots and releases for the engine modules: https://oss.sonatype.org/content/groups/public/org/opencds/cqf/cql/ + - Repo for snapshots, releases, and staged releases for the engine modules: https://oss.sonatype.org/content/groups/staging/org/opencds/cqf/cql/ + */ +publishing { + publications { + create("mavenJava") { + from(components["java"]) + + pom { + name = project.name + packaging = "jar" + description = + "The ${project.name} library for the Clinical Quality Language Java reference implementation" + url = "http://cqframework.info" + + scm { + connection = "scm:git:git@github.com:cqframework/clinical_quality_language.git" + developerConnection = "scm:git:git@github.com:cqframework/clinical_quality_language.git" + url = "git@github.com:cqframework/clinical_quality_language.git" + } + + licenses { + license { + name = "The Apache License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + + developers { + developer { + name = "Bryn Rhodes" + } + developer { + name = "Chris Moesel" + } + developer { + name = "Rob Dingwell" + } + developer { + name = "Jason Walonoski" + } + developer { + name = "Marc Hadley" + } + developer { + name = "Jonathan Percival" + } + } + } + } + } + repositories { + maven { + credentials { + username = project.findProperty("ossrhUsername") as String? ?: System.getenv("OSSRH_USERNAME") ?: "" + password = project.findProperty("ossrhPassword") as String? ?: System.getenv("OSSRH_TOKEN") ?: "" + } + + /* Use these to test locally (but don"t forget to comment out others!) + val releasesRepoUrl = "file://${buildDir}/repo" + val snapshotsRepoUrl = "file://${buildDir}/ssRepo" + */ + + // change URLs to point to your repos, e.g. http://my.org/repo + val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" + if ((project.version as String).endsWith("SNAPSHOT")) { + url = uri(snapshotsRepoUrl) + } else { + url = uri(releasesRepoUrl) + } + } + } +} + +signing { + if (!(version as String).endsWith("SNAPSHOT")) { + sign(publishing.publications["mavenJava"]) + } +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts new file mode 100644 index 000000000..f5fb14a61 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -0,0 +1,12 @@ +import ru.vyarus.gradle.plugin.animalsniffer.AnimalSniffer + +plugins { + id("java-library") + id("ru.vyarus.animalsniffer") + id("cql.java-conventions") +} + +dependencies { + // Various libraries for Android signatures are available, Jackson uses this one + signature("com.toasttab.android:gummy-bears-api-${project.findProperty("android.api.level")}:0.5.0@signature") +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts new file mode 100644 index 000000000..9af4fc308 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts @@ -0,0 +1,25 @@ +import net.ltgt.gradle.errorprone.errorprone + +plugins { + id("java") + id("net.ltgt.errorprone") + id("checkstyle") +} + +repositories { + mavenCentral() +} +dependencies { + errorprone("com.google.errorprone:error_prone_core:2.29.2") +} + +tasks.named("checkstyleTest") { + enabled = false +} + +tasks.withType().configureEach { + options.errorprone.disableAllWarnings = true + options.errorprone.disableWarningsInGeneratedCode = true + options.errorprone.disable("DoubleBraceInitialization") + // errorproneArgs = ["-XepPatchLocation:IN_PLACE"] +} \ No newline at end of file diff --git a/Src/java/cqf-fhir-npm/build.gradle b/Src/java/cqf-fhir-npm/build.gradle deleted file mode 100644 index 89422d105..000000000 --- a/Src/java/cqf-fhir-npm/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -plugins { - id "cql.fhir-conventions" -} - -dependencies { - implementation project(':cql-to-elm') - implementation project(':cqf-fhir') - implementation 'com.google.code.gson:gson:2.9.1' - implementation 'org.apache.commons:commons-compress:1.24.0' -} diff --git a/Src/java/cqf-fhir-npm/build.gradle.kts b/Src/java/cqf-fhir-npm/build.gradle.kts new file mode 100644 index 000000000..86efb4dc2 --- /dev/null +++ b/Src/java/cqf-fhir-npm/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + id("cql.fhir-conventions") +} + +dependencies { + implementation(project(":cql-to-elm")) + implementation(project(":cqf-fhir")) + implementation("com.google.code.gson:gson:2.9.1") + implementation("org.apache.commons:commons-compress:1.24.0") +} \ No newline at end of file diff --git a/Src/java/cqf-fhir/build.gradle b/Src/java/cqf-fhir/build.gradle deleted file mode 100644 index ece5a847e..000000000 --- a/Src/java/cqf-fhir/build.gradle +++ /dev/null @@ -1,3 +0,0 @@ -plugins { - id 'cql.fhir-conventions' -} \ No newline at end of file diff --git a/Src/java/cqf-fhir/build.gradle.kts b/Src/java/cqf-fhir/build.gradle.kts new file mode 100644 index 000000000..d5c16b25c --- /dev/null +++ b/Src/java/cqf-fhir/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + id("cql.fhir-conventions") +} \ No newline at end of file diff --git a/Src/java/cql-to-elm-cli/build.gradle b/Src/java/cql-to-elm-cli/build.gradle deleted file mode 100644 index 332ac9c93..000000000 --- a/Src/java/cql-to-elm-cli/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id 'cql.java-conventions' - id "application" -} - -application { - mainClass = 'org.cqframework.cql.cql2elm.cli.Main' -} - -dependencies { - implementation project(':cql-to-elm') - implementation project(':quick') - implementation project(':qdm') - implementation project(':model-jaxb') - implementation project(':elm-jaxb') - implementation 'net.sf.jopt-simple:jopt-simple:4.7' - implementation 'org.slf4j:slf4j-simple:1.7.36' - implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.5' - implementation 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' - testImplementation project(':model-jaxb') - testImplementation project(':model-jackson') - testImplementation project(':elm-jaxb') - testImplementation project(':elm-jackson') -} \ No newline at end of file diff --git a/Src/java/cql-to-elm-cli/build.gradle.kts b/Src/java/cql-to-elm-cli/build.gradle.kts new file mode 100644 index 000000000..ca47368a8 --- /dev/null +++ b/Src/java/cql-to-elm-cli/build.gradle.kts @@ -0,0 +1,24 @@ +plugins { + id("cql.java-conventions") + id("application") +} + +application { + mainClass = "org.cqframework.cql.cql2elm.cli.Main" +} + +dependencies { + implementation(project(":cql-to-elm")) + implementation(project(":quick")) + implementation(project(":qdm")) + implementation(project(":model-jaxb")) + implementation(project(":elm-jaxb")) + implementation("net.sf.jopt-simple:jopt-simple:4.7") + implementation("org.slf4j:slf4j-simple:1.7.36") + implementation("org.glassfish.jaxb:jaxb-runtime:4.0.5") + implementation("org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2") + testImplementation(project(":model-jaxb")) + testImplementation(project(":model-jackson")) + testImplementation(project(":elm-jaxb")) + testImplementation(project(":elm-jackson")) +} \ No newline at end of file diff --git a/Src/java/cql-to-elm/build.gradle b/Src/java/cql-to-elm/build.gradle deleted file mode 100644 index 5b782b882..000000000 --- a/Src/java/cql-to-elm/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' -} - -ext { - jacksonVersion = project['jackson.version'] -} - -dependencies { - api project(':cql') - api project(':model') - api project(':elm') - api 'org.fhir:ucum:1.0.8' - api 'org.apache.commons:commons-text:1.10.0' - - // TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives - // in the cql-to-elm project. Ideally, we'd factor out all serialization depedencies into common - // libraries such that we could swap out jackson for something else. In the meantime, these are - // "implementation" dependencies so that they are not exported downstream. - implementation "com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}" - testImplementation project(':elm-jackson') - testImplementation project(':model-jackson') - testImplementation project(':quick') - testImplementation project(':qdm') - testImplementation 'com.github.reinert:jjschema:1.16' - testImplementation 'com.tngtech.archunit:archunit:1.2.1' - testImplementation 'org.skyscreamer:jsonassert:1.5.1' -} \ No newline at end of file diff --git a/Src/java/cql-to-elm/build.gradle.kts b/Src/java/cql-to-elm/build.gradle.kts new file mode 100644 index 000000000..e22e3fa60 --- /dev/null +++ b/Src/java/cql-to-elm/build.gradle.kts @@ -0,0 +1,25 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":cql")) + api(project(":model")) + api(project(":elm")) + api("org.fhir:ucum:1.0.8") + api("org.apache.commons:commons-text:1.10.0") + + // TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives + // in the cql-to-elm project. Ideally, we"d factor out all serialization depedencies into common + // libraries such that we could swap out jackson for something else. In the meantime, these are + // "implementation" dependencies so that they are not exported downstream. + implementation("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${project.findProperty("jackson.version")}") + testImplementation(project(":elm-jackson")) + testImplementation(project(":model-jackson")) + testImplementation(project(":quick")) + testImplementation(project(":qdm")) + testImplementation("com.github.reinert:jjschema:1.16") + testImplementation("com.tngtech.archunit:archunit:1.2.1") + testImplementation("org.skyscreamer:jsonassert:1.5.1") +} \ No newline at end of file diff --git a/Src/java/cql/build.gradle b/Src/java/cql/build.gradle index 1c2f641d2..e58ae9cbb 100644 --- a/Src/java/cql/build.gradle +++ b/Src/java/cql/build.gradle @@ -1,16 +1,16 @@ plugins { - id 'cql.java-conventions' - id 'application' - id 'antlr' + id("cql.java-conventions") + id("application") + id("antlr") } dependencies { - antlr "org.antlr:antlr4:${project['antlr.version']}" - api "org.antlr:antlr4-runtime:${project['antlr.version']}" + antlr("org.antlr:antlr4:${project["antlr.version"]}") + api("org.antlr:antlr4-runtime:${project["antlr.version"]}") } application { - mainClass = 'org.cqframework.cql.Main' + mainClass = "org.cqframework.cql.Main" } sourceSets { @@ -19,16 +19,16 @@ sourceSets { srcDirs = ["../../grammar"] } java { - srcDir 'build/generated/sources/antlr/main/java' + srcDir "build/generated/sources/antlr/main/java" } } } sourcesJar { - from generateGrammarSource + from(generateGrammarSource) } generateGrammarSource { outputDirectory = file("${project.buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") - arguments = ['-visitor', '-package', 'org.cqframework.cql.gen'] + arguments = ["-visitor", "-package", "org.cqframework.cql.gen"] } \ No newline at end of file diff --git a/Src/java/elm-fhir/build.gradle b/Src/java/elm-fhir/build.gradle index 3f4b66ba5..2ab8d962d 100644 --- a/Src/java/elm-fhir/build.gradle +++ b/Src/java/elm-fhir/build.gradle @@ -1,6 +1,6 @@ plugins { - id "cql.library-conventions" - id "cql.fhir-conventions" + id("cql.library-conventions") + id("cql.fhir-conventions") } ext { @@ -8,13 +8,13 @@ ext { } dependencies { - api project(':cql-to-elm') - api project(':engine') - api project(":engine-fhir") + api(project(":cql-to-elm")) + api(project(":engine")) + api(project(":engine-fhir")) - testImplementation project(':quick') - testImplementation "org.reflections:reflections:0.10.2" - testRuntimeOnly project(':model-jackson') + testImplementation(project(":quick")) + testImplementation("org.reflections:reflections:0.10.2") + testRuntimeOnly(project(":model-jackson")) } diff --git a/Src/java/elm-jackson/build.gradle b/Src/java/elm-jackson/build.gradle deleted file mode 100644 index 73bb1a2d8..000000000 --- a/Src/java/elm-jackson/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -ext { - jacksonVersion = properties['jackson.version'] -} - -dependencies { - api project(':model') - api project(':elm') - api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}" - api "com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}" -} diff --git a/Src/java/elm-jackson/build.gradle.kts b/Src/java/elm-jackson/build.gradle.kts new file mode 100644 index 000000000..e3394c46c --- /dev/null +++ b/Src/java/elm-jackson/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + val jacksonVersion = project.findProperty("jackson.version") + api(project(":model")) + api(project(":elm")) + api("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}") + api("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}") +} diff --git a/Src/java/elm-jaxb/build.gradle b/Src/java/elm-jaxb/build.gradle deleted file mode 100644 index e3f90a2ab..000000000 --- a/Src/java/elm-jaxb/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -dependencies { - api project(':elm') -} diff --git a/Src/java/elm-jaxb/build.gradle.kts b/Src/java/elm-jaxb/build.gradle.kts new file mode 100644 index 000000000..6ad735088 --- /dev/null +++ b/Src/java/elm-jaxb/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + api(project(":elm")) +} diff --git a/Src/java/elm-test/build.gradle b/Src/java/elm-test/build.gradle deleted file mode 100644 index 0e9c83526..000000000 --- a/Src/java/elm-test/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -dependencies { - implementation project(':cql-to-elm') - // implementation project(':model-jaxb') - implementation project(':elm-jaxb') - implementation project(':model-jackson') - implementation project(':elm-jackson') -} diff --git a/Src/java/elm-test/build.gradle.kts b/Src/java/elm-test/build.gradle.kts new file mode 100644 index 000000000..eca6618a4 --- /dev/null +++ b/Src/java/elm-test/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + implementation(project(":cql-to-elm")) + // implementation project(":model-jaxb") + implementation(project(":elm-jaxb")) + implementation(project(":model-jackson")) + implementation(project(":elm-jackson")) +} diff --git a/Src/java/elm/build.gradle b/Src/java/elm/build.gradle index 9791c0612..5bd098417 100644 --- a/Src/java/elm/build.gradle +++ b/Src/java/elm/build.gradle @@ -1,16 +1,16 @@ plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' + id("cql.library-conventions") + id("cql.xjc-conventions") } dependencies { - api project(':model') - testImplementation 'org.jeasy:easy-random-core:5.0.0' - testImplementation 'com.tngtech.archunit:archunit:1.2.1' + api(project(":model")) + testImplementation("org.jeasy:easy-random-core:5.0.0") + testImplementation("com.tngtech.archunit:archunit:1.2.1") } generateSources { - inputs.dir "${projectDir}/../../cql-lm/schema" + inputs.dir("${projectDir}/../../cql-lm/schema") doLast { ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/elm/library.xsd") { diff --git a/Src/java/model-jackson/build.gradle b/Src/java/model-jackson/build.gradle deleted file mode 100644 index 9f0fe1621..000000000 --- a/Src/java/model-jackson/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -ext { - jacksonVersion = project['jackson.version'] -} - -dependencies { - api project(':model') - api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}" - api "com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}" - - testImplementation project(":quick") - testImplementation project(":qdm") -} diff --git a/Src/java/model-jackson/build.gradle.kts b/Src/java/model-jackson/build.gradle.kts new file mode 100644 index 000000000..f004e6b4c --- /dev/null +++ b/Src/java/model-jackson/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + val jacksonVersion = project.findProperty("jackson.version") + api(project(":model")) + api("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}") + api("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}") + + testImplementation(project(":quick")) + testImplementation(project(":qdm")) +} diff --git a/Src/java/model-jaxb/build.gradle b/Src/java/model-jaxb/build.gradle deleted file mode 100644 index 990a7efaf..000000000 --- a/Src/java/model-jaxb/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -dependencies { - api project(':model') -} diff --git a/Src/java/model-jaxb/build.gradle.kts b/Src/java/model-jaxb/build.gradle.kts new file mode 100644 index 000000000..bc8870e71 --- /dev/null +++ b/Src/java/model-jaxb/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + api(project(":model")) +} diff --git a/Src/java/model/build.gradle b/Src/java/model/build.gradle index 1bb18cc98..a1254caf2 100644 --- a/Src/java/model/build.gradle +++ b/Src/java/model/build.gradle @@ -1,14 +1,14 @@ plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' + id("cql.library-conventions") + id("cql.xjc-conventions") } dependencies { - implementation 'org.apache.commons:commons-text:1.10.0' + implementation("org.apache.commons:commons-text:1.10.0") } generateSources { - inputs.dir "${projectDir}/../../cql-lm/schema" + inputs.dir("${projectDir}/../../cql-lm/schema") doLast { ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/model/modelinfo.xsd") { diff --git a/Src/java/qdm/build.gradle b/Src/java/qdm/build.gradle index 2047aec7c..7c6cf4fd5 100644 --- a/Src/java/qdm/build.gradle +++ b/Src/java/qdm/build.gradle @@ -1,15 +1,15 @@ plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' + id("cql.library-conventions") + id("cql.xjc-conventions") } dependencies { - api project(':elm') - api project(':model') + api(project(":elm")) + api(project(":model")) } -generateSources{ - inputs.dir "${projectDir}/schema" +generateSources { + inputs.dir("${projectDir}/schema") doLast { ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/qdm.xsd") { diff --git a/Src/java/quick/build.gradle b/Src/java/quick/build.gradle index 97275a85d..6b9a61cb2 100644 --- a/Src/java/quick/build.gradle +++ b/Src/java/quick/build.gradle @@ -1,15 +1,15 @@ plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' + id("cql.library-conventions") + id("cql.xjc-conventions") } dependencies { - api project(':elm') - api project(':model') + api(project(":elm")) + api(project(":model")) } -generateSources{ - inputs.dir "${projectDir}/schema" +generateSources { + inputs.dir("${projectDir}/schema") doLast { ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/v1.4/quick.xsd", binding: "${projectDir}/schema/v1.4/quick-binding.xjb") { diff --git a/Src/java/settings.gradle b/Src/java/settings.gradle deleted file mode 100644 index 497fe4274..000000000 --- a/Src/java/settings.gradle +++ /dev/null @@ -1,26 +0,0 @@ -rootProject.name = 'cql-all' - -include ( - 'cqf-fhir', - 'cqf-fhir-npm', - 'cql', - 'model', - 'model-jackson', - 'model-jaxb', - 'elm', - 'elm-jackson', - 'elm-jaxb', - 'elm-test', - 'engine', - 'engine-fhir', - 'qdm', - 'quick', - 'cql-to-elm', - 'cql-to-elm-cli', - 'elm-fhir', - 'tools:cql-formatter', - 'tools:cql-parsetree', - 'tools:xsd-to-modelinfo' -) - - diff --git a/Src/java/settings.gradle.kts b/Src/java/settings.gradle.kts new file mode 100644 index 000000000..bd286b8e5 --- /dev/null +++ b/Src/java/settings.gradle.kts @@ -0,0 +1,36 @@ +pluginManagement { + plugins { + kotlin("jvm") version "2.0.0" + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version ("0.5.0") +} + +rootProject.name = "cql-all" + +include( + "cqf-fhir", + "cqf-fhir-npm", + "cql", + "model", + "model-jackson", + "model-jaxb", + "elm", + "elm-jackson", + "elm-jaxb", + "elm-test", + "engine", + "engine-fhir", + "qdm", + "quick", + "cql-to-elm", + "cql-to-elm-cli", + "elm-fhir", + "tools:cql-formatter", + "tools:cql-parsetree", + "tools:xsd-to-modelinfo" +) + + diff --git a/Src/java/tools/cql-formatter/build.gradle b/Src/java/tools/cql-formatter/build.gradle index 03ade1839..b8624e711 100644 --- a/Src/java/tools/cql-formatter/build.gradle +++ b/Src/java/tools/cql-formatter/build.gradle @@ -1,15 +1,15 @@ plugins { - id 'cql.java-conventions' - id 'application' + id("cql.java-conventions") + id("application") } application { - mainClass = 'org.cqframework.cql.tools.formatter.Main' + mainClass = "org.cqframework.cql.tools.formatter.Main" } dependencies { - testImplementation project(":cql-to-elm") - implementation project(":cql") + testImplementation(project(":cql-to-elm")) + implementation(project(":cql")) } sourceSets { diff --git a/Src/java/tools/cql-parsetree/build.gradle b/Src/java/tools/cql-parsetree/build.gradle deleted file mode 100644 index 476878ea2..000000000 --- a/Src/java/tools/cql-parsetree/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'cql.java-conventions' - id 'application' -} - -application { - mainClass = 'org.cqframework.cql.tools.parsetree.Main' -} - -dependencies { - implementation project(':cql') - implementation (group: "org.antlr", name: "antlr4", version: "4.10.1") { - // antlr 4.5 includes these classes directly - exclude(group: "org.abego.treelayout", module: "org.abego.treelayout.core") - } -} \ No newline at end of file diff --git a/Src/java/tools/cql-parsetree/build.gradle.kts b/Src/java/tools/cql-parsetree/build.gradle.kts new file mode 100644 index 000000000..8475d5f02 --- /dev/null +++ b/Src/java/tools/cql-parsetree/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + id("cql.java-conventions") + id("application") +} + +application { + mainClass = "org.cqframework.cql.tools.parsetree.Main" +} + +dependencies { + implementation(project(":cql")) + implementation("org.antlr:antlr4:4.10.1") { + // antlr 4.5 includes these classes directly + exclude(group= "org.abego.treelayout", module= "org.abego.treelayout.core") + } +} \ No newline at end of file diff --git a/Src/java/tools/xsd-to-modelinfo/build.gradle b/Src/java/tools/xsd-to-modelinfo/build.gradle deleted file mode 100644 index de960982e..000000000 --- a/Src/java/tools/xsd-to-modelinfo/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'cql.java-conventions' - id 'cql.library-conventions' - id 'application' -} - -application { - mainClass = 'org.cqframework.cql.tools.xsd2modelinfo.Main' -} - -dependencies { - api project(':model') - implementation 'net.sf.jopt-simple:jopt-simple:4.7' - implementation 'org.apache.ws.xmlschema:xmlschema-core:2.2.5' - implementation 'org.apache.ws.xmlschema:xmlschema-walker:2.2.5' -} \ No newline at end of file diff --git a/Src/java/tools/xsd-to-modelinfo/build.gradle.kts b/Src/java/tools/xsd-to-modelinfo/build.gradle.kts new file mode 100644 index 000000000..e4613dc38 --- /dev/null +++ b/Src/java/tools/xsd-to-modelinfo/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + id("cql.java-conventions") + id("cql.library-conventions") + id("application") +} + +application { + mainClass = "org.cqframework.cql.tools.xsd2modelinfo.Main" +} + +dependencies { + api(project(":model")) + implementation("net.sf.jopt-simple:jopt-simple:4.7") + implementation("org.apache.ws.xmlschema:xmlschema-core:2.2.5") + implementation("org.apache.ws.xmlschema:xmlschema-walker:2.2.5") +} \ No newline at end of file From 97d8b38bbd9e5befce8113b05e86b8b0e896bdf8 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Thu, 1 Aug 2024 18:29:49 -0600 Subject: [PATCH 02/77] WIP --- Src/java/buildSrc/build.gradle.kts | 1 - .../main/groovy/cql.xjc-conventions.gradle | 69 ------------------- Src/java/buildSrc/src/main/kotlin/XjcTask.kt | 26 +++++++ .../kotlin/cql.xjc-conventions.gradle.kts | 49 +++++++++++++ Src/java/elm/build.gradle | 24 ------- Src/java/elm/build.gradle.kts | 20 ++++++ Src/java/engine-fhir/build.gradle | 33 ++++----- Src/java/model/build.gradle | 18 ----- Src/java/model/build.gradle.kts | 13 ++++ Src/java/qdm/build.gradle | 22 ------ Src/java/qdm/build.gradle.kts | 17 +++++ Src/java/quick/build.gradle | 19 ----- Src/java/quick/build.gradle.kts | 13 ++++ .../{build.gradle => build.gradle.kts} | 2 +- 14 files changed, 153 insertions(+), 173 deletions(-) delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle create mode 100644 Src/java/buildSrc/src/main/kotlin/XjcTask.kt create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts delete mode 100644 Src/java/elm/build.gradle create mode 100644 Src/java/elm/build.gradle.kts delete mode 100644 Src/java/model/build.gradle create mode 100644 Src/java/model/build.gradle.kts delete mode 100644 Src/java/qdm/build.gradle create mode 100644 Src/java/qdm/build.gradle.kts delete mode 100644 Src/java/quick/build.gradle create mode 100644 Src/java/quick/build.gradle.kts rename Src/java/tools/cql-formatter/{build.gradle => build.gradle.kts} (83%) diff --git a/Src/java/buildSrc/build.gradle.kts b/Src/java/buildSrc/build.gradle.kts index b56888079..f0d0695cf 100644 --- a/Src/java/buildSrc/build.gradle.kts +++ b/Src/java/buildSrc/build.gradle.kts @@ -1,6 +1,5 @@ plugins { `kotlin-dsl` - id("groovy-gradle-plugin") } repositories { diff --git a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle deleted file mode 100644 index a31945517..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle +++ /dev/null @@ -1,69 +0,0 @@ -plugins { - id "java" -} - -configurations { - xjc -} - -dependencies { - xjc "codes.rafael.jaxb2_commons:jaxb2-basics-ant:3.0.0" - xjc "codes.rafael.jaxb2_commons:jaxb2-basics:3.0.0" - xjc "codes.rafael.jaxb2_commons:jaxb2-fluent-api:3.0.0" - // Eclipse has taken over all Java EE reference components - // https://www.infoworld.com/article/3310042/eclipse-takes-over-all-java-ee-reference-components.html - // https://wiki.eclipse.org/Jakarta_EE_Maven_Coordinates - xjc "jakarta.xml.bind:jakarta.xml.bind-api:4.0.1" - xjc "org.glassfish.jaxb:jaxb-xjc:3.0.2" - xjc "org.glassfish.jaxb:jaxb-runtime:4.0.3" - xjc "org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2" - xjc "org.slf4j:slf4j-simple:1.7.36" - api "jakarta.xml.bind:jakarta.xml.bind-api:4.0.1" - api "codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0" -} - -ext.xjc = [ - destDir: "${buildDir}/generated/sources/$name/main/java", - args: "-disableXmlSecurity -Xfluent-api -Xequals -XhashCode -XtoString -Xsetters -Xsetters-mode=direct" -] - - -task generateSources { - - outputs.dir xjc.destDir - - doLast { - file(xjc.destDir).mkdirs() - - ant.taskdef(name: "xjc", classname: "org.jvnet.jaxb2_commons.xjc.XJC2Task", classpath: configurations.xjc.asPath) - - /* The above sets up the task, but the real work of the task should be specified in the subproject using - generateSources.doLast. For example: - generateSources.doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/path/to/file.xsd") { - arg(line: xjc.args) - } - } - */ - } -} - -compileJava { - dependsOn generateSources -} - -sourcesJar { - dependsOn generateSources -} - -sourceSets { - main { - java { - srcDir(xjc.destDir) - } - } -} - -clean { - delete xjc.destDir -} diff --git a/Src/java/buildSrc/src/main/kotlin/XjcTask.kt b/Src/java/buildSrc/src/main/kotlin/XjcTask.kt new file mode 100644 index 000000000..2ce02cabd --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/XjcTask.kt @@ -0,0 +1,26 @@ +import org.gradle.api.DefaultTask +import org.gradle.api.tasks.* +import java.io.File + +open class XjcTask : DefaultTask() { + @Input + lateinit var schemaDir: String + + @OutputDirectory + lateinit var outputDir: String + + @Input + var extraArgs : List = emptyList() + + @TaskAction + fun generate() { + val defaultArgs = listOf("-disableXmlSecurity", "-Xfluent-api", "-Xequals" ,"-XhashCode", "-XtoString" , "-Xsetters", "-Xsetters-mode=direct") + val options = listOf("-d", outputDir, schemaDir) + defaultArgs + extraArgs + + project.javaexec { + mainClass.set("com.sun.tools.xjc.XJCFacade") + classpath = project.configurations.getByName("xjc") + args = options + } + } +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts new file mode 100644 index 000000000..5611a4191 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts @@ -0,0 +1,49 @@ +plugins { + id("java-library") +} + +val xjc by configurations.creating + +dependencies { + xjc("codes.rafael.jaxb2_commons:jaxb2-basics-ant:3.0.0") + xjc("codes.rafael.jaxb2_commons:jaxb2-basics:3.0.0") + xjc("codes.rafael.jaxb2_commons:jaxb2-fluent-api:3.0.0") + // Eclipse has taken over all Java EE reference components + // https://www.infoworld.com/article/3310042/eclipse-takes-over-all-java-ee-reference-components.html + // https://wiki.eclipse.org/Jakarta_EE_Maven_Coordinates + xjc("jakarta.xml.bind:jakarta.xml.bind-api:4.0.1") + xjc("org.glassfish.jaxb:jaxb-xjc:3.0.2") + xjc("org.glassfish.jaxb:jaxb-runtime:4.0.3") + xjc("org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2") + xjc("org.slf4j:slf4j-simple:1.7.36") + xjc("org.apache.ant:ant:1.10.14") + + api("jakarta.xml.bind:jakarta.xml.bind-api:4.0.1") + api("codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0") +} + +val destDir = "${project.layout.buildDirectory}/generated/sources/$name/main/java" + +tasks.compileJava { + dependsOn(tasks.withType()) +} + +tasks.withType().configureEach { + outputDir = destDir +} + +tasks.named("sourcesJar") { + dependsOn(tasks.withType()) +} + +sourceSets { + main { + java { + srcDir(destDir) + } + } +} + +tasks.named("clean") { + delete(destDir) +} diff --git a/Src/java/elm/build.gradle b/Src/java/elm/build.gradle deleted file mode 100644 index 5bd098417..000000000 --- a/Src/java/elm/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id("cql.library-conventions") - id("cql.xjc-conventions") -} - -dependencies { - api(project(":model")) - testImplementation("org.jeasy:easy-random-core:5.0.0") - testImplementation("com.tngtech.archunit:archunit:1.2.1") -} - -generateSources { - inputs.dir("${projectDir}/../../cql-lm/schema") - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/elm/library.xsd") { - arg(line: "${xjc.args} -npa -XautoInheritance -XautoInheritance-xmlTypesExtend=org.cqframework.cql.elm.tracking.Trackable") - } - - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/elm/cqlannotations.xsd") { - arg(line: "${xjc.args} -npa") - } - } -} \ No newline at end of file diff --git a/Src/java/elm/build.gradle.kts b/Src/java/elm/build.gradle.kts new file mode 100644 index 000000000..4146b3600 --- /dev/null +++ b/Src/java/elm/build.gradle.kts @@ -0,0 +1,20 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":model")) + testImplementation("org.jeasy:easy-random-core:5.0.0") + testImplementation("com.tngtech.archunit:archunit:1.2.1") +} + +tasks.register("generateAnnotation") { + schemaDir = "${projectDir}/../../cql-lm/schema/elm/cqlannotations.xsd" + extraArgs = listOf("-npa") +} + +tasks.register("generateElm") { + schemaDir = "${projectDir}/../../cql-lm/schema/elm/library.xsd" + extraArgs = listOf("-npa", "-XautoInheritance", "-XautoInheritance-xmlTypesExtend=org.cqframework.cql.elm.tracking.Trackable") +} \ No newline at end of file diff --git a/Src/java/engine-fhir/build.gradle b/Src/java/engine-fhir/build.gradle index 3072caf70..bd0cb24f8 100644 --- a/Src/java/engine-fhir/build.gradle +++ b/Src/java/engine-fhir/build.gradle @@ -1,28 +1,23 @@ plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' - id 'cql.fhir-conventions' + id("cql.library-conventions") + id("cql.xjc-conventions") + id("cql.fhir-conventions") } dependencies { - api project(':engine') - testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.2' - testImplementation project(':cql-to-elm') - testImplementation project(':model-jackson') - testImplementation project(':elm-jackson') - testImplementation project(':quick') - testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-client' + api project(":engine") + testImplementation("org.eclipse.jetty:jetty-http:12.0.12") + testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2") + testImplementation(project(":cql-to-elm")) + testImplementation(project(":model-jackson")) + testImplementation(project(":elm-jackson")) + testImplementation(project(":quick")) + testImplementation("ca.uhn.hapi.fhir:hapi-fhir-client") } -generateSources { - inputs.dir "${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema" - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema/testSchema.xsd") { - arg(line: "${xjc.args} -npa " + - "-p org.hl7.fhirpath.tests") - } - } +tasks.register("generateSchema", XjcTask) { + schemaDir = file("${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema") + extraArgs = ["-npa", "-p", "org.hl7.fhirpath.tests"] } jacocoTestReport { diff --git a/Src/java/model/build.gradle b/Src/java/model/build.gradle deleted file mode 100644 index a1254caf2..000000000 --- a/Src/java/model/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -plugins { - id("cql.library-conventions") - id("cql.xjc-conventions") -} - -dependencies { - implementation("org.apache.commons:commons-text:1.10.0") -} - -generateSources { - inputs.dir("${projectDir}/../../cql-lm/schema") - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/model/modelinfo.xsd") { - arg(line: "${xjc.args} -npa") - } - } -} diff --git a/Src/java/model/build.gradle.kts b/Src/java/model/build.gradle.kts new file mode 100644 index 000000000..9379441dd --- /dev/null +++ b/Src/java/model/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + implementation("org.apache.commons:commons-text:1.10.0") +} + +tasks.register("generateModel") { + schemaDir = "${projectDir}/../../cql-lm/schema" + extraArgs = listOf("-npa") +} \ No newline at end of file diff --git a/Src/java/qdm/build.gradle b/Src/java/qdm/build.gradle deleted file mode 100644 index 7c6cf4fd5..000000000 --- a/Src/java/qdm/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -plugins { - id("cql.library-conventions") - id("cql.xjc-conventions") -} - -dependencies { - api(project(":elm")) - api(project(":model")) -} - -generateSources { - inputs.dir("${projectDir}/schema") - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/qdm.xsd") { - arg(line: xjc.args) - } - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/qdm.4.2.xsd") { - arg(line: xjc.args) - } - } -} \ No newline at end of file diff --git a/Src/java/qdm/build.gradle.kts b/Src/java/qdm/build.gradle.kts new file mode 100644 index 000000000..a290e9a36 --- /dev/null +++ b/Src/java/qdm/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":elm")) + api(project(":model")) +} + +tasks.register("generateQdm") { + schemaDir = "${projectDir}/schema/qdm.xsd" +} + +tasks.register("generateQmd42") { + schemaDir = "${projectDir}/schema/qdm.4.2.xsd" +} diff --git a/Src/java/quick/build.gradle b/Src/java/quick/build.gradle deleted file mode 100644 index 6b9a61cb2..000000000 --- a/Src/java/quick/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id("cql.library-conventions") - id("cql.xjc-conventions") -} - -dependencies { - api(project(":elm")) - api(project(":model")) -} - -generateSources { - inputs.dir("${projectDir}/schema") - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/v1.4/quick.xsd", binding: "${projectDir}/schema/v1.4/quick-binding.xjb") { - arg(line: xjc.args) - } - } -} diff --git a/Src/java/quick/build.gradle.kts b/Src/java/quick/build.gradle.kts new file mode 100644 index 000000000..a6e30f22a --- /dev/null +++ b/Src/java/quick/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":elm")) + api(project(":model")) +} + +tasks.register("generateQuick") { + schemaDir = "${projectDir}/schema/" +} \ No newline at end of file diff --git a/Src/java/tools/cql-formatter/build.gradle b/Src/java/tools/cql-formatter/build.gradle.kts similarity index 83% rename from Src/java/tools/cql-formatter/build.gradle rename to Src/java/tools/cql-formatter/build.gradle.kts index b8624e711..3531f740c 100644 --- a/Src/java/tools/cql-formatter/build.gradle +++ b/Src/java/tools/cql-formatter/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { sourceSets { test { resources { - srcDir "../../cql-to-elm/src/test/resources" + srcDir("../../cql-to-elm/src/test/resources") } } } \ No newline at end of file From 380ce8af2020ab6a81490f32e57f5a7643b04b81 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Thu, 1 Aug 2024 19:04:23 -0600 Subject: [PATCH 03/77] WIP --- Src/java/build.gradle.kts | 1 + Src/java/buildSrc/src/main/kotlin/XjcTask.kt | 20 +++++++---- .../kotlin/cql.xjc-conventions.gradle.kts | 3 +- Src/java/cql/build.gradle | 34 ------------------ Src/java/cql/build.gradle.kts | 35 +++++++++++++++++++ .../{build.gradle => build.gradle.kts} | 13 +------ Src/java/elm/build.gradle.kts | 4 +-- .../{build.gradle => build.gradle.kts} | 8 ++--- .../engine/{build.gradle => build.gradle.kts} | 12 +++---- Src/java/model/build.gradle.kts | 2 +- Src/java/qdm/build.gradle.kts | 6 ++-- Src/java/quick/build.gradle.kts | 3 +- 12 files changed, 71 insertions(+), 70 deletions(-) delete mode 100644 Src/java/cql/build.gradle create mode 100644 Src/java/cql/build.gradle.kts rename Src/java/elm-fhir/{build.gradle => build.gradle.kts} (65%) rename Src/java/engine-fhir/{build.gradle => build.gradle.kts} (82%) rename Src/java/engine/{build.gradle => build.gradle.kts} (66%) diff --git a/Src/java/build.gradle.kts b/Src/java/build.gradle.kts index 42a967f58..d7a2fab5c 100644 --- a/Src/java/build.gradle.kts +++ b/Src/java/build.gradle.kts @@ -9,6 +9,7 @@ repositories { dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") } + kotlin { jvmToolchain(11) } \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/XjcTask.kt b/Src/java/buildSrc/src/main/kotlin/XjcTask.kt index 2ce02cabd..c3d12b321 100644 --- a/Src/java/buildSrc/src/main/kotlin/XjcTask.kt +++ b/Src/java/buildSrc/src/main/kotlin/XjcTask.kt @@ -1,21 +1,29 @@ import org.gradle.api.DefaultTask import org.gradle.api.tasks.* -import java.io.File open class XjcTask : DefaultTask() { @Input - lateinit var schemaDir: String + lateinit var schema: String + + @Input + var extraArgs : List = emptyList() + + @Input + var binding: String = "" @OutputDirectory lateinit var outputDir: String - @Input - var extraArgs : List = emptyList() @TaskAction fun generate() { - val defaultArgs = listOf("-disableXmlSecurity", "-Xfluent-api", "-Xequals" ,"-XhashCode", "-XtoString" , "-Xsetters", "-Xsetters-mode=direct") - val options = listOf("-d", outputDir, schemaDir) + defaultArgs + extraArgs + var bindingArgs : List = emptyList(); + if (binding.isNotBlank()) { + bindingArgs = listOf("-b", binding) + } + + val defaultArgs = listOf("-quiet", "-disableXmlSecurity", "-Xfluent-api", "-Xequals" ,"-XhashCode", "-XtoString" , "-Xsetters", "-Xsetters-mode=direct") + val options = listOf("-d", outputDir, schema) + bindingArgs + defaultArgs + extraArgs project.javaexec { mainClass.set("com.sun.tools.xjc.XJCFacade") diff --git a/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts index 5611a4191..9ab5ad518 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts @@ -22,7 +22,8 @@ dependencies { api("codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0") } -val destDir = "${project.layout.buildDirectory}/generated/sources/$name/main/java" +var buildDir = project.layout.buildDirectory.get().toString() +val destDir = "${buildDir}/generated/sources/$name/main/java" tasks.compileJava { dependsOn(tasks.withType()) diff --git a/Src/java/cql/build.gradle b/Src/java/cql/build.gradle deleted file mode 100644 index e58ae9cbb..000000000 --- a/Src/java/cql/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -plugins { - id("cql.java-conventions") - id("application") - id("antlr") -} - -dependencies { - antlr("org.antlr:antlr4:${project["antlr.version"]}") - api("org.antlr:antlr4-runtime:${project["antlr.version"]}") -} - -application { - mainClass = "org.cqframework.cql.Main" -} - -sourceSets { - main { - antlr { - srcDirs = ["../../grammar"] - } - java { - srcDir "build/generated/sources/antlr/main/java" - } - } -} - -sourcesJar { - from(generateGrammarSource) -} - -generateGrammarSource { - outputDirectory = file("${project.buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") - arguments = ["-visitor", "-package", "org.cqframework.cql.gen"] -} \ No newline at end of file diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts new file mode 100644 index 000000000..9c8b61d41 --- /dev/null +++ b/Src/java/cql/build.gradle.kts @@ -0,0 +1,35 @@ +plugins { + id("cql.java-conventions") + id("application") + id("antlr") +} + +dependencies { + antlr("org.antlr:antlr4:${project.findProperty("antlr.version")}") + api("org.antlr:antlr4-runtime:${project.findProperty("antlr.version")}") +} + +application { + mainClass = "org.cqframework.cql.Main" +} + +sourceSets { + main { + antlr { + srcDir("../../grammar") + } + java { + srcDir("build/generated/sources/antlr/main/java") + } + } +} + +tasks.sourcesJar { + from(tasks.generateGrammarSource) +} + +tasks.generateGrammarSource { + val buildDir = project.layout.buildDirectory.get().toString() + outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") + arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") +} \ No newline at end of file diff --git a/Src/java/elm-fhir/build.gradle b/Src/java/elm-fhir/build.gradle.kts similarity index 65% rename from Src/java/elm-fhir/build.gradle rename to Src/java/elm-fhir/build.gradle.kts index 2ab8d962d..4e3eaf320 100644 --- a/Src/java/elm-fhir/build.gradle +++ b/Src/java/elm-fhir/build.gradle.kts @@ -3,10 +3,6 @@ plugins { id("cql.fhir-conventions") } -ext { - mapstructVersion = "1.4.2.Final" -} - dependencies { api(project(":cql-to-elm")) api(project(":engine")) @@ -15,11 +11,4 @@ dependencies { testImplementation(project(":quick")) testImplementation("org.reflections:reflections:0.10.2") testRuntimeOnly(project(":model-jackson")) - -} - -tasks.withType(JavaCompile) { - options.compilerArgs = [ - "-Amapstruct.suppressGeneratorTimestamp=true" - ] -} +} \ No newline at end of file diff --git a/Src/java/elm/build.gradle.kts b/Src/java/elm/build.gradle.kts index 4146b3600..8a7521a74 100644 --- a/Src/java/elm/build.gradle.kts +++ b/Src/java/elm/build.gradle.kts @@ -10,11 +10,11 @@ dependencies { } tasks.register("generateAnnotation") { - schemaDir = "${projectDir}/../../cql-lm/schema/elm/cqlannotations.xsd" + schema = "${projectDir}/../../cql-lm/schema/elm/cqlannotations.xsd" extraArgs = listOf("-npa") } tasks.register("generateElm") { - schemaDir = "${projectDir}/../../cql-lm/schema/elm/library.xsd" + schema = "${projectDir}/../../cql-lm/schema/elm/library.xsd" extraArgs = listOf("-npa", "-XautoInheritance", "-XautoInheritance-xmlTypesExtend=org.cqframework.cql.elm.tracking.Trackable") } \ No newline at end of file diff --git a/Src/java/engine-fhir/build.gradle b/Src/java/engine-fhir/build.gradle.kts similarity index 82% rename from Src/java/engine-fhir/build.gradle rename to Src/java/engine-fhir/build.gradle.kts index bd0cb24f8..7b50df08e 100644 --- a/Src/java/engine-fhir/build.gradle +++ b/Src/java/engine-fhir/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } dependencies { - api project(":engine") + api(project(":engine")) testImplementation("org.eclipse.jetty:jetty-http:12.0.12") testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2") testImplementation(project(":cql-to-elm")) @@ -15,9 +15,9 @@ dependencies { testImplementation("ca.uhn.hapi.fhir:hapi-fhir-client") } -tasks.register("generateSchema", XjcTask) { - schemaDir = file("${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema") - extraArgs = ["-npa", "-p", "org.hl7.fhirpath.tests"] +tasks.register("generateFhirPathTests") { + schema = "${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema" + extraArgs = listOf("-npa", "-p", "org.hl7.fhirpath.tests") } jacocoTestReport { diff --git a/Src/java/engine/build.gradle b/Src/java/engine/build.gradle.kts similarity index 66% rename from Src/java/engine/build.gradle rename to Src/java/engine/build.gradle.kts index 03212da9a..3880de56d 100644 --- a/Src/java/engine/build.gradle +++ b/Src/java/engine/build.gradle.kts @@ -1,14 +1,14 @@ plugins { - id 'cql.library-conventions' + id("cql.library-conventions") } dependencies { - api project(':elm') - api project(':cql-to-elm') + api(project(":elm")) + api(project(":cql-to-elm")) - testImplementation project(':model-jackson') - testImplementation project(':elm-jackson') - testImplementation 'org.mockito:mockito-core:5.4.0' + testImplementation(project(":model-jackson")) + testImplementation(project(":elm-jackson")) + testImplementation("org.mockito:mockito-core:5.4.0") } jacocoTestReport { diff --git a/Src/java/model/build.gradle.kts b/Src/java/model/build.gradle.kts index 9379441dd..000653e85 100644 --- a/Src/java/model/build.gradle.kts +++ b/Src/java/model/build.gradle.kts @@ -8,6 +8,6 @@ dependencies { } tasks.register("generateModel") { - schemaDir = "${projectDir}/../../cql-lm/schema" + schema = "${projectDir}/../../cql-lm/schema" extraArgs = listOf("-npa") } \ No newline at end of file diff --git a/Src/java/qdm/build.gradle.kts b/Src/java/qdm/build.gradle.kts index a290e9a36..16fa5038d 100644 --- a/Src/java/qdm/build.gradle.kts +++ b/Src/java/qdm/build.gradle.kts @@ -9,9 +9,9 @@ dependencies { } tasks.register("generateQdm") { - schemaDir = "${projectDir}/schema/qdm.xsd" + schema = "${projectDir}/schema/qdm.xsd" } -tasks.register("generateQmd42") { - schemaDir = "${projectDir}/schema/qdm.4.2.xsd" +tasks.register("generateQdm42") { + schema = "${projectDir}/schema/qdm.4.2.xsd" } diff --git a/Src/java/quick/build.gradle.kts b/Src/java/quick/build.gradle.kts index a6e30f22a..32e82ad6a 100644 --- a/Src/java/quick/build.gradle.kts +++ b/Src/java/quick/build.gradle.kts @@ -9,5 +9,6 @@ dependencies { } tasks.register("generateQuick") { - schemaDir = "${projectDir}/schema/" + schema = "${projectDir}/schema/v1.4/quick.xsd" + binding = "${projectDir}/schema/v1.4/quick-binding.xjb" } \ No newline at end of file From d6b8c82a532ace280b5938e3e75c6b4b52cd1558 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Thu, 1 Aug 2024 20:03:37 -0600 Subject: [PATCH 04/77] Working? --- .../src/main/kotlin/cql.fhir-conventions.gradle.kts | 6 +++--- Src/java/cql/build.gradle.kts | 13 +++++++------ Src/java/engine-fhir/build.gradle.kts | 3 +-- Src/java/gradle.properties | 3 +-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts index 844d11a8e..3e6e69e4c 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts @@ -6,9 +6,9 @@ plugins { configurations.all { resolutionStrategy { eachDependency { - if (requested.group == "org.eclipse.jetty" && requested.name == "jetty-continuation") { - useTarget("org.eclipse.jetty:jetty-continuation:9.4.55.v20240627") - because("version 12 jetty-continuation doesn't exist. There's a bug in the bom.") + if (requested.group == "org.eclipse.jetty") { + useVersion("11.0.20") + because("jetty 12 is java 17") } } } diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 9c8b61d41..57c3c4f91 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -5,8 +5,9 @@ plugins { } dependencies { - antlr("org.antlr:antlr4:${project.findProperty("antlr.version")}") - api("org.antlr:antlr4-runtime:${project.findProperty("antlr.version")}") + val version = project.findProperty("antlr.version") + antlr("org.antlr:antlr4:${version}") + api("org.antlr:antlr4-runtime:${version}") } application { @@ -24,12 +25,12 @@ sourceSets { } } -tasks.sourcesJar { - from(tasks.generateGrammarSource) -} - tasks.generateGrammarSource { val buildDir = project.layout.buildDirectory.get().toString() outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") +} + +tasks.sourcesJar { + from(tasks.generateGrammarSource) } \ No newline at end of file diff --git a/Src/java/engine-fhir/build.gradle.kts b/Src/java/engine-fhir/build.gradle.kts index 7b50df08e..6834ae99d 100644 --- a/Src/java/engine-fhir/build.gradle.kts +++ b/Src/java/engine-fhir/build.gradle.kts @@ -6,8 +6,7 @@ plugins { dependencies { api(project(":engine")) - testImplementation("org.eclipse.jetty:jetty-http:12.0.12") - testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2") + testImplementation("org.wiremock:wiremock:3.9.1") testImplementation(project(":cql-to-elm")) testImplementation(project(":model-jackson")) testImplementation(project(":elm-jackson")) diff --git a/Src/java/gradle.properties b/Src/java/gradle.properties index 90e587659..6758f239f 100644 --- a/Src/java/gradle.properties +++ b/Src/java/gradle.properties @@ -1,11 +1,10 @@ org.gradle.caching=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx4096m - group=info.cqframework version=3.16.0-SNAPSHOT specification.version=1.5.2 hapi.version=7.4.0 jackson.version=2.16.1 antlr.version=4.13.1 -android.api.level=28 +android.api.level=28 \ No newline at end of file From 5f6df9add5c25a8b41b2e24d3692cd133166701a Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Fri, 13 Sep 2024 13:28:19 -0600 Subject: [PATCH 05/77] Fix usage of Java 17 API --- .../test/java/org/cqframework/cql/cql2elm/TranslationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TranslationTests.java b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TranslationTests.java index afcfa35f5..85cb2a424 100644 --- a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TranslationTests.java +++ b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TranslationTests.java @@ -387,7 +387,7 @@ void abstractClassNotRetrievable() throws IOException { final CqlTranslator translator = TestUtils.runSemanticTest("abstractClassNotRetrievable.cql", 1); final List errors = translator.getErrors(); final List errorMessages = - errors.stream().map(Throwable::getMessage).toList(); + errors.stream().map(Throwable::getMessage).collect(Collectors.toList()); assertThat(errorMessages, contains("Specified data type DomainResource does not support retrieval.")); } } From 7f8814f31805ad6fe2bcbbd62b6d9e5b4a9f1a18 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Fri, 13 Sep 2024 14:29:50 -0600 Subject: [PATCH 06/77] Update checkstyle rules --- .../buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts | 4 ++++ Src/java/cql/build.gradle.kts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts index 9af4fc308..828c5fa0e 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts @@ -13,6 +13,10 @@ dependencies { errorprone("com.google.errorprone:error_prone_core:2.29.2") } +tasks.named("checkstyleMain") { + exclude("generated/**/*.*") +} + tasks.named("checkstyleTest") { enabled = false } diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 57c3c4f91..a3b47213c 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -26,7 +26,7 @@ sourceSets { } tasks.generateGrammarSource { - val buildDir = project.layout.buildDirectory.get().toString() + val buildDir = layout.buildDirectory.get().toString() outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") } From d0538b0af59a3de517c27641da87fa0707283671 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Fri, 13 Sep 2024 15:50:11 -0600 Subject: [PATCH 07/77] Fix static analysis --- .../buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts | 1 - .../src/main/kotlin/cql.library-conventions.gradle.kts | 4 ++++ .../buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts | 2 +- Src/java/cql/build.gradle.kts | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts index 3e6e69e4c..236198ee0 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts @@ -14,7 +14,6 @@ configurations.all { } } - dependencies { api(platform("ca.uhn.hapi.fhir:hapi-fhir-bom:${project.findProperty("hapi.version")}")) diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts index f5fb14a61..de9c27441 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -9,4 +9,8 @@ plugins { dependencies { // Various libraries for Android signatures are available, Jackson uses this one signature("com.toasttab.android:gummy-bears-api-${project.findProperty("android.api.level")}:0.5.0@signature") +} + +animalsniffer { + sourceSets.removeIf { it.name != "main" } } \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts index 828c5fa0e..c9a6a4be4 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts @@ -14,7 +14,7 @@ dependencies { } tasks.named("checkstyleMain") { - exclude("generated/**/*.*") + exclude { it.file.path.contains("generated")} } tasks.named("checkstyleTest") { diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index a3b47213c..03e9b5d06 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -17,7 +17,7 @@ application { sourceSets { main { antlr { - srcDir("../../grammar") + srcDirs("../../grammar") } java { srcDir("build/generated/sources/antlr/main/java") From 64faae30e3edd8c9adb0fb6eaa62e0b43d4377cb Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Sat, 14 Sep 2024 18:24:22 -0600 Subject: [PATCH 08/77] Updates to src dirs --- Src/java/cql/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 03e9b5d06..c1c85678a 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -17,7 +17,8 @@ application { sourceSets { main { antlr { - srcDirs("../../grammar") + srcDirs.clear() + srcDir("../../grammar") } java { srcDir("build/generated/sources/antlr/main/java") From d3dd7fb0c8a901e3c7f2524dbbc88452150ab875 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Sat, 14 Sep 2024 18:59:05 -0600 Subject: [PATCH 09/77] Fixing up missing test sourceSet --- .../src/main/kotlin/cql.library-conventions.gradle.kts | 7 ++++++- Src/java/cql/build.gradle.kts | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts index de9c27441..cc69debf9 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -12,5 +12,10 @@ dependencies { } animalsniffer { - sourceSets.removeIf { it.name != "main" } + sourceSets { + val test by getting { + java.setSrcDirs(emptyList()) + resources.setSrcDirs(emptyList()) + } + } } \ No newline at end of file diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index c1c85678a..a3b47213c 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -17,7 +17,6 @@ application { sourceSets { main { antlr { - srcDirs.clear() srcDir("../../grammar") } java { From 1e7806d62ba3bc7565f291461182c09917f86ba5 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Sun, 15 Sep 2024 16:52:55 -0600 Subject: [PATCH 10/77] Try another way to specify the antlr directory --- Src/java/cql/build.gradle.kts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index a3b47213c..08845386a 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -16,9 +16,6 @@ application { sourceSets { main { - antlr { - srcDir("../../grammar") - } java { srcDir("build/generated/sources/antlr/main/java") } @@ -26,6 +23,7 @@ sourceSets { } tasks.generateGrammarSource { + source = fileTree("../../grammar") val buildDir = layout.buildDirectory.get().toString() outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") From a35bb71146b768df3d70e3d6aa5b76d5ef6e1590 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Sun, 15 Sep 2024 17:11:13 -0600 Subject: [PATCH 11/77] Third different way --- Src/java/cql/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 08845386a..78af388e3 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -23,7 +23,7 @@ sourceSets { } tasks.generateGrammarSource { - source = fileTree("../../grammar") + source(file("../../grammar").absolutePath) val buildDir = layout.buildDirectory.get().toString() outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") From e7a0edd16ec845d5cbc037398343374cdd12da0a Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Sun, 15 Sep 2024 17:16:11 -0600 Subject: [PATCH 12/77] Add some logging --- Src/java/cql/build.gradle.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 78af388e3..fd465e708 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -23,7 +23,9 @@ sourceSets { } tasks.generateGrammarSource { - source(file("../../grammar").absolutePath) + val path = file("../../grammar").absolutePath + logger.error(path) + source(path) val buildDir = layout.buildDirectory.get().toString() outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") From 78070d471dce61b200e00bacb9ab4bf5bc3b24a6 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Mon, 16 Sep 2024 15:36:38 -0600 Subject: [PATCH 13/77] merge master --- Src/java/engine-fhir/build.gradle.kts | 2 +- Src/java/engine/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/java/engine-fhir/build.gradle.kts b/Src/java/engine-fhir/build.gradle.kts index 6834ae99d..9139bf9b7 100644 --- a/Src/java/engine-fhir/build.gradle.kts +++ b/Src/java/engine-fhir/build.gradle.kts @@ -19,7 +19,7 @@ tasks.register("generateFhirPathTests") { extraArgs = listOf("-npa", "-p", "org.hl7.fhirpath.tests") } -jacocoTestReport { +tasks.jacocoTestReport { sourceDirectories.setFrom(files( "${projectDir}/../elm/src/main/java", "${projectDir}/../cql-to-elm/src/main/java", diff --git a/Src/java/engine/build.gradle.kts b/Src/java/engine/build.gradle.kts index 3880de56d..1e68e05e0 100644 --- a/Src/java/engine/build.gradle.kts +++ b/Src/java/engine/build.gradle.kts @@ -11,7 +11,7 @@ dependencies { testImplementation("org.mockito:mockito-core:5.4.0") } -jacocoTestReport { +tasks.jacocoTestReport { sourceDirectories.setFrom(files( "${projectDir}/../elm/src/main/java", "${projectDir}/../cql-to-elm/src/main/java", From 76360e2c489cd3035b22991d87a365370680c907 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 09:54:43 -0600 Subject: [PATCH 14/77] Change toolchain resolution --- Src/java/settings.gradle.kts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Src/java/settings.gradle.kts b/Src/java/settings.gradle.kts index bd286b8e5..3dfe28140 100644 --- a/Src/java/settings.gradle.kts +++ b/Src/java/settings.gradle.kts @@ -4,10 +4,6 @@ pluginManagement { } } -plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version ("0.5.0") -} - rootProject.name = "cql-all" include( From b66739a1220eaa08232757e4c0a79d0d0f2e6856 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 10:19:43 -0600 Subject: [PATCH 15/77] Fix tests --- .../src/main/kotlin/cql.library-conventions.gradle.kts | 9 --------- Src/java/settings.gradle.kts | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts index cc69debf9..f5fb14a61 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -9,13 +9,4 @@ plugins { dependencies { // Various libraries for Android signatures are available, Jackson uses this one signature("com.toasttab.android:gummy-bears-api-${project.findProperty("android.api.level")}:0.5.0@signature") -} - -animalsniffer { - sourceSets { - val test by getting { - java.setSrcDirs(emptyList()) - resources.setSrcDirs(emptyList()) - } - } } \ No newline at end of file diff --git a/Src/java/settings.gradle.kts b/Src/java/settings.gradle.kts index 3dfe28140..7c2695d5b 100644 --- a/Src/java/settings.gradle.kts +++ b/Src/java/settings.gradle.kts @@ -1,6 +1,6 @@ pluginManagement { plugins { - kotlin("jvm") version "2.0.0" + kotlin("jvm") version "2.0.20" } } From 92631bc4381e8e9680e62ee6ed08666f48e196e9 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 12:57:01 -0600 Subject: [PATCH 16/77] More tweaks to animalsniffer --- .../src/main/kotlin/cql.library-conventions.gradle.kts | 4 ++++ .../java/org/cqframework/fhir/utilities/IGContext.java | 8 ++++---- .../org/cqframework/fhir/utilities/LoggerAdapter.java | 4 ++-- .../org/cqframework/fhir/utilities/TestIGContext.java | 5 +++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts index f5fb14a61..0d17e8b3b 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -9,4 +9,8 @@ plugins { dependencies { // Various libraries for Android signatures are available, Jackson uses this one signature("com.toasttab.android:gummy-bears-api-${project.findProperty("android.api.level")}:0.5.0@signature") +} + +tasks.animalsnifferTest { + enabled = false } \ No newline at end of file diff --git a/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java b/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java index 2fa6178e9..28bbfe48b 100644 --- a/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java +++ b/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java @@ -9,7 +9,7 @@ import org.hl7.fhir.convertors.conv30_50.VersionConvertor_30_50; import org.hl7.fhir.convertors.conv40_50.VersionConvertor_40_50; import org.hl7.fhir.exceptions.FHIRException; -import org.hl7.fhir.r5.context.IWorkerContext; +import org.hl7.fhir.r5.context.ILoggingService; import org.hl7.fhir.r5.elementmodel.Manager; import org.hl7.fhir.r5.model.ImplementationGuide; import org.hl7.fhir.utilities.IniFile; @@ -19,9 +19,9 @@ public class IGContext { - private IWorkerContext.ILoggingService logger; + private ILoggingService logger; - public IWorkerContext.ILoggingService getLogger() { + public ILoggingService getLogger() { return logger; } @@ -65,7 +65,7 @@ protected void setBinaryPaths(List binaryPaths) { this.binaryPaths = binaryPaths; } - public IGContext(IWorkerContext.ILoggingService logger) { + public IGContext(ILoggingService logger) { this.logger = logger; } diff --git a/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/LoggerAdapter.java b/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/LoggerAdapter.java index 6e856d2b9..0616041b5 100644 --- a/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/LoggerAdapter.java +++ b/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/LoggerAdapter.java @@ -1,9 +1,9 @@ package org.cqframework.fhir.utilities; -import org.hl7.fhir.r5.context.IWorkerContext; +import org.hl7.fhir.r5.context.ILoggingService; import org.slf4j.Logger; -public class LoggerAdapter implements IWorkerContext.ILoggingService { +public class LoggerAdapter implements ILoggingService { private Logger innerLogger; public LoggerAdapter(Logger innerLogger) { diff --git a/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java b/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java index f91782b36..1d35a03f7 100644 --- a/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java +++ b/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java @@ -6,10 +6,11 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; -import org.hl7.fhir.r5.context.IWorkerContext; + +import org.hl7.fhir.r5.context.ILoggingService; import org.junit.jupiter.api.Test; -public class TestIGContext implements IWorkerContext.ILoggingService { +public class TestIGContext implements ILoggingService { @Test void typesAndValuesIG() throws URISyntaxException { From f4749f2b18e0f4005370177c821b7a42d6d77a58 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 13:00:24 -0600 Subject: [PATCH 17/77] Fix formatting --- .../test/java/org/cqframework/fhir/utilities/TestIGContext.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java b/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java index 1d35a03f7..ca590f9bf 100644 --- a/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java +++ b/Src/java/cqf-fhir/src/test/java/org/cqframework/fhir/utilities/TestIGContext.java @@ -6,7 +6,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URL; - import org.hl7.fhir.r5.context.ILoggingService; import org.junit.jupiter.api.Test; From 3a2b2cb246f256da6538456bd4b87e68b4d21176 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 13:16:16 -0600 Subject: [PATCH 18/77] Trying random stuff --- Src/java/cql/build.gradle.kts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index fd465e708..c1c85678a 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -16,6 +16,10 @@ application { sourceSets { main { + antlr { + srcDirs.clear() + srcDir("../../grammar") + } java { srcDir("build/generated/sources/antlr/main/java") } @@ -23,9 +27,6 @@ sourceSets { } tasks.generateGrammarSource { - val path = file("../../grammar").absolutePath - logger.error(path) - source(path) val buildDir = layout.buildDirectory.get().toString() outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") From 5a4035c3d3f6b79d666afc7ecd362482be875be2 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 13:18:24 -0600 Subject: [PATCH 19/77] More random stuff --- Src/java/cql/build.gradle.kts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index c1c85678a..0df27595c 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -17,8 +17,7 @@ application { sourceSets { main { antlr { - srcDirs.clear() - srcDir("../../grammar") + setSrcDirs(listOf("../../grammar")) } java { srcDir("build/generated/sources/antlr/main/java") From a37cb7561704c6ad917916588a196ce33758fccc Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 15:42:19 -0600 Subject: [PATCH 20/77] Add Kotlin static analysis and formatting --- Src/java/buildSrc/build.gradle.kts | 4 +- .../kotlin/cql.kotlin-conventions.gradle.kts | 19 +++ .../kotlin/cql.library-conventions.gradle.kts | 1 + Src/java/cql/build.gradle.kts | 7 +- .../java/org/cqframework/cql/Application.kt | 25 +++ .../main/java/org/cqframework/cql/Main.java | 33 ---- Src/java/elm/build.gradle.kts | 4 + .../elm/visiting/BaseElmLibraryVisitor.java | 149 ------------------ .../cql/elm/visiting/BaseElmLibraryVisitor.kt | 132 ++++++++++++++++ 9 files changed, 190 insertions(+), 184 deletions(-) create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts create mode 100644 Src/java/cql/src/main/java/org/cqframework/cql/Application.kt delete mode 100644 Src/java/cql/src/main/java/org/cqframework/cql/Main.java delete mode 100644 Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.java create mode 100644 Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt diff --git a/Src/java/buildSrc/build.gradle.kts b/Src/java/buildSrc/build.gradle.kts index f0d0695cf..2970b3396 100644 --- a/Src/java/buildSrc/build.gradle.kts +++ b/Src/java/buildSrc/build.gradle.kts @@ -8,8 +8,10 @@ repositories { } dependencies { + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20") + implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.3") implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0") implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.0") implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14") - implementation("com.diffplug.spotless:spotless-plugin-gradle:6.23.3") + implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0") } \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts new file mode 100644 index 000000000..b26e0bb74 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts @@ -0,0 +1,19 @@ +import gradle.kotlin.dsl.accessors._2d946b1c62c86c83708f6e287986eee0.implementation +import gradle.kotlin.dsl.accessors._2d946b1c62c86c83708f6e287986eee0.spotless + +plugins { + kotlin("jvm") + id("com.diffplug.spotless") + id("io.gitlab.arturbosch.detekt") +} + +spotless { + kotlin { + ktfmt().kotlinlangStyle() + } +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") +} + diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts index 0d17e8b3b..d40d4cb18 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -4,6 +4,7 @@ plugins { id("java-library") id("ru.vyarus.animalsniffer") id("cql.java-conventions") + id("cql.kotlin-conventions") } dependencies { diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 0df27595c..82bd01530 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("cql.java-conventions") + id("cql.kotlin-conventions") id("application") id("antlr") } @@ -11,7 +12,7 @@ dependencies { } application { - mainClass = "org.cqframework.cql.Main" + mainClass = "org.cqframework.cql.Application" } sourceSets { @@ -33,4 +34,8 @@ tasks.generateGrammarSource { tasks.sourcesJar { from(tasks.generateGrammarSource) +} + +tasks.compileKotlin { + dependsOn(tasks.generateGrammarSource) } \ No newline at end of file diff --git a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt new file mode 100644 index 000000000..cdf094a6b --- /dev/null +++ b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt @@ -0,0 +1,25 @@ +package org.cqframework.cql + +import java.io.FileInputStream +import org.antlr.v4.runtime.CharStreams +import org.antlr.v4.runtime.CommonTokenStream +import org.cqframework.cql.gen.cqlLexer +import org.cqframework.cql.gen.cqlParser + +object Application { + fun main(args: Array) { + val inputFile = args.getOrNull(0) + val stream = inputFile?.let { FileInputStream(it) } ?: System.`in` + + val chars = CharStreams.fromStream(stream) + val lexer = cqlLexer(chars) + val tokens = CommonTokenStream(lexer) + val parser = cqlParser(tokens) + + parser.buildParseTree = true + val tree = parser.library() + + // show tree in text form + println(tree.toStringTree(parser)) + } +} diff --git a/Src/java/cql/src/main/java/org/cqframework/cql/Main.java b/Src/java/cql/src/main/java/org/cqframework/cql/Main.java deleted file mode 100644 index cd9e6ff3a..000000000 --- a/Src/java/cql/src/main/java/org/cqframework/cql/Main.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.cqframework.cql; - -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; -import org.antlr.v4.runtime.tree.ParseTree; -import org.cqframework.cql.gen.cqlLexer; -import org.cqframework.cql.gen.cqlParser; - -public class Main { - public static void main(String[] args) throws IOException { - String inputFile = null; - if (args.length > 0) { - inputFile = args[0]; - } - InputStream is = System.in; - if (inputFile != null) { - is = new FileInputStream(inputFile); - } - CharStream input = CharStreams.fromStream(is); - cqlLexer lexer = new cqlLexer(input); - CommonTokenStream tokens = new CommonTokenStream(lexer); - cqlParser parser = new cqlParser(tokens); - parser.setBuildParseTree(true); - ParseTree tree = parser.library(); - - // show tree in text form - System.out.println(tree.toStringTree(parser)); - } -} diff --git a/Src/java/elm/build.gradle.kts b/Src/java/elm/build.gradle.kts index 8a7521a74..b1ee2dafd 100644 --- a/Src/java/elm/build.gradle.kts +++ b/Src/java/elm/build.gradle.kts @@ -17,4 +17,8 @@ tasks.register("generateAnnotation") { tasks.register("generateElm") { schema = "${projectDir}/../../cql-lm/schema/elm/library.xsd" extraArgs = listOf("-npa", "-XautoInheritance", "-XautoInheritance-xmlTypesExtend=org.cqframework.cql.elm.tracking.Trackable") +} + +tasks.compileKotlin { + dependsOn("generateAnnotation", "generateElm") } \ No newline at end of file diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.java b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.java deleted file mode 100644 index 9cf418c0c..000000000 --- a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.java +++ /dev/null @@ -1,149 +0,0 @@ -package org.cqframework.cql.elm.visiting; - -import org.hl7.elm.r1.*; - -/** - * Created by Bryn on 4/14/2016. - */ -public abstract class BaseElmLibraryVisitor extends BaseElmClinicalVisitor - implements ElmLibraryVisitor { - - /** - * Visit an Element in an ELM tree. This method will be called for - * every node in the tree that is a descendant of the Element type. - * - * @param elm the ELM tree - * @param context the context passed to the visitor - * @return the visitor result - */ - @Override - public T visitElement(Element elm, C context) { - if (elm instanceof IncludeDef) return visitIncludeDef((IncludeDef) elm, context); - else if (elm instanceof ContextDef) return visitContextDef((ContextDef) elm, context); - else if (elm instanceof Library) return visitLibrary((Library) elm, context); - else if (elm instanceof UsingDef) return visitUsingDef((UsingDef) elm, context); - else return super.visitElement(elm, context); - } - - /** - * Visit a Library. This method will be called for - * every node in the tree that is a Library. - * - * @param elm the ELM tree - * @param context the context passed to the visitor - * @return the visitor result - */ - public T visitLibrary(Library elm, C context) { - T result = visitFields(elm, context); - if (elm.getUsings() != null - && elm.getUsings().getDef() != null - && !elm.getUsings().getDef().isEmpty()) { - for (UsingDef def : elm.getUsings().getDef()) { - T childResult = visitUsingDef(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getIncludes() != null - && elm.getIncludes().getDef() != null - && !elm.getIncludes().getDef().isEmpty()) { - for (IncludeDef def : elm.getIncludes().getDef()) { - T childResult = visitIncludeDef(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getCodeSystems() != null - && elm.getCodeSystems().getDef() != null - && !elm.getCodeSystems().getDef().isEmpty()) { - for (CodeSystemDef def : elm.getCodeSystems().getDef()) { - T childResult = visitCodeSystemDef(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getValueSets() != null - && elm.getValueSets().getDef() != null - && !elm.getValueSets().getDef().isEmpty()) { - for (ValueSetDef def : elm.getValueSets().getDef()) { - T childResult = visitValueSetDef(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getCodes() != null - && elm.getCodes().getDef() != null - && !elm.getCodes().getDef().isEmpty()) { - for (CodeDef def : elm.getCodes().getDef()) { - T childResult = visitElement(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getConcepts() != null - && elm.getConcepts().getDef() != null - && !elm.getConcepts().getDef().isEmpty()) { - for (ConceptDef def : elm.getConcepts().getDef()) { - T childResult = visitConceptDef(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getParameters() != null - && elm.getParameters().getDef() != null - && !elm.getParameters().getDef().isEmpty()) { - for (ParameterDef def : elm.getParameters().getDef()) { - T childResult = visitParameterDef(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getContexts() != null - && elm.getContexts().getDef() != null - && !elm.getContexts().getDef().isEmpty()) { - for (ContextDef def : elm.getContexts().getDef()) { - T childResult = visitContextDef(def, context); - result = aggregateResult(result, childResult); - } - } - if (elm.getStatements() != null - && elm.getStatements().getDef() != null - && !elm.getStatements().getDef().isEmpty()) { - for (ExpressionDef def : elm.getStatements().getDef()) { - T childResult = visitExpressionDef(def, context); - result = aggregateResult(result, childResult); - } - } - - return result; - } - - /** - * Visit a UsingDef. This method will be called for - * every node in the tree that is a UsingDef. - * - * @param elm the ELM tree - * @param context the context passed to the visitor - * @return the visitor result - */ - public T visitUsingDef(UsingDef elm, C context) { - return visitFields(elm, context); - } - - /** - * Visit a IncludeDef. This method will be called for - * every node in the tree that is a IncludeDef. - * - * @param elm the ELM tree - * @param context the context passed to the visitor - * @return the visitor result - */ - public T visitIncludeDef(IncludeDef elm, C context) { - return visitFields(elm, context); - } - - /** - * Visit a ContextDef. This method will be called for - * every node in the tree that is a ContextDef. - * - * @param elm the ELM tree - * @param context the context passed to the visitor - * @return the visitor result - */ - public T visitContextDef(ContextDef elm, C context) { - return visitFields(elm, context); - } -} diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt new file mode 100644 index 000000000..6f0022319 --- /dev/null +++ b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt @@ -0,0 +1,132 @@ +package org.cqframework.cql.elm.visiting + +import org.hl7.elm.r1.ContextDef +import org.hl7.elm.r1.Element +import org.hl7.elm.r1.IncludeDef +import org.hl7.elm.r1.Library +import org.hl7.elm.r1.UsingDef + +/** Created by Bryn on 4/14/2016. */ +abstract class BaseElmLibraryVisitor : + BaseElmClinicalVisitor(), ElmLibraryVisitor { + /** + * Visit an Element in an ELM tree. This method will be called for every node in the tree that + * is a descendant of the Element type. + * + * @param elm the ELM tree + * @param context the context passed to the visitor + * @return the visitor result + */ + override fun visitElement(elm: Element, context: C): T = + when (elm) { + is IncludeDef -> visitIncludeDef(elm, context) + is ContextDef -> visitContextDef(elm, context) + is Library -> visitLibrary(elm, context) + is UsingDef -> visitUsingDef(elm, context) + else -> super.visitElement(elm, context) + } + + /** + * Visit a Library. This method will be called for every node in the tree that is a Library. + * + * @param elm the ELM tree + * @param context the context passed to the visitor + * @return the visitor result + */ + override fun visitLibrary(elm: Library, context: C): T { + var result = visitFields(elm, context) + if (!elm.usings?.def.isNullOrEmpty()) { + for (def in elm.usings.def) { + val childResult = visitUsingDef(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.includes?.def.isNullOrEmpty()) { + for (def in elm.includes.def) { + val childResult = visitIncludeDef(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.codeSystems?.def.isNullOrEmpty()) { + for (def in elm.codeSystems.def) { + val childResult = visitCodeSystemDef(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.valueSets?.def.isNullOrEmpty()) { + for (def in elm.valueSets.def) { + val childResult = visitValueSetDef(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.codes?.def.isNullOrEmpty()) { + for (def in elm.codes.def) { + val childResult = visitElement(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.concepts?.def.isNullOrEmpty()) { + for (def in elm.concepts.def) { + val childResult = visitConceptDef(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.parameters?.def.isNullOrEmpty()) { + for (def in elm.parameters.def) { + val childResult = visitParameterDef(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.contexts?.def.isNullOrEmpty()) { + for (def in elm.contexts.def) { + val childResult = visitContextDef(def, context) + result = aggregateResult(result, childResult) + } + } + + if (!elm.statements?.def.isNullOrEmpty()) { + for (def in elm.statements.def) { + val childResult = visitExpressionDef(def, context) + result = aggregateResult(result, childResult) + } + } + + return result + } + + /** + * Visit a UsingDef. This method will be called for every node in the tree that is a UsingDef. + * + * @param elm the ELM tree + * @param context the context passed to the visitor + * @return the visitor result + */ + override fun visitUsingDef(elm: UsingDef, context: C): T = visitFields(elm, context) + + /** + * Visit a IncludeDef. This method will be called for every node in the tree that is a + * IncludeDef. + * + * @param elm the ELM tree + * @param context the context passed to the visitor + * @return the visitor result + */ + override fun visitIncludeDef(elm: IncludeDef, context: C): T = visitFields(elm, context) + + /** + * Visit a ContextDef. This method will be called for every node in the tree that is a + * ContextDef. + * + * @param elm the ELM tree + * @param context the context passed to the visitor + * @return the visitor result + */ + override fun visitContextDef(elm: ContextDef, context: C): T = visitFields(elm, context) +} From c78d3c52c66942c70231ef503f40e1046ac788a9 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Tue, 17 Sep 2024 21:51:13 -0600 Subject: [PATCH 21/77] More KT cleanup --- .../cql/elm/visiting/BaseElmLibraryVisitor.kt | 72 +++++++------------ 1 file changed, 27 insertions(+), 45 deletions(-) diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt index 6f0022319..90e58ad4d 100644 --- a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt +++ b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/BaseElmLibraryVisitor.kt @@ -35,67 +35,49 @@ abstract class BaseElmLibraryVisitor : */ override fun visitLibrary(elm: Library, context: C): T { var result = visitFields(elm, context) - if (!elm.usings?.def.isNullOrEmpty()) { - for (def in elm.usings.def) { - val childResult = visitUsingDef(def, context) - result = aggregateResult(result, childResult) - } + elm.usings?.def?.forEach { + val childResult = visitUsingDef(it, context) + result = aggregateResult(result, childResult) } - if (!elm.includes?.def.isNullOrEmpty()) { - for (def in elm.includes.def) { - val childResult = visitIncludeDef(def, context) - result = aggregateResult(result, childResult) - } + elm.includes?.def?.forEach { + val childResult = visitIncludeDef(it, context) + result = aggregateResult(result, childResult) } - if (!elm.codeSystems?.def.isNullOrEmpty()) { - for (def in elm.codeSystems.def) { - val childResult = visitCodeSystemDef(def, context) - result = aggregateResult(result, childResult) - } + elm.codeSystems?.def?.forEach { + val childResult = visitCodeSystemDef(it, context) + result = aggregateResult(result, childResult) } - if (!elm.valueSets?.def.isNullOrEmpty()) { - for (def in elm.valueSets.def) { - val childResult = visitValueSetDef(def, context) - result = aggregateResult(result, childResult) - } + elm.valueSets?.def?.forEach { + val childResult = visitValueSetDef(it, context) + result = aggregateResult(result, childResult) } - if (!elm.codes?.def.isNullOrEmpty()) { - for (def in elm.codes.def) { - val childResult = visitElement(def, context) - result = aggregateResult(result, childResult) - } + elm.codes?.def?.forEach { + val childResult = visitElement(it, context) + result = aggregateResult(result, childResult) } - if (!elm.concepts?.def.isNullOrEmpty()) { - for (def in elm.concepts.def) { - val childResult = visitConceptDef(def, context) - result = aggregateResult(result, childResult) - } + elm.concepts?.def?.forEach { + val childResult = visitConceptDef(it, context) + result = aggregateResult(result, childResult) } - if (!elm.parameters?.def.isNullOrEmpty()) { - for (def in elm.parameters.def) { - val childResult = visitParameterDef(def, context) - result = aggregateResult(result, childResult) - } + elm.parameters?.def?.forEach { + val childResult = visitParameterDef(it, context) + result = aggregateResult(result, childResult) } - if (!elm.contexts?.def.isNullOrEmpty()) { - for (def in elm.contexts.def) { - val childResult = visitContextDef(def, context) - result = aggregateResult(result, childResult) - } + elm.contexts?.def?.forEach { + val childResult = visitContextDef(it, context) + result = aggregateResult(result, childResult) } - if (!elm.statements?.def.isNullOrEmpty()) { - for (def in elm.statements.def) { - val childResult = visitExpressionDef(def, context) - result = aggregateResult(result, childResult) - } + elm.statements?.def?.forEach { + val childResult = visitExpressionDef(it, context) + result = aggregateResult(result, childResult) } return result From a428f4cf0ae2621f713072c450760bac377905fb Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Fri, 20 Sep 2024 08:38:33 -0600 Subject: [PATCH 22/77] WIP --- Src/java/cql-to-elm/build.gradle.kts | 1 + .../cql/cql2elm/Cql2ElmVisitor.java | 17 +- .../cqframework/cql/cql2elm/CqlCompiler.java | 13 +- .../cql/cql2elm/CqlTranslator.java | 25 +- .../cqframework/cql/cql2elm/model/Chunk.java | 24 +- .../cql/cql2elm/preprocessor/BaseInfo.java | 4 +- .../cql2elm/preprocessor/CqlPreprocessor.java | 24 +- .../CqlPreprocessorElmCommonVisitor.java | 22 +- .../cql/cql2elm/preprocessor/LibraryInfo.java | 4 +- .../preprocessor/ValuesetDefinitionInfo.java | 2 +- .../cql2elm/targetmap/TargetMapVisitor.java | 2 +- Src/java/cql/build.gradle.kts | 39 +- .../java/org/cqframework/cql/Application.kt | 4 +- .../cqframework/cql/grammar/GrammarTest.java | 10 +- .../cqframework/cql/elm/IdObjectFactory.java | 1246 ----------------- .../cqframework/cql/elm/IdObjectFactory.kt | 1232 ++++++++++++++++ .../elm/visiting/FunctionalElmVisitor.java | 41 - .../cql/elm/visiting/FunctionalElmVisitor.kt | 23 + .../cql/elm/visiting/RandomElmGraphTest.java | 149 -- .../cql/elm/visiting/RandomElmGraphTest.kt | 159 +++ .../tools/formatter/CqlFormatterVisitor.java | 11 +- Src/java/tools/cql-parsetree/build.gradle.kts | 4 - .../cqframework/cql/tools/parsetree/Main.java | 13 +- 23 files changed, 1533 insertions(+), 1536 deletions(-) delete mode 100644 Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.java create mode 100644 Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt delete mode 100644 Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.java create mode 100644 Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.kt delete mode 100644 Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.java create mode 100644 Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt diff --git a/Src/java/cql-to-elm/build.gradle.kts b/Src/java/cql-to-elm/build.gradle.kts index e22e3fa60..848419d72 100644 --- a/Src/java/cql-to-elm/build.gradle.kts +++ b/Src/java/cql-to-elm/build.gradle.kts @@ -9,6 +9,7 @@ dependencies { api(project(":elm")) api("org.fhir:ucum:1.0.8") api("org.apache.commons:commons-text:1.10.0") + api("com.strumenta:antlr-kotlin-runtime:1.0.0") // TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives // in the cql-to-elm project. Ideally, we"d factor out all serialization depedencies into common diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java index 5954ca107..3eb369d92 100755 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java @@ -5,10 +5,8 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.tree.ParseTree; -import org.antlr.v4.runtime.tree.TerminalNode; +import org.antlr.v4.kotlinruntime.*; +import org.antlr.v4.kotlinruntime.tree.*; import org.cqframework.cql.cql2elm.LibraryBuilder.IdentifierScope; import org.cqframework.cql.cql2elm.model.*; import org.cqframework.cql.cql2elm.model.invocation.*; @@ -1769,9 +1767,9 @@ public Object visitTerminal(TerminalNode node) { return null; } - if (cqlLexer.STRING == tokenType - || cqlLexer.QUOTEDIDENTIFIER == tokenType - || cqlLexer.DELIMITEDIDENTIFIER == tokenType) { + if (cqlLexer.Tokens.STRING == tokenType + || cqlLexer.Tokens.QUOTEDIDENTIFIER == tokenType + || cqlLexer.Tokens.DELIMITEDIDENTIFIER == tokenType) { // chop off leading and trailing ', ", or ` text = text.substring(1, text.length() - 1); @@ -4556,4 +4554,9 @@ private TrackBack track(Trackable trackable, Element from) { return tb; } + + @Override + protected Object defaultResult() { + return null; + } } diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java index a99fbbac6..bf5cd1b8d 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java @@ -14,8 +14,9 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.tree.ParseTree; + +import org.antlr.v4.kotlinruntime.*; +import org.antlr.v4.kotlinruntime.tree.ParseTree; import org.cqframework.cql.cql2elm.elm.ElmEdit; import org.cqframework.cql.cql2elm.elm.ElmEditor; import org.cqframework.cql.cql2elm.elm.IElmEdit; @@ -130,7 +131,7 @@ public CqlErrorListener(LibraryBuilder builder, boolean detailedErrors) { private VersionedIdentifier extractLibraryIdentifier(cqlParser parser) { RuleContext context = parser.getContext(); while (context != null && !(context instanceof cqlParser.LibraryContext)) { - context = context.parent; + context = context.getParent(); } if (context instanceof cqlParser.LibraryContext) { @@ -183,15 +184,15 @@ public void syntaxError( } public Library run(File cqlFile) throws IOException { - return run(CharStreams.fromStream(new FileInputStream(cqlFile))); + return run(CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile))); } public Library run(String cqlText) { - return run(CharStreams.fromString(cqlText)); + return run(CharStreams.INSTANCE.fromString(cqlText)); } public Library run(InputStream is) throws IOException { - return run(CharStreams.fromStream(is)); + return run(CharStreams.INSTANCE.fromStream(is)); } public Library run(CharStream is) { diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java index 58ff24cbe..aed591b47 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java @@ -2,7 +2,8 @@ import java.io.*; import java.util.*; -import org.antlr.v4.runtime.*; +import org.antlr.v4.kotlinruntime.*; +import org.antlr.v4.kotlinruntime.tree.*; import org.cqframework.cql.cql2elm.model.CompiledLibrary; import org.cqframework.cql.elm.serializing.ElmLibraryWriterFactory; import org.hl7.cql.model.NamespaceInfo; @@ -20,11 +21,11 @@ public enum Format { private CqlCompiler compiler; public static CqlTranslator fromText(String cqlText, LibraryManager libraryManager) { - return new CqlTranslator(null, null, CharStreams.fromString(cqlText), libraryManager); + return new CqlTranslator(null, null, CharStreams.INSTANCE.fromString(cqlText), libraryManager); } public static CqlTranslator fromText(NamespaceInfo namespaceInfo, String cqlText, LibraryManager libraryManager) { - return new CqlTranslator(namespaceInfo, null, CharStreams.fromString(cqlText), libraryManager); + return new CqlTranslator(namespaceInfo, null, CharStreams.INSTANCE.fromString(cqlText), libraryManager); } public static CqlTranslator fromText( @@ -32,16 +33,16 @@ public static CqlTranslator fromText( VersionedIdentifier sourceInfo, String cqlText, LibraryManager libraryManager) { - return new CqlTranslator(namespaceInfo, sourceInfo, CharStreams.fromString(cqlText), libraryManager); + return new CqlTranslator(namespaceInfo, sourceInfo, CharStreams.INSTANCE.fromString(cqlText), libraryManager); } public static CqlTranslator fromStream( NamespaceInfo namespaceInfo, InputStream cqlStream, LibraryManager libraryManager) throws IOException { - return new CqlTranslator(namespaceInfo, null, CharStreams.fromStream(cqlStream), libraryManager); + return new CqlTranslator(namespaceInfo, null, CharStreams.INSTANCE.fromStream(cqlStream), libraryManager); } public static CqlTranslator fromStream(InputStream cqlStream, LibraryManager libraryManager) throws IOException { - return new CqlTranslator(null, null, CharStreams.fromStream(cqlStream), libraryManager); + return new CqlTranslator(null, null, CharStreams.INSTANCE.fromStream(cqlStream), libraryManager); } public static CqlTranslator fromStream( @@ -50,14 +51,14 @@ public static CqlTranslator fromStream( InputStream cqlStream, LibraryManager libraryManager) throws IOException { - return new CqlTranslator(namespaceInfo, sourceInfo, CharStreams.fromStream(cqlStream), libraryManager); + return new CqlTranslator(namespaceInfo, sourceInfo, CharStreams.INSTANCE.fromStream(cqlStream), libraryManager); } public static CqlTranslator fromFile(String cqlFileName, LibraryManager libraryManager) throws IOException { return new CqlTranslator( null, getSourceInfo(cqlFileName), - CharStreams.fromStream(new FileInputStream(cqlFileName)), + CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFileName)), libraryManager); } @@ -66,13 +67,13 @@ public static CqlTranslator fromFile(NamespaceInfo namespaceInfo, String cqlFile return new CqlTranslator( namespaceInfo, getSourceInfo(cqlFileName), - CharStreams.fromStream(new FileInputStream(cqlFileName)), + CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFileName)), libraryManager); } public static CqlTranslator fromFile(File cqlFile, LibraryManager libraryManager) throws IOException { return new CqlTranslator( - null, getSourceInfo(cqlFile), CharStreams.fromStream(new FileInputStream(cqlFile)), libraryManager); + null, getSourceInfo(cqlFile), CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile)), libraryManager); } public static CqlTranslator fromFile(NamespaceInfo namespaceInfo, File cqlFile, LibraryManager libraryManager) @@ -80,7 +81,7 @@ public static CqlTranslator fromFile(NamespaceInfo namespaceInfo, File cqlFile, return new CqlTranslator( namespaceInfo, getSourceInfo(cqlFile), - CharStreams.fromStream(new FileInputStream(cqlFile)), + CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile)), libraryManager); } @@ -88,7 +89,7 @@ public static CqlTranslator fromFile( NamespaceInfo namespaceInfo, VersionedIdentifier sourceInfo, File cqlFile, LibraryManager libraryManager) throws IOException { return new CqlTranslator( - namespaceInfo, sourceInfo, CharStreams.fromStream(new FileInputStream(cqlFile)), libraryManager); + namespaceInfo, sourceInfo, CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile)), libraryManager); } private CqlTranslator( diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java index 28b7977b0..a3572e5b1 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java @@ -2,7 +2,7 @@ import java.util.ArrayList; import java.util.List; -import org.antlr.v4.runtime.misc.Interval; +import org.antlr.v4.kotlinruntime.misc.Interval; import org.hl7.elm.r1.Element; /** @@ -80,7 +80,7 @@ public boolean hasChunks() { } public void addChunk(Chunk chunk) { - if (chunk.getInterval().a < interval.a || chunk.getInterval().b > interval.b) { + if (chunk.getInterval().getA()< interval.getA()|| chunk.getInterval().getB() > interval.getB()) { throw new IllegalArgumentException( "Child chunk cannot be added because it is not contained within the parent chunk."); } @@ -89,22 +89,22 @@ public void addChunk(Chunk chunk) { int chunkIndex = -1; Chunk targetChunk = null; for (int i = 0; i < chunks.size(); i++) { - if (chunk.getInterval().a >= chunks.get(i).getInterval().a - && chunk.getInterval().a <= chunks.get(i).getInterval().b) { + if (chunk.getInterval().getA()>= chunks.get(i).getInterval().getA() + && chunk.getInterval().getA()<= chunks.get(i).getInterval().getB()) { chunkIndex = i; targetChunk = chunks.get(chunkIndex); break; } } - if (chunk.getInterval().a == targetChunk.getInterval().a) { + if (chunk.getInterval().getA()== targetChunk.getInterval().getA()) { // the chunk being added starts the targetChunk // insert the chunk at the targetChunk's index // update the targetChunk's interval start to be the chunk's interval end + 1 chunks.add(chunkIndex, chunk); chunkIndex++; - int newA = chunk.getInterval().b + 1; - while (newA > chunks.get(chunkIndex).getInterval().b) { + int newA = chunk.getInterval().getB() + 1; + while (newA > chunks.get(chunkIndex).getInterval().getB()) { chunks.remove(chunkIndex); if (chunkIndex >= chunks.size()) { break; @@ -112,13 +112,13 @@ public void addChunk(Chunk chunk) { } if (chunkIndex < chunks.size()) { chunks.get(chunkIndex) - .setInterval(new Interval(newA, chunks.get(chunkIndex).getInterval().b)); + .setInterval(new Interval(newA, chunks.get(chunkIndex).getInterval().getB())); } } else { - int newB = chunk.getInterval().a - 1; - int newA = chunk.getInterval().b + 1; - int oldA = chunks.get(chunkIndex).getInterval().a; - int oldB = chunks.get(chunkIndex).getInterval().b; + int newB = chunk.getInterval().getA()- 1; + int newA = chunk.getInterval().getB() + 1; + int oldA = chunks.get(chunkIndex).getInterval().getA(); + int oldB = chunks.get(chunkIndex).getInterval().getB(); chunks.get(chunkIndex).setInterval(new Interval(oldA, newB)); chunkIndex++; chunks.add(chunkIndex, chunk); diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/BaseInfo.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/BaseInfo.java index 4ddcc5d8c..ea2f91e0d 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/BaseInfo.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/BaseInfo.java @@ -1,7 +1,7 @@ package org.cqframework.cql.cql2elm.preprocessor; -import org.antlr.v4.runtime.misc.Interval; -import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.kotlinruntime.misc.Interval; +import org.antlr.v4.kotlinruntime.tree.ParseTree; @SuppressWarnings("checkstyle:abstractclassname") public class BaseInfo { diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessor.java index 7e5d6821b..525971986 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessor.java @@ -2,11 +2,10 @@ import java.util.ArrayList; import java.util.List; -import org.antlr.v4.runtime.Recognizer; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.misc.Interval; -import org.antlr.v4.runtime.tree.ParseTree; -import org.antlr.v4.runtime.tree.TerminalNode; +import org.antlr.v4.kotlinruntime.*; +import org.antlr.v4.kotlinruntime.misc.*; +import org.antlr.v4.kotlinruntime.misc.Interval; +import org.antlr.v4.kotlinruntime.tree.*; import org.cqframework.cql.cql2elm.*; import org.cqframework.cql.cql2elm.model.Model; import org.cqframework.cql.gen.cqlLexer; @@ -30,11 +29,11 @@ public LibraryInfo getLibraryInfo() { private void processHeader(ParseTree ctx, BaseInfo info) { Interval header = null; - org.antlr.v4.runtime.misc.Interval sourceInterval = ctx.getSourceInterval(); - int beforeDefinition = sourceInterval.a - 1; + var sourceInterval = ctx.getSourceInterval(); + int beforeDefinition = sourceInterval.getA() - 1; if (beforeDefinition >= lastSourceIndex) { - header = new org.antlr.v4.runtime.misc.Interval(lastSourceIndex + 1, sourceInterval.a - 1); - lastSourceIndex = sourceInterval.b; + header = new org.antlr.v4.kotlinruntime.misc.Interval(lastSourceIndex + 1, sourceInterval.getA() - 1); + lastSourceIndex = sourceInterval.getB(); info.setHeaderInterval(header); info.setHeader(tokenStream.getText(header)); @@ -292,7 +291,7 @@ public NamedTypeSpecifier visitNamedTypeSpecifier(cqlParser.NamedTypeSpecifierCo public Object visitTerminal(TerminalNode node) { String text = node.getText(); int tokenType = node.getSymbol().getType(); - if (cqlLexer.STRING == tokenType || cqlLexer.QUOTEDIDENTIFIER == tokenType) { + if (cqlLexer.Tokens.STRING == tokenType || cqlLexer.Tokens.QUOTEDIDENTIFIER == tokenType) { // chop off leading and trailing ' or " text = text.substring(1, text.length() - 1); } @@ -327,4 +326,9 @@ public Object visitQualifiedIdentifierExpression(cqlParser.QualifiedIdentifierEx identifiers.add(identifier); return identifiers; } + + @Override + protected Object defaultResult() { + return null; + } } diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java index 4c3f7d1a7..299b7f0c4 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java @@ -9,10 +9,10 @@ import java.util.Objects; import java.util.Stack; import javax.xml.namespace.QName; -import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.tree.ParseTree; -import org.antlr.v4.runtime.tree.TerminalNode; +import org.antlr.v4.kotlinruntime.ParserRuleContext; +import org.antlr.v4.kotlinruntime.TokenStream; +import org.antlr.v4.kotlinruntime.tree.ParseTree; +import org.antlr.v4.kotlinruntime.tree.TerminalNode; import org.apache.commons.lang3.tuple.Pair; import org.cqframework.cql.cql2elm.*; import org.cqframework.cql.cql2elm.model.Chunk; @@ -32,7 +32,7 @@ /** * Common functionality used by {@link CqlPreprocessor} and {@link Cql2ElmVisitor} */ -public class CqlPreprocessorElmCommonVisitor extends cqlBaseVisitor { +public abstract class CqlPreprocessorElmCommonVisitor extends cqlBaseVisitor { protected final IdObjectFactory of; protected final org.hl7.cql_annotations.r1.ObjectFactory af = new org.hl7.cql_annotations.r1.ObjectFactory(); private boolean implicitContextCreated = false; @@ -279,10 +279,10 @@ private boolean pushChunk(ParseTree tree) { return false; } - org.antlr.v4.runtime.misc.Interval sourceInterval = tree.getSourceInterval(); + org.antlr.v4.kotlinruntime.misc.Interval sourceInterval = tree.getSourceInterval(); // An interval of i..i-1 indicates an empty interval at position i in the input stream, - if (sourceInterval.b < sourceInterval.a) { + if (sourceInterval.getB() < sourceInterval.getA()) { return false; } @@ -320,8 +320,8 @@ private void popChunk(ParseTree tree, Object o, boolean pushedChunk) { .withInterval(definitionInfo.getHeaderInterval()) .withIsHeaderChunk(true); Chunk newChunk = new Chunk() - .withInterval(new org.antlr.v4.runtime.misc.Interval( - headerChunk.getInterval().a, chunk.getInterval().b)); + .withInterval(new org.antlr.v4.kotlinruntime.misc.Interval( + headerChunk.getInterval().getA(), chunk.getInterval().getB())); newChunk.addChunk(headerChunk); newChunk.setElement(chunk.getElement()); for (Chunk c : chunk.getChunks()) { @@ -344,8 +344,8 @@ private void popChunk(ParseTree tree, Object o, boolean pushedChunk) { Chunk definitionChunk = new Chunk().withInterval(libraryInfo.getDefinition().getSourceInterval()); Chunk newChunk = new Chunk() - .withInterval(new org.antlr.v4.runtime.misc.Interval( - headerChunk.getInterval().a, definitionChunk.getInterval().b)); + .withInterval(new org.antlr.v4.kotlinruntime.misc.Interval( + headerChunk.getInterval().getA(), definitionChunk.getInterval().getB())); newChunk.addChunk(headerChunk); newChunk.addChunk(definitionChunk); newChunk.setElement(chunk.getElement()); diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/LibraryInfo.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/LibraryInfo.java index 6f1caad4d..c3cb23754 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/LibraryInfo.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/LibraryInfo.java @@ -1,8 +1,8 @@ package org.cqframework.cql.cql2elm.preprocessor; import java.util.*; -import org.antlr.v4.runtime.misc.Interval; -import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.kotlinruntime.misc.Interval; +import org.antlr.v4.kotlinruntime.tree.ParseTree; import org.cqframework.cql.cql2elm.ResultWithPossibleError; import org.cqframework.cql.gen.cqlParser; import org.hl7.elm.r1.OperandDef; diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/ValuesetDefinitionInfo.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/ValuesetDefinitionInfo.java index c52fc4243..abc4076a5 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/ValuesetDefinitionInfo.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/ValuesetDefinitionInfo.java @@ -1,6 +1,6 @@ package org.cqframework.cql.cql2elm.preprocessor; -import org.antlr.v4.runtime.misc.Interval; +import org.antlr.v4.kotlinruntime.misc.Interval; import org.cqframework.cql.gen.cqlParser; public class ValuesetDefinitionInfo extends BaseInfo { diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java index 62216aba9..a1f64bb50 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java @@ -2,4 +2,4 @@ import org.cqframework.cql.gen.targetmapBaseVisitor; -public class TargetMapVisitor extends targetmapBaseVisitor {} +public abstract class TargetMapVisitor extends targetmapBaseVisitor {} diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 82bd01530..576c7e1ee 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -1,14 +1,14 @@ +import com.strumenta.antlrkotlin.gradle.AntlrKotlinTask + plugins { id("cql.java-conventions") id("cql.kotlin-conventions") id("application") - id("antlr") + id("com.strumenta.antlr-kotlin") version "1.0.0" } dependencies { - val version = project.findProperty("antlr.version") - antlr("org.antlr:antlr4:${version}") - api("org.antlr:antlr4-runtime:${version}") + api("com.strumenta:antlr-kotlin-runtime:1.0.0") } application { @@ -17,25 +17,34 @@ application { sourceSets { main { - antlr { - setSrcDirs(listOf("../../grammar")) - } - java { - srcDir("build/generated/sources/antlr/main/java") + kotlin { + srcDir("build/generated/sources/antlr/main/kotlin") } } } -tasks.generateGrammarSource { - val buildDir = layout.buildDirectory.get().toString() - outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") - arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") +val generateKotlinGrammarSource = tasks.register("generateKotlinGrammarSource") { + dependsOn("cleanGenerateKotlinGrammarSource") + + source = fileTree("../../grammar") { + include("**/*.g4") + } + + // We want the generated source files to have this package name + packageName = "org.cqframework.cql.gen" + + // We want visitors alongside listeners. + // The Kotlin target language is implicit, as is the file encoding (UTF-8) + arguments = listOf("-visitor") + + // Generated files are outputted inside build/generatedAntlr/{package-name} + outputDirectory = file("build/generated/sources/antlr/main/kotlin/${packageName!!.replace(".", "/")}") } tasks.sourcesJar { - from(tasks.generateGrammarSource) + from(generateKotlinGrammarSource) } tasks.compileKotlin { - dependsOn(tasks.generateGrammarSource) + dependsOn(generateKotlinGrammarSource) } \ No newline at end of file diff --git a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt index cdf094a6b..955a40df1 100644 --- a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt +++ b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt @@ -1,8 +1,8 @@ package org.cqframework.cql +import org.antlr.v4.kotlinruntime.CharStreams +import org.antlr.v4.kotlinruntime.CommonTokenStream import java.io.FileInputStream -import org.antlr.v4.runtime.CharStreams -import org.antlr.v4.runtime.CommonTokenStream import org.cqframework.cql.gen.cqlLexer import org.cqframework.cql.gen.cqlParser diff --git a/Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java b/Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java index 25cf6a460..ea484bcb4 100644 --- a/Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java +++ b/Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java @@ -3,10 +3,10 @@ import static org.cqframework.cql.gen.cqlParser.*; import static org.junit.jupiter.api.Assertions.assertEquals; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; -import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.kotlinruntime.CharStream; +import org.antlr.v4.kotlinruntime.CharStreams; +import org.antlr.v4.kotlinruntime.CommonTokenStream; +import org.antlr.v4.kotlinruntime.tree.ParseTree; import org.cqframework.cql.gen.cqlLexer; import org.cqframework.cql.gen.cqlParser; import org.junit.jupiter.api.Test; @@ -48,7 +48,7 @@ void ageAt() { } private ParseTree parseToTree(String logic) { - CharStream input = CharStreams.fromString(logic); + CharStream input = CharStreams.INSTANCE.fromString(logic); CommonTokenStream tokens = new CommonTokenStream(new cqlLexer(input)); cqlParser parser = new cqlParser(tokens); parser.setBuildParseTree(true); diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.java b/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.java deleted file mode 100644 index 582cb919c..000000000 --- a/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.java +++ /dev/null @@ -1,1246 +0,0 @@ -package org.cqframework.cql.elm; - -import jakarta.xml.bind.JAXBElement; -import org.hl7.elm.r1.*; - -/* - * Extends the ObjectFactory to allow for decorating the elements created by the factory. If no decorator is provided, nodes are - * given monotonically increasing ids. - * - */ -public class IdObjectFactory extends ObjectFactory { - - private int nextId = 0; - - /** - * returns the next id and increments the counter - */ - public String nextId() { - return Integer.toString(nextId++); - } - - @Override - public Abs createAbs() { - return super.createAbs().withLocalId(nextId()); - } - - @Override - public Add createAdd() { - return super.createAdd().withLocalId(nextId()); - } - - @Override - public After createAfter() { - return super.createAfter().withLocalId(nextId()); - } - - @Override - public Aggregate createAggregate() { - return super.createAggregate().withLocalId(nextId()); - } - - @Override - public AggregateClause createAggregateClause() { - return super.createAggregateClause().withLocalId(nextId()); - } - - @Override - public AliasRef createAliasRef() { - return super.createAliasRef().withLocalId(nextId()); - } - - @Override - public AliasedQuerySource createAliasedQuerySource() { - return super.createAliasedQuerySource().withLocalId(nextId()); - } - - @Override - public AllTrue createAllTrue() { - return super.createAllTrue().withLocalId(nextId()); - } - - @Override - public And createAnd() { - return super.createAnd().withLocalId(nextId()); - } - - @Override - public AnyInCodeSystem createAnyInCodeSystem() { - return super.createAnyInCodeSystem().withLocalId(nextId()); - } - - @Override - public AnyInValueSet createAnyInValueSet() { - return super.createAnyInValueSet().withLocalId(nextId()); - } - - @Override - public AnyTrue createAnyTrue() { - return super.createAnyTrue().withLocalId(nextId()); - } - - @Override - public As createAs() { - return super.createAs().withLocalId(nextId()); - } - - @Override - public Avg createAvg() { - return super.createAvg().withLocalId(nextId()); - } - - @Override - public Before createBefore() { - return super.createBefore().withLocalId(nextId()); - } - - @Override - public ByColumn createByColumn() { - return super.createByColumn().withLocalId(nextId()); - } - - @Override - public ByDirection createByDirection() { - return super.createByDirection().withLocalId(nextId()); - } - - @Override - public ByExpression createByExpression() { - return super.createByExpression().withLocalId(nextId()); - } - - @Override - public CalculateAge createCalculateAge() { - return super.createCalculateAge().withLocalId(nextId()); - } - - @Override - public CalculateAgeAt createCalculateAgeAt() { - return super.createCalculateAgeAt().withLocalId(nextId()); - } - - @Override - public CanConvert createCanConvert() { - return super.createCanConvert().withLocalId(nextId()); - } - - @Override - public CanConvertQuantity createCanConvertQuantity() { - return super.createCanConvertQuantity().withLocalId(nextId()); - } - - @Override - public Case createCase() { - return super.createCase().withLocalId(nextId()); - } - - @Override - public CaseItem createCaseItem() { - return super.createCaseItem().withLocalId(nextId()); - } - - @Override - public Ceiling createCeiling() { - return super.createCeiling().withLocalId(nextId()); - } - - @Override - public Children createChildren() { - return super.createChildren().withLocalId(nextId()); - } - - @Override - public ChoiceTypeSpecifier createChoiceTypeSpecifier() { - return super.createChoiceTypeSpecifier().withLocalId(nextId()); - } - - @Override - public Coalesce createCoalesce() { - return super.createCoalesce().withLocalId(nextId()); - } - - @Override - public Code createCode() { - return super.createCode().withLocalId(nextId()); - } - - @Override - public CodeDef createCodeDef() { - return super.createCodeDef().withLocalId(nextId()); - } - - @Override - public CodeFilterElement createCodeFilterElement() { - return super.createCodeFilterElement().withLocalId(nextId()); - } - - @Override - public CodeRef createCodeRef() { - return super.createCodeRef().withLocalId(nextId()); - } - - @Override - public CodeSystemDef createCodeSystemDef() { - return super.createCodeSystemDef().withLocalId(nextId()); - } - - @Override - public CodeSystemRef createCodeSystemRef() { - return super.createCodeSystemRef().withLocalId(nextId()); - } - - @Override - public Collapse createCollapse() { - return super.createCollapse().withLocalId(nextId()); - } - - @Override - public Combine createCombine() { - return super.createCombine().withLocalId(nextId()); - } - - @Override - public Concatenate createConcatenate() { - return super.createConcatenate().withLocalId(nextId()); - } - - @Override - public Concept createConcept() { - return super.createConcept().withLocalId(nextId()); - } - - @Override - public ConceptDef createConceptDef() { - return super.createConceptDef().withLocalId(nextId()); - } - - @Override - public ConceptRef createConceptRef() { - return super.createConceptRef().withLocalId(nextId()); - } - - @Override - public Contains createContains() { - return super.createContains().withLocalId(nextId()); - } - - @Override - public ContextDef createContextDef() { - return super.createContextDef().withLocalId(nextId()); - } - - @Override - public Convert createConvert() { - return super.createConvert().withLocalId(nextId()); - } - - @Override - public ConvertQuantity createConvertQuantity() { - return super.createConvertQuantity().withLocalId(nextId()); - } - - @Override - public ConvertsToBoolean createConvertsToBoolean() { - return super.createConvertsToBoolean().withLocalId(nextId()); - } - - @Override - public ConvertsToDate createConvertsToDate() { - return super.createConvertsToDate().withLocalId(nextId()); - } - - @Override - public ConvertsToDateTime createConvertsToDateTime() { - return super.createConvertsToDateTime().withLocalId(nextId()); - } - - @Override - public ConvertsToDecimal createConvertsToDecimal() { - return super.createConvertsToDecimal().withLocalId(nextId()); - } - - @Override - public ConvertsToInteger createConvertsToInteger() { - return super.createConvertsToInteger().withLocalId(nextId()); - } - - @Override - public ConvertsToLong createConvertsToLong() { - return super.createConvertsToLong().withLocalId(nextId()); - } - - @Override - public ConvertsToQuantity createConvertsToQuantity() { - return super.createConvertsToQuantity().withLocalId(nextId()); - } - - @Override - public ConvertsToRatio createConvertsToRatio() { - return super.createConvertsToRatio().withLocalId(nextId()); - } - - @Override - public ConvertsToString createConvertsToString() { - return super.createConvertsToString().withLocalId(nextId()); - } - - @Override - public ConvertsToTime createConvertsToTime() { - return super.createConvertsToTime().withLocalId(nextId()); - } - - @Override - public Count createCount() { - return super.createCount().withLocalId(nextId()); - } - - @Override - public Current createCurrent() { - return super.createCurrent().withLocalId(nextId()); - } - - @Override - public Date createDate() { - return super.createDate().withLocalId(nextId()); - } - - @Override - public DateFilterElement createDateFilterElement() { - return super.createDateFilterElement().withLocalId(nextId()); - } - - @Override - public DateFrom createDateFrom() { - return super.createDateFrom().withLocalId(nextId()); - } - - @Override - public DateTime createDateTime() { - return super.createDateTime().withLocalId(nextId()); - } - - @Override - public DateTimeComponentFrom createDateTimeComponentFrom() { - return super.createDateTimeComponentFrom().withLocalId(nextId()); - } - - @Override - public Descendents createDescendents() { - return super.createDescendents().withLocalId(nextId()); - } - - @Override - public DifferenceBetween createDifferenceBetween() { - return super.createDifferenceBetween().withLocalId(nextId()); - } - - @Override - public Distinct createDistinct() { - return super.createDistinct().withLocalId(nextId()); - } - - @Override - public Divide createDivide() { - return super.createDivide().withLocalId(nextId()); - } - - @Override - public DurationBetween createDurationBetween() { - return super.createDurationBetween().withLocalId(nextId()); - } - - @Override - public End createEnd() { - return super.createEnd().withLocalId(nextId()); - } - - @Override - public Ends createEnds() { - return super.createEnds().withLocalId(nextId()); - } - - @Override - public EndsWith createEndsWith() { - return super.createEndsWith().withLocalId(nextId()); - } - - @Override - public Equal createEqual() { - return super.createEqual().withLocalId(nextId()); - } - - @Override - public Equivalent createEquivalent() { - return super.createEquivalent().withLocalId(nextId()); - } - - @Override - public Except createExcept() { - return super.createExcept().withLocalId(nextId()); - } - - @Override - public Exists createExists() { - return super.createExists().withLocalId(nextId()); - } - - @Override - public Exp createExp() { - return super.createExp().withLocalId(nextId()); - } - - @Override - public Expand createExpand() { - return super.createExpand().withLocalId(nextId()); - } - - @Override - public ExpandValueSet createExpandValueSet() { - return super.createExpandValueSet().withLocalId(nextId()); - } - - @Override - public ExpressionDef createExpressionDef() { - return super.createExpressionDef().withLocalId(nextId()); - } - - @Override - public ExpressionRef createExpressionRef() { - return super.createExpressionRef().withLocalId(nextId()); - } - - @Override - public Filter createFilter() { - return super.createFilter().withLocalId(nextId()); - } - - @Override - public First createFirst() { - return super.createFirst().withLocalId(nextId()); - } - - @Override - public Flatten createFlatten() { - return super.createFlatten().withLocalId(nextId()); - } - - @Override - public Floor createFloor() { - return super.createFloor().withLocalId(nextId()); - } - - @Override - public ForEach createForEach() { - return super.createForEach().withLocalId(nextId()); - } - - @Override - public FunctionDef createFunctionDef() { - return super.createFunctionDef().withLocalId(nextId()); - } - - @Override - public FunctionRef createFunctionRef() { - return super.createFunctionRef().withLocalId(nextId()); - } - - @Override - public GeometricMean createGeometricMean() { - return super.createGeometricMean().withLocalId(nextId()); - } - - @Override - public Greater createGreater() { - return super.createGreater().withLocalId(nextId()); - } - - @Override - public GreaterOrEqual createGreaterOrEqual() { - return super.createGreaterOrEqual().withLocalId(nextId()); - } - - @Override - public HighBoundary createHighBoundary() { - return super.createHighBoundary().withLocalId(nextId()); - } - - @Override - public IdentifierRef createIdentifierRef() { - return super.createIdentifierRef().withLocalId(nextId()); - } - - @Override - public If createIf() { - return super.createIf().withLocalId(nextId()); - } - - @Override - public Implies createImplies() { - return super.createImplies().withLocalId(nextId()); - } - - @Override - public In createIn() { - return super.createIn().withLocalId(nextId()); - } - - @Override - public InCodeSystem createInCodeSystem() { - return super.createInCodeSystem().withLocalId(nextId()); - } - - @Override - public InValueSet createInValueSet() { - return super.createInValueSet().withLocalId(nextId()); - } - - @Override - public IncludeDef createIncludeDef() { - return super.createIncludeDef().withLocalId(nextId()); - } - - @Override - public IncludeElement createIncludeElement() { - return super.createIncludeElement().withLocalId(nextId()); - } - - @Override - public IncludedIn createIncludedIn() { - return super.createIncludedIn().withLocalId(nextId()); - } - - @Override - public Includes createIncludes() { - return super.createIncludes().withLocalId(nextId()); - } - - @Override - public IndexOf createIndexOf() { - return super.createIndexOf().withLocalId(nextId()); - } - - @Override - public Indexer createIndexer() { - return super.createIndexer().withLocalId(nextId()); - } - - @Override - public Instance createInstance() { - return super.createInstance().withLocalId(nextId()); - } - - // @Override - // public InstanceElement createInstanceElement() { - // return super.createInstanceElement().withLocalId(nextId()); - // } - - @Override - public Intersect createIntersect() { - return super.createIntersect().withLocalId(nextId()); - } - - @Override - public Interval createInterval() { - return super.createInterval().withLocalId(nextId()); - } - - @Override - public IntervalTypeSpecifier createIntervalTypeSpecifier() { - return super.createIntervalTypeSpecifier().withLocalId(nextId()); - } - - @Override - public Is createIs() { - return super.createIs().withLocalId(nextId()); - } - - @Override - public IsFalse createIsFalse() { - return super.createIsFalse().withLocalId(nextId()); - } - - @Override - public IsNull createIsNull() { - return super.createIsNull().withLocalId(nextId()); - } - - @Override - public IsTrue createIsTrue() { - return super.createIsTrue().withLocalId(nextId()); - } - - @Override - public Iteration createIteration() { - return super.createIteration().withLocalId(nextId()); - } - - @Override - public Last createLast() { - return super.createLast().withLocalId(nextId()); - } - - @Override - public LastPositionOf createLastPositionOf() { - return super.createLastPositionOf().withLocalId(nextId()); - } - - @Override - public Length createLength() { - return super.createLength().withLocalId(nextId()); - } - - @Override - public Less createLess() { - return super.createLess().withLocalId(nextId()); - } - - @Override - public LessOrEqual createLessOrEqual() { - return super.createLessOrEqual().withLocalId(nextId()); - } - - @Override - public LetClause createLetClause() { - return super.createLetClause().withLocalId(nextId()); - } - - @Override - public Library createLibrary() { - return super.createLibrary().withLocalId(nextId()); - } - - @Override - public JAXBElement createLibrary(Library value) { - return super.createLibrary(value); - } - - // @Override - // public CodeSystems createLibraryCodeSystems() { - // return super.createLibraryCodeSystems().withLocalId(nextId()); - // } - - // @Override - // public Codes createLibraryCodes() { - // return super.createLibraryCodes().withLocalId(nextId()); - // } - - // @Override - // public Concepts createLibraryConcepts() { - // return super.createLibraryConcepts().withLocalId(nextId()); - // } - - // @Override - // public Contexts createLibraryContexts() { - // return super.createLibraryContexts().withLocalId(nextId()); - // } - - // @Override - // public Includes createLibraryIncludes() { - // return super.createLibraryIncludes().withLocalId(nextId()); - // } - - // @Override - // public Parameters createLibraryParameters() { - // return super.createLibraryParameters().withLocalId(nextId()); - // } - - // @Override - // public Statements createLibraryStatements() { - // return super.createLibraryStatements().withLocalId(nextId()); - // } - - // @Override - // public Usings createLibraryUsings() { - // return super.createLibraryUsings().withLocalId(nextId()); - // } - - // @Override - // public ValueSets createLibraryValueSets() { - // return super.createLibraryValueSets().withLocalId(nextId()); - // } - - @Override - public List createList() { - return super.createList().withLocalId(nextId()); - } - - @Override - public ListTypeSpecifier createListTypeSpecifier() { - return super.createListTypeSpecifier().withLocalId(nextId()); - } - - @Override - public Literal createLiteral() { - return super.createLiteral().withLocalId(nextId()); - } - - @Override - public Ln createLn() { - return super.createLn().withLocalId(nextId()); - } - - @Override - public Log createLog() { - return super.createLog().withLocalId(nextId()); - } - - @Override - public LowBoundary createLowBoundary() { - return super.createLowBoundary().withLocalId(nextId()); - } - - @Override - public Lower createLower() { - return super.createLower().withLocalId(nextId()); - } - - @Override - public Matches createMatches() { - return super.createMatches().withLocalId(nextId()); - } - - @Override - public Max createMax() { - return super.createMax().withLocalId(nextId()); - } - - @Override - public MaxValue createMaxValue() { - return super.createMaxValue().withLocalId(nextId()); - } - - @Override - public Median createMedian() { - return super.createMedian().withLocalId(nextId()); - } - - @Override - public Meets createMeets() { - return super.createMeets().withLocalId(nextId()); - } - - @Override - public MeetsAfter createMeetsAfter() { - return super.createMeetsAfter().withLocalId(nextId()); - } - - @Override - public MeetsBefore createMeetsBefore() { - return super.createMeetsBefore().withLocalId(nextId()); - } - - @Override - public Message createMessage() { - return super.createMessage().withLocalId(nextId()); - } - - @Override - public Min createMin() { - return super.createMin().withLocalId(nextId()); - } - - @Override - public MinValue createMinValue() { - return super.createMinValue().withLocalId(nextId()); - } - - @Override - public Mode createMode() { - return super.createMode().withLocalId(nextId()); - } - - @Override - public Modulo createModulo() { - return super.createModulo().withLocalId(nextId()); - } - - @Override - public Multiply createMultiply() { - return super.createMultiply().withLocalId(nextId()); - } - - @Override - public NamedTypeSpecifier createNamedTypeSpecifier() { - return super.createNamedTypeSpecifier().withLocalId(nextId()); - } - - @Override - public Negate createNegate() { - return super.createNegate().withLocalId(nextId()); - } - - @Override - public Not createNot() { - return super.createNot().withLocalId(nextId()); - } - - @Override - public NotEqual createNotEqual() { - return super.createNotEqual().withLocalId(nextId()); - } - - @Override - public Now createNow() { - return super.createNow().withLocalId(nextId()); - } - - @Override - public Null createNull() { - return super.createNull().withLocalId(nextId()); - } - - @Override - public OperandDef createOperandDef() { - return super.createOperandDef().withLocalId(nextId()); - } - - @Override - public OperandRef createOperandRef() { - return super.createOperandRef().withLocalId(nextId()); - } - - @Override - public Or createOr() { - return super.createOr().withLocalId(nextId()); - } - - @Override - public OtherFilterElement createOtherFilterElement() { - return super.createOtherFilterElement().withLocalId(nextId()); - } - - @Override - public Overlaps createOverlaps() { - return super.createOverlaps().withLocalId(nextId()); - } - - @Override - public OverlapsAfter createOverlapsAfter() { - return super.createOverlapsAfter().withLocalId(nextId()); - } - - @Override - public OverlapsBefore createOverlapsBefore() { - return super.createOverlapsBefore().withLocalId(nextId()); - } - - @Override - public ParameterDef createParameterDef() { - return super.createParameterDef().withLocalId(nextId()); - } - - @Override - public ParameterRef createParameterRef() { - return super.createParameterRef().withLocalId(nextId()); - } - - @Override - public ParameterTypeSpecifier createParameterTypeSpecifier() { - return super.createParameterTypeSpecifier().withLocalId(nextId()); - } - - @Override - public PointFrom createPointFrom() { - return super.createPointFrom().withLocalId(nextId()); - } - - @Override - public PopulationStdDev createPopulationStdDev() { - return super.createPopulationStdDev().withLocalId(nextId()); - } - - @Override - public PopulationVariance createPopulationVariance() { - return super.createPopulationVariance().withLocalId(nextId()); - } - - @Override - public PositionOf createPositionOf() { - return super.createPositionOf().withLocalId(nextId()); - } - - @Override - public Power createPower() { - return super.createPower().withLocalId(nextId()); - } - - @Override - public Precision createPrecision() { - return super.createPrecision().withLocalId(nextId()); - } - - @Override - public Predecessor createPredecessor() { - return super.createPredecessor().withLocalId(nextId()); - } - - @Override - public Product createProduct() { - return super.createProduct().withLocalId(nextId()); - } - - @Override - public ProperContains createProperContains() { - return super.createProperContains().withLocalId(nextId()); - } - - @Override - public ProperIn createProperIn() { - return super.createProperIn().withLocalId(nextId()); - } - - @Override - public ProperIncludedIn createProperIncludedIn() { - return super.createProperIncludedIn().withLocalId(nextId()); - } - - @Override - public ProperIncludes createProperIncludes() { - return super.createProperIncludes().withLocalId(nextId()); - } - - @Override - public Property createProperty() { - return super.createProperty().withLocalId(nextId()); - } - - @Override - public Quantity createQuantity() { - return super.createQuantity().withLocalId(nextId()); - } - - @Override - public Query createQuery() { - return super.createQuery().withLocalId(nextId()); - } - - @Override - public QueryLetRef createQueryLetRef() { - return super.createQueryLetRef().withLocalId(nextId()); - } - - @Override - public Ratio createRatio() { - return super.createRatio().withLocalId(nextId()); - } - - @Override - public Repeat createRepeat() { - return super.createRepeat().withLocalId(nextId()); - } - - @Override - public ReplaceMatches createReplaceMatches() { - return super.createReplaceMatches().withLocalId(nextId()); - } - - @Override - public Retrieve createRetrieve() { - return super.createRetrieve().withLocalId(nextId()); - } - - @Override - public ReturnClause createReturnClause() { - return super.createReturnClause().withLocalId(nextId()); - } - - @Override - public Round createRound() { - return super.createRound().withLocalId(nextId()); - } - - @Override - public SameAs createSameAs() { - return super.createSameAs().withLocalId(nextId()); - } - - @Override - public SameOrAfter createSameOrAfter() { - return super.createSameOrAfter().withLocalId(nextId()); - } - - @Override - public SameOrBefore createSameOrBefore() { - return super.createSameOrBefore().withLocalId(nextId()); - } - - @Override - public Search createSearch() { - return super.createSearch().withLocalId(nextId()); - } - - @Override - public SingletonFrom createSingletonFrom() { - return super.createSingletonFrom().withLocalId(nextId()); - } - - @Override - public Size createSize() { - return super.createSize().withLocalId(nextId()); - } - - @Override - public Slice createSlice() { - return super.createSlice().withLocalId(nextId()); - } - - @Override - public Sort createSort() { - return super.createSort().withLocalId(nextId()); - } - - @Override - public SortClause createSortClause() { - return super.createSortClause().withLocalId(nextId()); - } - - @Override - public Split createSplit() { - return super.createSplit().withLocalId(nextId()); - } - - @Override - public SplitOnMatches createSplitOnMatches() { - return super.createSplitOnMatches().withLocalId(nextId()); - } - - @Override - public Start createStart() { - return super.createStart().withLocalId(nextId()); - } - - @Override - public Starts createStarts() { - return super.createStarts().withLocalId(nextId()); - } - - @Override - public StartsWith createStartsWith() { - return super.createStartsWith().withLocalId(nextId()); - } - - @Override - public StdDev createStdDev() { - return super.createStdDev().withLocalId(nextId()); - } - - @Override - public Substring createSubstring() { - return super.createSubstring().withLocalId(nextId()); - } - - @Override - public SubsumedBy createSubsumedBy() { - return super.createSubsumedBy().withLocalId(nextId()); - } - - @Override - public Subsumes createSubsumes() { - return super.createSubsumes().withLocalId(nextId()); - } - - @Override - public Subtract createSubtract() { - return super.createSubtract().withLocalId(nextId()); - } - - @Override - public Successor createSuccessor() { - return super.createSuccessor().withLocalId(nextId()); - } - - @Override - public Sum createSum() { - return super.createSum().withLocalId(nextId()); - } - - @Override - public Time createTime() { - return super.createTime().withLocalId(nextId()); - } - - @Override - public TimeFrom createTimeFrom() { - return super.createTimeFrom().withLocalId(nextId()); - } - - @Override - public TimeOfDay createTimeOfDay() { - return super.createTimeOfDay().withLocalId(nextId()); - } - - @Override - public Times createTimes() { - return super.createTimes().withLocalId(nextId()); - } - - @Override - public TimezoneFrom createTimezoneFrom() { - return super.createTimezoneFrom().withLocalId(nextId()); - } - - @Override - public TimezoneOffsetFrom createTimezoneOffsetFrom() { - return super.createTimezoneOffsetFrom().withLocalId(nextId()); - } - - @Override - public ToBoolean createToBoolean() { - return super.createToBoolean().withLocalId(nextId()); - } - - @Override - public ToChars createToChars() { - return super.createToChars().withLocalId(nextId()); - } - - @Override - public ToConcept createToConcept() { - return super.createToConcept().withLocalId(nextId()); - } - - @Override - public ToDate createToDate() { - return super.createToDate().withLocalId(nextId()); - } - - @Override - public ToDateTime createToDateTime() { - return super.createToDateTime().withLocalId(nextId()); - } - - @Override - public ToDecimal createToDecimal() { - return super.createToDecimal().withLocalId(nextId()); - } - - @Override - public ToInteger createToInteger() { - return super.createToInteger().withLocalId(nextId()); - } - - @Override - public ToList createToList() { - return super.createToList().withLocalId(nextId()); - } - - @Override - public ToLong createToLong() { - return super.createToLong().withLocalId(nextId()); - } - - @Override - public ToQuantity createToQuantity() { - return super.createToQuantity().withLocalId(nextId()); - } - - @Override - public ToRatio createToRatio() { - return super.createToRatio().withLocalId(nextId()); - } - - @Override - public ToString createToString() { - return super.createToString().withLocalId(nextId()); - } - - @Override - public ToTime createToTime() { - return super.createToTime().withLocalId(nextId()); - } - - @Override - public Today createToday() { - return super.createToday().withLocalId(nextId()); - } - - @Override - public Total createTotal() { - return super.createTotal().withLocalId(nextId()); - } - - @Override - public Truncate createTruncate() { - return super.createTruncate().withLocalId(nextId()); - } - - @Override - public TruncatedDivide createTruncatedDivide() { - return super.createTruncatedDivide().withLocalId(nextId()); - } - - @Override - public Tuple createTuple() { - return super.createTuple().withLocalId(nextId()); - } - - // @Override - // public TupleElement createTupleElement() { - // return super.createTupleElement().withLocalId(nextId()); - // } - - @Override - public TupleElementDefinition createTupleElementDefinition() { - return super.createTupleElementDefinition().withLocalId(nextId()); - } - - @Override - public TupleTypeSpecifier createTupleTypeSpecifier() { - return super.createTupleTypeSpecifier().withLocalId(nextId()); - } - - @Override - public Union createUnion() { - return super.createUnion().withLocalId(nextId()); - } - - @Override - public Upper createUpper() { - return super.createUpper().withLocalId(nextId()); - } - - @Override - public UsingDef createUsingDef() { - return super.createUsingDef().withLocalId(nextId()); - } - - @Override - public ValueSetDef createValueSetDef() { - return super.createValueSetDef().withLocalId(nextId()); - } - - @Override - public ValueSetRef createValueSetRef() { - return super.createValueSetRef().withLocalId(nextId()); - } - - @Override - public Variance createVariance() { - return super.createVariance().withLocalId(nextId()); - } - - // @Override - // public VersionedIdentifier createVersionedIdentifier() { - // return super.createVersionedIdentifier().withLocalId(nextId()); - // } - - @Override - public Width createWidth() { - return super.createWidth().withLocalId(nextId()); - } - - @Override - public With createWith() { - return super.createWith().withLocalId(nextId()); - } - - @Override - public Without createWithout() { - return super.createWithout().withLocalId(nextId()); - } - - @Override - public Xor createXor() { - return super.createXor().withLocalId(nextId()); - } -} diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt b/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt new file mode 100644 index 000000000..f135ab69b --- /dev/null +++ b/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt @@ -0,0 +1,1232 @@ +package org.cqframework.cql.elm + +import jakarta.xml.bind.JAXBElement +import org.hl7.elm.r1.Abs +import org.hl7.elm.r1.Add +import org.hl7.elm.r1.After +import org.hl7.elm.r1.Aggregate +import org.hl7.elm.r1.AggregateClause +import org.hl7.elm.r1.AliasRef +import org.hl7.elm.r1.AliasedQuerySource +import org.hl7.elm.r1.AllTrue +import org.hl7.elm.r1.And +import org.hl7.elm.r1.AnyInCodeSystem +import org.hl7.elm.r1.AnyInValueSet +import org.hl7.elm.r1.AnyTrue +import org.hl7.elm.r1.As +import org.hl7.elm.r1.Avg +import org.hl7.elm.r1.Before +import org.hl7.elm.r1.ByColumn +import org.hl7.elm.r1.ByDirection +import org.hl7.elm.r1.ByExpression +import org.hl7.elm.r1.CalculateAge +import org.hl7.elm.r1.CalculateAgeAt +import org.hl7.elm.r1.CanConvert +import org.hl7.elm.r1.CanConvertQuantity +import org.hl7.elm.r1.Case +import org.hl7.elm.r1.CaseItem +import org.hl7.elm.r1.Ceiling +import org.hl7.elm.r1.Children +import org.hl7.elm.r1.ChoiceTypeSpecifier +import org.hl7.elm.r1.Coalesce +import org.hl7.elm.r1.Code +import org.hl7.elm.r1.CodeDef +import org.hl7.elm.r1.CodeFilterElement +import org.hl7.elm.r1.CodeRef +import org.hl7.elm.r1.CodeSystemDef +import org.hl7.elm.r1.CodeSystemRef +import org.hl7.elm.r1.Collapse +import org.hl7.elm.r1.Combine +import org.hl7.elm.r1.Concatenate +import org.hl7.elm.r1.Concept +import org.hl7.elm.r1.ConceptDef +import org.hl7.elm.r1.ConceptRef +import org.hl7.elm.r1.Contains +import org.hl7.elm.r1.ContextDef +import org.hl7.elm.r1.Convert +import org.hl7.elm.r1.ConvertQuantity +import org.hl7.elm.r1.ConvertsToBoolean +import org.hl7.elm.r1.ConvertsToDate +import org.hl7.elm.r1.ConvertsToDateTime +import org.hl7.elm.r1.ConvertsToDecimal +import org.hl7.elm.r1.ConvertsToInteger +import org.hl7.elm.r1.ConvertsToLong +import org.hl7.elm.r1.ConvertsToQuantity +import org.hl7.elm.r1.ConvertsToRatio +import org.hl7.elm.r1.ConvertsToString +import org.hl7.elm.r1.ConvertsToTime +import org.hl7.elm.r1.Count +import org.hl7.elm.r1.Current +import org.hl7.elm.r1.Date +import org.hl7.elm.r1.DateFilterElement +import org.hl7.elm.r1.DateFrom +import org.hl7.elm.r1.DateTime +import org.hl7.elm.r1.DateTimeComponentFrom +import org.hl7.elm.r1.Descendents +import org.hl7.elm.r1.DifferenceBetween +import org.hl7.elm.r1.Distinct +import org.hl7.elm.r1.Divide +import org.hl7.elm.r1.DurationBetween +import org.hl7.elm.r1.End +import org.hl7.elm.r1.Ends +import org.hl7.elm.r1.EndsWith +import org.hl7.elm.r1.Equal +import org.hl7.elm.r1.Equivalent +import org.hl7.elm.r1.Except +import org.hl7.elm.r1.Exists +import org.hl7.elm.r1.Exp +import org.hl7.elm.r1.Expand +import org.hl7.elm.r1.ExpandValueSet +import org.hl7.elm.r1.ExpressionDef +import org.hl7.elm.r1.ExpressionRef +import org.hl7.elm.r1.Filter +import org.hl7.elm.r1.First +import org.hl7.elm.r1.Flatten +import org.hl7.elm.r1.Floor +import org.hl7.elm.r1.ForEach +import org.hl7.elm.r1.FunctionDef +import org.hl7.elm.r1.FunctionRef +import org.hl7.elm.r1.GeometricMean +import org.hl7.elm.r1.Greater +import org.hl7.elm.r1.GreaterOrEqual +import org.hl7.elm.r1.HighBoundary +import org.hl7.elm.r1.IdentifierRef +import org.hl7.elm.r1.If +import org.hl7.elm.r1.Implies +import org.hl7.elm.r1.In +import org.hl7.elm.r1.InCodeSystem +import org.hl7.elm.r1.InValueSet +import org.hl7.elm.r1.IncludeDef +import org.hl7.elm.r1.IncludeElement +import org.hl7.elm.r1.IncludedIn +import org.hl7.elm.r1.Includes +import org.hl7.elm.r1.IndexOf +import org.hl7.elm.r1.Indexer +import org.hl7.elm.r1.Instance +import org.hl7.elm.r1.Intersect +import org.hl7.elm.r1.Interval +import org.hl7.elm.r1.IntervalTypeSpecifier +import org.hl7.elm.r1.Is +import org.hl7.elm.r1.IsFalse +import org.hl7.elm.r1.IsNull +import org.hl7.elm.r1.IsTrue +import org.hl7.elm.r1.Iteration +import org.hl7.elm.r1.Last +import org.hl7.elm.r1.LastPositionOf +import org.hl7.elm.r1.Length +import org.hl7.elm.r1.Less +import org.hl7.elm.r1.LessOrEqual +import org.hl7.elm.r1.LetClause +import org.hl7.elm.r1.Library +import org.hl7.elm.r1.List +import org.hl7.elm.r1.ListTypeSpecifier +import org.hl7.elm.r1.Literal +import org.hl7.elm.r1.Ln +import org.hl7.elm.r1.Log +import org.hl7.elm.r1.LowBoundary +import org.hl7.elm.r1.Lower +import org.hl7.elm.r1.Matches +import org.hl7.elm.r1.Max +import org.hl7.elm.r1.MaxValue +import org.hl7.elm.r1.Median +import org.hl7.elm.r1.Meets +import org.hl7.elm.r1.MeetsAfter +import org.hl7.elm.r1.MeetsBefore +import org.hl7.elm.r1.Message +import org.hl7.elm.r1.Min +import org.hl7.elm.r1.MinValue +import org.hl7.elm.r1.Mode +import org.hl7.elm.r1.Modulo +import org.hl7.elm.r1.Multiply +import org.hl7.elm.r1.NamedTypeSpecifier +import org.hl7.elm.r1.Negate +import org.hl7.elm.r1.Not +import org.hl7.elm.r1.NotEqual +import org.hl7.elm.r1.Now +import org.hl7.elm.r1.Null +import org.hl7.elm.r1.ObjectFactory +import org.hl7.elm.r1.OperandDef +import org.hl7.elm.r1.OperandRef +import org.hl7.elm.r1.Or +import org.hl7.elm.r1.OtherFilterElement +import org.hl7.elm.r1.Overlaps +import org.hl7.elm.r1.OverlapsAfter +import org.hl7.elm.r1.OverlapsBefore +import org.hl7.elm.r1.ParameterDef +import org.hl7.elm.r1.ParameterRef +import org.hl7.elm.r1.ParameterTypeSpecifier +import org.hl7.elm.r1.PointFrom +import org.hl7.elm.r1.PopulationStdDev +import org.hl7.elm.r1.PopulationVariance +import org.hl7.elm.r1.PositionOf +import org.hl7.elm.r1.Power +import org.hl7.elm.r1.Precision +import org.hl7.elm.r1.Predecessor +import org.hl7.elm.r1.Product +import org.hl7.elm.r1.ProperContains +import org.hl7.elm.r1.ProperIn +import org.hl7.elm.r1.ProperIncludedIn +import org.hl7.elm.r1.ProperIncludes +import org.hl7.elm.r1.Property +import org.hl7.elm.r1.Quantity +import org.hl7.elm.r1.Query +import org.hl7.elm.r1.QueryLetRef +import org.hl7.elm.r1.Ratio +import org.hl7.elm.r1.Repeat +import org.hl7.elm.r1.ReplaceMatches +import org.hl7.elm.r1.Retrieve +import org.hl7.elm.r1.ReturnClause +import org.hl7.elm.r1.Round +import org.hl7.elm.r1.SameAs +import org.hl7.elm.r1.SameOrAfter +import org.hl7.elm.r1.SameOrBefore +import org.hl7.elm.r1.Search +import org.hl7.elm.r1.SingletonFrom +import org.hl7.elm.r1.Size +import org.hl7.elm.r1.Slice +import org.hl7.elm.r1.Sort +import org.hl7.elm.r1.SortClause +import org.hl7.elm.r1.Split +import org.hl7.elm.r1.SplitOnMatches +import org.hl7.elm.r1.Start +import org.hl7.elm.r1.Starts +import org.hl7.elm.r1.StartsWith +import org.hl7.elm.r1.StdDev +import org.hl7.elm.r1.Substring +import org.hl7.elm.r1.SubsumedBy +import org.hl7.elm.r1.Subsumes +import org.hl7.elm.r1.Subtract +import org.hl7.elm.r1.Successor +import org.hl7.elm.r1.Sum +import org.hl7.elm.r1.Time +import org.hl7.elm.r1.TimeFrom +import org.hl7.elm.r1.TimeOfDay +import org.hl7.elm.r1.Times +import org.hl7.elm.r1.TimezoneFrom +import org.hl7.elm.r1.TimezoneOffsetFrom +import org.hl7.elm.r1.ToBoolean +import org.hl7.elm.r1.ToChars +import org.hl7.elm.r1.ToConcept +import org.hl7.elm.r1.ToDate +import org.hl7.elm.r1.ToDateTime +import org.hl7.elm.r1.ToDecimal +import org.hl7.elm.r1.ToInteger +import org.hl7.elm.r1.ToList +import org.hl7.elm.r1.ToLong +import org.hl7.elm.r1.ToQuantity +import org.hl7.elm.r1.ToRatio +import org.hl7.elm.r1.ToString +import org.hl7.elm.r1.ToTime +import org.hl7.elm.r1.Today +import org.hl7.elm.r1.Total +import org.hl7.elm.r1.Truncate +import org.hl7.elm.r1.TruncatedDivide +import org.hl7.elm.r1.Tuple +import org.hl7.elm.r1.TupleElementDefinition +import org.hl7.elm.r1.TupleTypeSpecifier +import org.hl7.elm.r1.Union +import org.hl7.elm.r1.Upper +import org.hl7.elm.r1.UsingDef +import org.hl7.elm.r1.ValueSetDef +import org.hl7.elm.r1.ValueSetRef +import org.hl7.elm.r1.Variance +import org.hl7.elm.r1.Width +import org.hl7.elm.r1.With +import org.hl7.elm.r1.Without +import org.hl7.elm.r1.Xor + +/* + * Extends the ObjectFactory to allow for decorating the elements created by the factory. If no decorator is provided, nodes are + * given monotonically increasing ids. + * + */ +open class IdObjectFactory : ObjectFactory() { + private var nextId = 0 + + /** + * returns the next id and increments the counter + */ + open fun nextId(): String { + return nextId++.toString() + } + + override fun createAbs(): Abs { + return super.createAbs().withLocalId(nextId()) + } + + override fun createAdd(): Add { + return super.createAdd().withLocalId(nextId()) + } + + override fun createAfter(): After { + return super.createAfter().withLocalId(nextId()) + } + + override fun createAggregate(): Aggregate { + return super.createAggregate().withLocalId(nextId()) + } + + override fun createAggregateClause(): AggregateClause { + return super.createAggregateClause().withLocalId(nextId()) + } + + override fun createAliasRef(): AliasRef { + return super.createAliasRef().withLocalId(nextId()) + } + + override fun createAliasedQuerySource(): AliasedQuerySource { + return super.createAliasedQuerySource().withLocalId(nextId()) + } + + override fun createAllTrue(): AllTrue { + return super.createAllTrue().withLocalId(nextId()) + } + + override fun createAnd(): And { + return super.createAnd().withLocalId(nextId()) + } + + override fun createAnyInCodeSystem(): AnyInCodeSystem { + return super.createAnyInCodeSystem().withLocalId(nextId()) + } + + override fun createAnyInValueSet(): AnyInValueSet { + return super.createAnyInValueSet().withLocalId(nextId()) + } + + override fun createAnyTrue(): AnyTrue { + return super.createAnyTrue().withLocalId(nextId()) + } + + override fun createAs(): As { + return super.createAs().withLocalId(nextId()) + } + + override fun createAvg(): Avg { + return super.createAvg().withLocalId(nextId()) + } + + override fun createBefore(): Before { + return super.createBefore().withLocalId(nextId()) + } + + override fun createByColumn(): ByColumn { + return super.createByColumn().withLocalId(nextId()) + } + + override fun createByDirection(): ByDirection { + return super.createByDirection().withLocalId(nextId()) + } + + override fun createByExpression(): ByExpression { + return super.createByExpression().withLocalId(nextId()) + } + + override fun createCalculateAge(): CalculateAge { + return super.createCalculateAge().withLocalId(nextId()) + } + + override fun createCalculateAgeAt(): CalculateAgeAt { + return super.createCalculateAgeAt().withLocalId(nextId()) + } + + override fun createCanConvert(): CanConvert { + return super.createCanConvert().withLocalId(nextId()) + } + + override fun createCanConvertQuantity(): CanConvertQuantity { + return super.createCanConvertQuantity().withLocalId(nextId()) + } + + override fun createCase(): Case { + return super.createCase().withLocalId(nextId()) + } + + override fun createCaseItem(): CaseItem { + return super.createCaseItem().withLocalId(nextId()) + } + + override fun createCeiling(): Ceiling { + return super.createCeiling().withLocalId(nextId()) + } + + override fun createChildren(): Children { + return super.createChildren().withLocalId(nextId()) + } + + override fun createChoiceTypeSpecifier(): ChoiceTypeSpecifier { + return super.createChoiceTypeSpecifier().withLocalId(nextId()) + } + + override fun createCoalesce(): Coalesce { + return super.createCoalesce().withLocalId(nextId()) + } + + override fun createCode(): Code { + return super.createCode().withLocalId(nextId()) + } + + override fun createCodeDef(): CodeDef { + return super.createCodeDef().withLocalId(nextId()) + } + + override fun createCodeFilterElement(): CodeFilterElement { + return super.createCodeFilterElement().withLocalId(nextId()) + } + + override fun createCodeRef(): CodeRef { + return super.createCodeRef().withLocalId(nextId()) + } + + override fun createCodeSystemDef(): CodeSystemDef { + return super.createCodeSystemDef().withLocalId(nextId()) + } + + override fun createCodeSystemRef(): CodeSystemRef { + return super.createCodeSystemRef().withLocalId(nextId()) + } + + override fun createCollapse(): Collapse { + return super.createCollapse().withLocalId(nextId()) + } + + override fun createCombine(): Combine { + return super.createCombine().withLocalId(nextId()) + } + + override fun createConcatenate(): Concatenate { + return super.createConcatenate().withLocalId(nextId()) + } + + override fun createConcept(): Concept { + return super.createConcept().withLocalId(nextId()) + } + + override fun createConceptDef(): ConceptDef { + return super.createConceptDef().withLocalId(nextId()) + } + + override fun createConceptRef(): ConceptRef { + return super.createConceptRef().withLocalId(nextId()) + } + + override fun createContains(): Contains { + return super.createContains().withLocalId(nextId()) + } + + override fun createContextDef(): ContextDef { + return super.createContextDef().withLocalId(nextId()) + } + + override fun createConvert(): Convert { + return super.createConvert().withLocalId(nextId()) + } + + override fun createConvertQuantity(): ConvertQuantity { + return super.createConvertQuantity().withLocalId(nextId()) + } + + override fun createConvertsToBoolean(): ConvertsToBoolean { + return super.createConvertsToBoolean().withLocalId(nextId()) + } + + override fun createConvertsToDate(): ConvertsToDate { + return super.createConvertsToDate().withLocalId(nextId()) + } + + override fun createConvertsToDateTime(): ConvertsToDateTime { + return super.createConvertsToDateTime().withLocalId(nextId()) + } + + override fun createConvertsToDecimal(): ConvertsToDecimal { + return super.createConvertsToDecimal().withLocalId(nextId()) + } + + override fun createConvertsToInteger(): ConvertsToInteger { + return super.createConvertsToInteger().withLocalId(nextId()) + } + + override fun createConvertsToLong(): ConvertsToLong { + return super.createConvertsToLong().withLocalId(nextId()) + } + + override fun createConvertsToQuantity(): ConvertsToQuantity { + return super.createConvertsToQuantity().withLocalId(nextId()) + } + + override fun createConvertsToRatio(): ConvertsToRatio { + return super.createConvertsToRatio().withLocalId(nextId()) + } + + override fun createConvertsToString(): ConvertsToString { + return super.createConvertsToString().withLocalId(nextId()) + } + + override fun createConvertsToTime(): ConvertsToTime { + return super.createConvertsToTime().withLocalId(nextId()) + } + + override fun createCount(): Count { + return super.createCount().withLocalId(nextId()) + } + + override fun createCurrent(): Current { + return super.createCurrent().withLocalId(nextId()) + } + + override fun createDate(): Date { + return super.createDate().withLocalId(nextId()) + } + + override fun createDateFilterElement(): DateFilterElement { + return super.createDateFilterElement().withLocalId(nextId()) + } + + override fun createDateFrom(): DateFrom { + return super.createDateFrom().withLocalId(nextId()) + } + + override fun createDateTime(): DateTime { + return super.createDateTime().withLocalId(nextId()) + } + + override fun createDateTimeComponentFrom(): DateTimeComponentFrom { + return super.createDateTimeComponentFrom().withLocalId(nextId()) + } + + override fun createDescendents(): Descendents { + return super.createDescendents().withLocalId(nextId()) + } + + override fun createDifferenceBetween(): DifferenceBetween { + return super.createDifferenceBetween().withLocalId(nextId()) + } + + override fun createDistinct(): Distinct { + return super.createDistinct().withLocalId(nextId()) + } + + override fun createDivide(): Divide { + return super.createDivide().withLocalId(nextId()) + } + + override fun createDurationBetween(): DurationBetween { + return super.createDurationBetween().withLocalId(nextId()) + } + + override fun createEnd(): End { + return super.createEnd().withLocalId(nextId()) + } + + override fun createEnds(): Ends { + return super.createEnds().withLocalId(nextId()) + } + + override fun createEndsWith(): EndsWith { + return super.createEndsWith().withLocalId(nextId()) + } + + override fun createEqual(): Equal { + return super.createEqual().withLocalId(nextId()) + } + + override fun createEquivalent(): Equivalent { + return super.createEquivalent().withLocalId(nextId()) + } + + override fun createExcept(): Except { + return super.createExcept().withLocalId(nextId()) + } + + override fun createExists(): Exists { + return super.createExists().withLocalId(nextId()) + } + + override fun createExp(): Exp { + return super.createExp().withLocalId(nextId()) + } + + override fun createExpand(): Expand { + return super.createExpand().withLocalId(nextId()) + } + + override fun createExpandValueSet(): ExpandValueSet { + return super.createExpandValueSet().withLocalId(nextId()) + } + + override fun createExpressionDef(): ExpressionDef { + return super.createExpressionDef().withLocalId(nextId()) + } + + override fun createExpressionRef(): ExpressionRef { + return super.createExpressionRef().withLocalId(nextId()) + } + + override fun createFilter(): Filter { + return super.createFilter().withLocalId(nextId()) + } + + override fun createFirst(): First { + return super.createFirst().withLocalId(nextId()) + } + + override fun createFlatten(): Flatten { + return super.createFlatten().withLocalId(nextId()) + } + + override fun createFloor(): Floor { + return super.createFloor().withLocalId(nextId()) + } + + override fun createForEach(): ForEach { + return super.createForEach().withLocalId(nextId()) + } + + override fun createFunctionDef(): FunctionDef { + return super.createFunctionDef().withLocalId(nextId()) + } + + override fun createFunctionRef(): FunctionRef { + return super.createFunctionRef().withLocalId(nextId()) + } + + override fun createGeometricMean(): GeometricMean { + return super.createGeometricMean().withLocalId(nextId()) + } + + override fun createGreater(): Greater { + return super.createGreater().withLocalId(nextId()) + } + + override fun createGreaterOrEqual(): GreaterOrEqual { + return super.createGreaterOrEqual().withLocalId(nextId()) + } + + override fun createHighBoundary(): HighBoundary { + return super.createHighBoundary().withLocalId(nextId()) + } + + override fun createIdentifierRef(): IdentifierRef { + return super.createIdentifierRef().withLocalId(nextId()) + } + + override fun createIf(): If { + return super.createIf().withLocalId(nextId()) + } + + override fun createImplies(): Implies { + return super.createImplies().withLocalId(nextId()) + } + + override fun createIn(): In { + return super.createIn().withLocalId(nextId()) + } + + override fun createInCodeSystem(): InCodeSystem { + return super.createInCodeSystem().withLocalId(nextId()) + } + + override fun createInValueSet(): InValueSet { + return super.createInValueSet().withLocalId(nextId()) + } + + override fun createIncludeDef(): IncludeDef { + return super.createIncludeDef().withLocalId(nextId()) + } + + override fun createIncludeElement(): IncludeElement { + return super.createIncludeElement().withLocalId(nextId()) + } + + override fun createIncludedIn(): IncludedIn { + return super.createIncludedIn().withLocalId(nextId()) + } + + override fun createIncludes(): Includes { + return super.createIncludes().withLocalId(nextId()) + } + + override fun createIndexOf(): IndexOf { + return super.createIndexOf().withLocalId(nextId()) + } + + override fun createIndexer(): Indexer { + return super.createIndexer().withLocalId(nextId()) + } + + override fun createInstance(): Instance { + return super.createInstance().withLocalId(nextId()) + } + + // @Override + // public InstanceElement createInstanceElement() { + // return super.createInstanceElement().withLocalId(nextId()); + // } + override fun createIntersect(): Intersect { + return super.createIntersect().withLocalId(nextId()) + } + + override fun createInterval(): Interval { + return super.createInterval().withLocalId(nextId()) + } + + override fun createIntervalTypeSpecifier(): IntervalTypeSpecifier { + return super.createIntervalTypeSpecifier().withLocalId(nextId()) + } + + override fun createIs(): Is { + return super.createIs().withLocalId(nextId()) + } + + override fun createIsFalse(): IsFalse { + return super.createIsFalse().withLocalId(nextId()) + } + + override fun createIsNull(): IsNull { + return super.createIsNull().withLocalId(nextId()) + } + + override fun createIsTrue(): IsTrue { + return super.createIsTrue().withLocalId(nextId()) + } + + override fun createIteration(): Iteration { + return super.createIteration().withLocalId(nextId()) + } + + override fun createLast(): Last { + return super.createLast().withLocalId(nextId()) + } + + override fun createLastPositionOf(): LastPositionOf { + return super.createLastPositionOf().withLocalId(nextId()) + } + + override fun createLength(): Length { + return super.createLength().withLocalId(nextId()) + } + + override fun createLess(): Less { + return super.createLess().withLocalId(nextId()) + } + + override fun createLessOrEqual(): LessOrEqual { + return super.createLessOrEqual().withLocalId(nextId()) + } + + override fun createLetClause(): LetClause { + return super.createLetClause().withLocalId(nextId()) + } + + override fun createLibrary(): Library { + return super.createLibrary().withLocalId(nextId()) + } + + override fun createLibrary(value: Library): JAXBElement { + return super.createLibrary(value) + } + + // @Override + // public CodeSystems createLibraryCodeSystems() { + // return super.createLibraryCodeSystems().withLocalId(nextId()); + // } + // @Override + // public Codes createLibraryCodes() { + // return super.createLibraryCodes().withLocalId(nextId()); + // } + // @Override + // public Concepts createLibraryConcepts() { + // return super.createLibraryConcepts().withLocalId(nextId()); + // } + // @Override + // public Contexts createLibraryContexts() { + // return super.createLibraryContexts().withLocalId(nextId()); + // } + // @Override + // public Includes createLibraryIncludes() { + // return super.createLibraryIncludes().withLocalId(nextId()); + // } + // @Override + // public Parameters createLibraryParameters() { + // return super.createLibraryParameters().withLocalId(nextId()); + // } + // @Override + // public Statements createLibraryStatements() { + // return super.createLibraryStatements().withLocalId(nextId()); + // } + // @Override + // public Usings createLibraryUsings() { + // return super.createLibraryUsings().withLocalId(nextId()); + // } + // @Override + // public ValueSets createLibraryValueSets() { + // return super.createLibraryValueSets().withLocalId(nextId()); + // } + override fun createList(): List { + return super.createList().withLocalId(nextId()) + } + + override fun createListTypeSpecifier(): ListTypeSpecifier { + return super.createListTypeSpecifier().withLocalId(nextId()) + } + + override fun createLiteral(): Literal { + return super.createLiteral().withLocalId(nextId()) + } + + override fun createLn(): Ln { + return super.createLn().withLocalId(nextId()) + } + + override fun createLog(): Log { + return super.createLog().withLocalId(nextId()) + } + + override fun createLowBoundary(): LowBoundary { + return super.createLowBoundary().withLocalId(nextId()) + } + + override fun createLower(): Lower { + return super.createLower().withLocalId(nextId()) + } + + override fun createMatches(): Matches { + return super.createMatches().withLocalId(nextId()) + } + + override fun createMax(): Max { + return super.createMax().withLocalId(nextId()) + } + + override fun createMaxValue(): MaxValue { + return super.createMaxValue().withLocalId(nextId()) + } + + override fun createMedian(): Median { + return super.createMedian().withLocalId(nextId()) + } + + override fun createMeets(): Meets { + return super.createMeets().withLocalId(nextId()) + } + + override fun createMeetsAfter(): MeetsAfter { + return super.createMeetsAfter().withLocalId(nextId()) + } + + override fun createMeetsBefore(): MeetsBefore { + return super.createMeetsBefore().withLocalId(nextId()) + } + + override fun createMessage(): Message { + return super.createMessage().withLocalId(nextId()) + } + + override fun createMin(): Min { + return super.createMin().withLocalId(nextId()) + } + + override fun createMinValue(): MinValue { + return super.createMinValue().withLocalId(nextId()) + } + + override fun createMode(): Mode { + return super.createMode().withLocalId(nextId()) + } + + override fun createModulo(): Modulo { + return super.createModulo().withLocalId(nextId()) + } + + override fun createMultiply(): Multiply { + return super.createMultiply().withLocalId(nextId()) + } + + override fun createNamedTypeSpecifier(): NamedTypeSpecifier { + return super.createNamedTypeSpecifier().withLocalId(nextId()) + } + + override fun createNegate(): Negate { + return super.createNegate().withLocalId(nextId()) + } + + override fun createNot(): Not { + return super.createNot().withLocalId(nextId()) + } + + override fun createNotEqual(): NotEqual { + return super.createNotEqual().withLocalId(nextId()) + } + + override fun createNow(): Now { + return super.createNow().withLocalId(nextId()) + } + + override fun createNull(): Null { + return super.createNull().withLocalId(nextId()) + } + + override fun createOperandDef(): OperandDef { + return super.createOperandDef().withLocalId(nextId()) + } + + override fun createOperandRef(): OperandRef { + return super.createOperandRef().withLocalId(nextId()) + } + + override fun createOr(): Or { + return super.createOr().withLocalId(nextId()) + } + + override fun createOtherFilterElement(): OtherFilterElement { + return super.createOtherFilterElement().withLocalId(nextId()) + } + + override fun createOverlaps(): Overlaps { + return super.createOverlaps().withLocalId(nextId()) + } + + override fun createOverlapsAfter(): OverlapsAfter { + return super.createOverlapsAfter().withLocalId(nextId()) + } + + override fun createOverlapsBefore(): OverlapsBefore { + return super.createOverlapsBefore().withLocalId(nextId()) + } + + override fun createParameterDef(): ParameterDef { + return super.createParameterDef().withLocalId(nextId()) + } + + override fun createParameterRef(): ParameterRef { + return super.createParameterRef().withLocalId(nextId()) + } + + override fun createParameterTypeSpecifier(): ParameterTypeSpecifier { + return super.createParameterTypeSpecifier().withLocalId(nextId()) + } + + override fun createPointFrom(): PointFrom { + return super.createPointFrom().withLocalId(nextId()) + } + + override fun createPopulationStdDev(): PopulationStdDev { + return super.createPopulationStdDev().withLocalId(nextId()) + } + + override fun createPopulationVariance(): PopulationVariance { + return super.createPopulationVariance().withLocalId(nextId()) + } + + override fun createPositionOf(): PositionOf { + return super.createPositionOf().withLocalId(nextId()) + } + + override fun createPower(): Power { + return super.createPower().withLocalId(nextId()) + } + + override fun createPrecision(): Precision { + return super.createPrecision().withLocalId(nextId()) + } + + override fun createPredecessor(): Predecessor { + return super.createPredecessor().withLocalId(nextId()) + } + + override fun createProduct(): Product { + return super.createProduct().withLocalId(nextId()) + } + + override fun createProperContains(): ProperContains { + return super.createProperContains().withLocalId(nextId()) + } + + override fun createProperIn(): ProperIn { + return super.createProperIn().withLocalId(nextId()) + } + + override fun createProperIncludedIn(): ProperIncludedIn { + return super.createProperIncludedIn().withLocalId(nextId()) + } + + override fun createProperIncludes(): ProperIncludes { + return super.createProperIncludes().withLocalId(nextId()) + } + + override fun createProperty(): Property { + return super.createProperty().withLocalId(nextId()) + } + + override fun createQuantity(): Quantity { + return super.createQuantity().withLocalId(nextId()) + } + + override fun createQuery(): Query { + return super.createQuery().withLocalId(nextId()) + } + + override fun createQueryLetRef(): QueryLetRef { + return super.createQueryLetRef().withLocalId(nextId()) + } + + override fun createRatio(): Ratio { + return super.createRatio().withLocalId(nextId()) + } + + override fun createRepeat(): Repeat { + return super.createRepeat().withLocalId(nextId()) + } + + override fun createReplaceMatches(): ReplaceMatches { + return super.createReplaceMatches().withLocalId(nextId()) + } + + override fun createRetrieve(): Retrieve { + return super.createRetrieve().withLocalId(nextId()) + } + + override fun createReturnClause(): ReturnClause { + return super.createReturnClause().withLocalId(nextId()) + } + + override fun createRound(): Round { + return super.createRound().withLocalId(nextId()) + } + + override fun createSameAs(): SameAs { + return super.createSameAs().withLocalId(nextId()) + } + + override fun createSameOrAfter(): SameOrAfter { + return super.createSameOrAfter().withLocalId(nextId()) + } + + override fun createSameOrBefore(): SameOrBefore { + return super.createSameOrBefore().withLocalId(nextId()) + } + + override fun createSearch(): Search { + return super.createSearch().withLocalId(nextId()) + } + + override fun createSingletonFrom(): SingletonFrom { + return super.createSingletonFrom().withLocalId(nextId()) + } + + override fun createSize(): Size { + return super.createSize().withLocalId(nextId()) + } + + override fun createSlice(): Slice { + return super.createSlice().withLocalId(nextId()) + } + + override fun createSort(): Sort { + return super.createSort().withLocalId(nextId()) + } + + override fun createSortClause(): SortClause { + return super.createSortClause().withLocalId(nextId()) + } + + override fun createSplit(): Split { + return super.createSplit().withLocalId(nextId()) + } + + override fun createSplitOnMatches(): SplitOnMatches { + return super.createSplitOnMatches().withLocalId(nextId()) + } + + override fun createStart(): Start { + return super.createStart().withLocalId(nextId()) + } + + override fun createStarts(): Starts { + return super.createStarts().withLocalId(nextId()) + } + + override fun createStartsWith(): StartsWith { + return super.createStartsWith().withLocalId(nextId()) + } + + override fun createStdDev(): StdDev { + return super.createStdDev().withLocalId(nextId()) + } + + override fun createSubstring(): Substring { + return super.createSubstring().withLocalId(nextId()) + } + + override fun createSubsumedBy(): SubsumedBy { + return super.createSubsumedBy().withLocalId(nextId()) + } + + override fun createSubsumes(): Subsumes { + return super.createSubsumes().withLocalId(nextId()) + } + + override fun createSubtract(): Subtract { + return super.createSubtract().withLocalId(nextId()) + } + + override fun createSuccessor(): Successor { + return super.createSuccessor().withLocalId(nextId()) + } + + override fun createSum(): Sum { + return super.createSum().withLocalId(nextId()) + } + + override fun createTime(): Time { + return super.createTime().withLocalId(nextId()) + } + + override fun createTimeFrom(): TimeFrom { + return super.createTimeFrom().withLocalId(nextId()) + } + + override fun createTimeOfDay(): TimeOfDay { + return super.createTimeOfDay().withLocalId(nextId()) + } + + override fun createTimes(): Times { + return super.createTimes().withLocalId(nextId()) + } + + override fun createTimezoneFrom(): TimezoneFrom { + return super.createTimezoneFrom().withLocalId(nextId()) + } + + override fun createTimezoneOffsetFrom(): TimezoneOffsetFrom { + return super.createTimezoneOffsetFrom().withLocalId(nextId()) + } + + override fun createToBoolean(): ToBoolean { + return super.createToBoolean().withLocalId(nextId()) + } + + override fun createToChars(): ToChars { + return super.createToChars().withLocalId(nextId()) + } + + override fun createToConcept(): ToConcept { + return super.createToConcept().withLocalId(nextId()) + } + + override fun createToDate(): ToDate { + return super.createToDate().withLocalId(nextId()) + } + + override fun createToDateTime(): ToDateTime { + return super.createToDateTime().withLocalId(nextId()) + } + + override fun createToDecimal(): ToDecimal { + return super.createToDecimal().withLocalId(nextId()) + } + + override fun createToInteger(): ToInteger { + return super.createToInteger().withLocalId(nextId()) + } + + override fun createToList(): ToList { + return super.createToList().withLocalId(nextId()) + } + + override fun createToLong(): ToLong { + return super.createToLong().withLocalId(nextId()) + } + + override fun createToQuantity(): ToQuantity { + return super.createToQuantity().withLocalId(nextId()) + } + + override fun createToRatio(): ToRatio { + return super.createToRatio().withLocalId(nextId()) + } + + override fun createToString(): ToString { + return super.createToString().withLocalId(nextId()) + } + + override fun createToTime(): ToTime { + return super.createToTime().withLocalId(nextId()) + } + + override fun createToday(): Today { + return super.createToday().withLocalId(nextId()) + } + + override fun createTotal(): Total { + return super.createTotal().withLocalId(nextId()) + } + + override fun createTruncate(): Truncate { + return super.createTruncate().withLocalId(nextId()) + } + + override fun createTruncatedDivide(): TruncatedDivide { + return super.createTruncatedDivide().withLocalId(nextId()) + } + + override fun createTuple(): Tuple { + return super.createTuple().withLocalId(nextId()) + } + + // @Override + // public TupleElement createTupleElement() { + // return super.createTupleElement().withLocalId(nextId()); + // } + override fun createTupleElementDefinition(): TupleElementDefinition { + return super.createTupleElementDefinition().withLocalId(nextId()) + } + + override fun createTupleTypeSpecifier(): TupleTypeSpecifier { + return super.createTupleTypeSpecifier().withLocalId(nextId()) + } + + override fun createUnion(): Union { + return super.createUnion().withLocalId(nextId()) + } + + override fun createUpper(): Upper { + return super.createUpper().withLocalId(nextId()) + } + + override fun createUsingDef(): UsingDef { + return super.createUsingDef().withLocalId(nextId()) + } + + override fun createValueSetDef(): ValueSetDef { + return super.createValueSetDef().withLocalId(nextId()) + } + + override fun createValueSetRef(): ValueSetRef { + return super.createValueSetRef().withLocalId(nextId()) + } + + override fun createVariance(): Variance { + return super.createVariance().withLocalId(nextId()) + } + + // @Override + // public VersionedIdentifier createVersionedIdentifier() { + // return super.createVersionedIdentifier().withLocalId(nextId()); + // } + override fun createWidth(): Width { + return super.createWidth().withLocalId(nextId()) + } + + override fun createWith(): With { + return super.createWith().withLocalId(nextId()) + } + + override fun createWithout(): Without { + return super.createWithout().withLocalId(nextId()) + } + + override fun createXor(): Xor { + return super.createXor().withLocalId(nextId()) + } +} diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.java b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.java deleted file mode 100644 index c4fdc72bf..000000000 --- a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.cqframework.cql.elm.visiting; - -import java.util.Objects; -import java.util.function.BiFunction; -import org.cqframework.cql.elm.tracking.Trackable; - -/** - * The is a base class for visitors that apply functions to all the visited ELM elements. - * Useful for quick visitor implementations, such as counting all nodes, or finding a specific element - * type. - */ -public class FunctionalElmVisitor extends BaseElmLibraryVisitor { - - private final BiFunction defaultResult; - private final BiFunction aggregateResult; - - /** - * Constructor that takes a default visit function and an aggregate result function. - * @param defaultResult the function for processing a visited element - * @param aggregateResult the function for aggregating results - */ - public FunctionalElmVisitor(BiFunction defaultResult, BiFunction aggregateResult) { - this.defaultResult = Objects.requireNonNull(defaultResult); - this.aggregateResult = Objects.requireNonNull(aggregateResult); - } - - @Override - public T defaultResult(Trackable elm, C context) { - return this.defaultResult.apply(elm, context); - } - - @Override - public T aggregateResult(T aggregate, T nextResult) { - return this.aggregateResult.apply(aggregate, nextResult); - } - - public static FunctionalElmVisitor from( - BiFunction defaultResult, BiFunction aggregateResult) { - return new FunctionalElmVisitor<>(defaultResult, aggregateResult); - } -} diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.kt b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.kt new file mode 100644 index 000000000..acac76355 --- /dev/null +++ b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/FunctionalElmVisitor.kt @@ -0,0 +1,23 @@ +package org.cqframework.cql.elm.visiting + +import java.util.function.BiFunction +import org.cqframework.cql.elm.tracking.Trackable + +/** + * This is a base class for visitors that apply functions to all the visited ELM elements. Useful + * for quick visitor implementations, such as counting all nodes, or finding a specific element + * type. + */ +class FunctionalElmVisitor( + private val defaultResult: BiFunction, + private val aggregateResult: BiFunction +) : BaseElmLibraryVisitor() { + + public override fun defaultResult(elm: Trackable?, context: C): T { + return defaultResult.apply(elm, context) + } + + public override fun aggregateResult(aggregate: T, nextResult: T): T { + return aggregateResult.apply(aggregate, nextResult) + } +} diff --git a/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.java b/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.java deleted file mode 100644 index c29a18c27..000000000 --- a/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.java +++ /dev/null @@ -1,149 +0,0 @@ -package org.cqframework.cql.elm.visiting; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.lang.reflect.Field; -import java.nio.charset.Charset; -import java.util.HashMap; -import javax.xml.namespace.QName; -import org.hl7.cql_annotations.r1.Narrative; -import org.hl7.elm.r1.AccessModifier; -import org.hl7.elm.r1.Element; -import org.hl7.elm.r1.Library; -import org.hl7.elm.r1.TypeSpecifier; -import org.jeasy.random.EasyRandom; -import org.jeasy.random.EasyRandomParameters; -import org.jeasy.random.ObjenesisObjectFactory; -import org.jeasy.random.api.ExclusionPolicy; -import org.jeasy.random.api.RandomizerContext; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -public class RandomElmGraphTest { - - public static Object[] seeds() { - // I randomly picked these seeds until - // I got 3 in a row that passed without errors. - // Not perfect, but it's a start. - return new Object[] {96874, 15895, 121873, 174617}; - } - - @ParameterizedTest - @MethodSource("seeds") - void allNodesVisited(int seed) { - // This test generates a random ELM graph and verifies that all nodes are - // visited exactly once. - var elementsGenerated = new HashMap(); - var countingObjectFactory = new ObjenesisObjectFactory() { - @Override - public T createInstance(Class type, RandomizerContext context) { - var t = super.createInstance(type, context); - if (t instanceof Element) { - var hash = System.identityHashCode(t); - elementsGenerated.put(hash, (Element) t); - } - - // Debugging for specific types and paths - // that aren't being visited. - // if (t instanceof ConvertsToDate || t instanceof SplitOnMatches || t instanceof DateFrom) { - // printContext((Element) t, context); - // } - - return t; - } - - private void printContext(Element t, RandomizerContext context) { - System.err.println(String.format( - "Type: %s, Parent: %s, Path: %s, Hash: %s", - t.getClass().getSimpleName(), - context.getCurrentObject().getClass().getSimpleName(), - context.getCurrentField(), - System.identityHashCode(t))); - } - }; - - var randomParams = new EasyRandomParameters() - .objectFactory(countingObjectFactory) - .seed(seed) - .randomizationDepth(15) - .objectPoolSize(1000) // Never reuse objects - .charset(Charset.forName("UTF-8")) - .stringLengthRange(5, 50) - .collectionSizeRange(1, 3) - .exclusionPolicy(new NoTypeSpecifierRecursionPolicy()) - .scanClasspathForConcreteTypes(true); - - var randomElmGenerator = new EasyRandom(randomParams); - var randomElm = randomElmGenerator.nextObject(Library.class); - - var elementsGeneratedCount = elementsGenerated.size(); - - var elementsVisited = new HashMap(); - var elementsDuplicated = new HashMap(); - var countingVisitor = new FunctionalElmVisitor>( - (x, y) -> { - if (x instanceof Element) { - var hash = System.identityHashCode(x); - if (!elementsVisited.containsKey(hash)) { - elementsVisited.put(hash, (Element) x); - return 1; - } - elementsDuplicated.put(hash, (Element) x); - return 0; - } - return 0; - }, - (a, b) -> a + b); - - var visitorCount = countingVisitor.visitLibrary(randomElm, elementsVisited); - - elementsGenerated.keySet().removeAll(elementsVisited.keySet()); - if (!elementsGenerated.isEmpty()) { - System.err.println("Elements Missed:"); - elementsGenerated.forEach((x, e) -> System.err.println( - String.format("Type: %s, Hash: %s", e.getClass().getSimpleName(), x))); - } - - // No missed nodes, working as intended - assertEquals(0, elementsGenerated.size()); - - // Check that we didn't double-visit any nodes - if (!elementsDuplicated.isEmpty()) { - System.err.println("Elements Duplicated:"); - elementsDuplicated.forEach((x, e) -> System.err.println( - String.format("Type: %s, Hash: %s", e.getClass().getSimpleName(), x))); - } - - // No duplicate visits, working as intended - assertEquals(0, elementsDuplicated.size()); - - // if these are equal, then aggregateResult - // ran once for every node in the graph (working as intended) - assertEquals(visitorCount.intValue(), elementsGeneratedCount); - } - - class NoTypeSpecifierRecursionPolicy implements ExclusionPolicy { - - // Don't recurse into TypeSpecifier.resultTypeSpecifier - @Override - public boolean shouldBeExcluded(Field field, RandomizerContext context) { - if (field.getType().getPackageName().startsWith("org.hl7.cql")) { - return true; - } - - return (field.getName().equals("resultTypeSpecifier") - && TypeSpecifier.class.isAssignableFrom(field.getType())) - || field.getName().equals("signature"); - } - - // These are excluded to simplify the ELM graph while bugs are being worked out. - @Override - public boolean shouldBeExcluded(Class type, RandomizerContext context) { - if (type.getPackageName().startsWith("org.hl7.cql")) { - return true; - } - - return type == QName.class || type == Narrative.class || type == AccessModifier.class; - } - } -} diff --git a/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt b/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt new file mode 100644 index 000000000..d22a4037d --- /dev/null +++ b/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt @@ -0,0 +1,159 @@ +package org.cqframework.cql.elm.visiting + +import org.cqframework.cql.elm.tracking.Trackable +import org.hl7.cql_annotations.r1.Narrative +import org.hl7.elm.r1.AccessModifier +import org.hl7.elm.r1.Element +import org.hl7.elm.r1.Library +import org.hl7.elm.r1.TypeSpecifier +import org.jeasy.random.EasyRandom +import org.jeasy.random.EasyRandomParameters +import org.jeasy.random.ObjenesisObjectFactory +import org.jeasy.random.api.ExclusionPolicy +import org.jeasy.random.api.RandomizerContext +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import java.lang.reflect.Field +import java.nio.charset.StandardCharsets +import java.util.function.BiFunction +import javax.xml.namespace.QName + +class RandomElmGraphTest { + @ParameterizedTest + @MethodSource("seeds") + fun allNodesVisited(seed: Int) { + // This test generates a random ELM graph and verifies that all nodes are + // visited exactly once. + val elementsGenerated = HashMap() + val countingObjectFactory: ObjenesisObjectFactory = object : ObjenesisObjectFactory() { + override fun createInstance(type: Class, context: RandomizerContext): T { + val t = super.createInstance(type, context) + if (t is Element) { + val hash = System.identityHashCode(t) + elementsGenerated[hash] = t + } + + // Debugging for specific types and paths + // that aren't being visited. + // if (t instanceof ConvertsToDate || t instanceof SplitOnMatches || t instanceof DateFrom) { + // printContext((Element) t, context); + // } + return t + } + + private fun printContext(t: Element, context: RandomizerContext) { + System.err.printf( + "Type: %s, Parent: %s, Path: %s, Hash: %s%n", + t.javaClass.simpleName, + context.currentObject.javaClass.simpleName, + context.currentField, + System.identityHashCode(t) + ) + } + } + + val randomParams = EasyRandomParameters() + .objectFactory(countingObjectFactory) + .seed(seed.toLong()) + .randomizationDepth(15) + .objectPoolSize(1000) // Never reuse objects + .charset(StandardCharsets.UTF_8) + .stringLengthRange(5, 50) + .collectionSizeRange(1, 3) + .exclusionPolicy(NoTypeSpecifierRecursionPolicy()) + .scanClasspathForConcreteTypes(true) + + val randomElmGenerator = EasyRandom(randomParams) + val randomElm = randomElmGenerator.nextObject(Library::class.java) + + val elementsGeneratedCount = elementsGenerated.size + + val elementsVisited = HashMap() + val elementsDuplicated = HashMap() + val countingVisitor = FunctionalElmVisitor ( + BiFunction, Int> { x: Trackable?, y: HashMap? -> + if (x is Element) { + val hash = System.identityHashCode(x) + if (!elementsVisited.containsKey(hash)) { + elementsVisited[hash] = x + return@BiFunction 1 + } + elementsDuplicated[hash] = x + return@BiFunction 0 + } + 0 + } + ) { a: Int?, b: Int? -> + Integer.sum( + a!!, b!! + ) + } + + val visitorCount = countingVisitor.visitLibrary(randomElm, elementsVisited) + + elementsGenerated.keys.removeAll(elementsVisited.keys) + if (elementsGenerated.isNotEmpty()) { + System.err.println("Elements Missed:") + elementsGenerated.forEach { (x: Int?, e: Element) -> + System.err.printf( + "Type: %s, Hash: %s%n", + e.javaClass.simpleName, + x + ) + } + } + + // No missed nodes, working as intended + Assertions.assertEquals(0, elementsGenerated.size) + + // Check that we didn't double-visit any nodes + if (elementsDuplicated.isNotEmpty()) { + System.err.println("Elements Duplicated:") + elementsDuplicated.forEach { (x: Int?, e: Element) -> + System.err.printf( + "Type: %s, Hash: %s%n", + e.javaClass.simpleName, + x + ) + } + } + + // No duplicate visits, working as intended + Assertions.assertEquals(0, elementsDuplicated.size) + + // if these are equal, then aggregateResult + // ran once for every node in the graph (working as intended) + Assertions.assertEquals(visitorCount, elementsGeneratedCount) + } + + internal class NoTypeSpecifierRecursionPolicy : ExclusionPolicy { + // Don't recurse into TypeSpecifier.resultTypeSpecifier + override fun shouldBeExcluded(field: Field, context: RandomizerContext): Boolean { + if (field.type.packageName.startsWith("org.hl7.cql")) { + return true + } + + return ((field.name == "resultTypeSpecifier" && TypeSpecifier::class.java.isAssignableFrom(field.type)) + || (field.name == "signature")) + } + + // These are excluded to simplify the ELM graph while bugs are being worked out. + override fun shouldBeExcluded(type: Class<*>, context: RandomizerContext): Boolean { + if (type.packageName.startsWith("org.hl7.cql")) { + return true + } + + return type == QName::class.java || type == Narrative::class.java || type == AccessModifier::class.java + } + } + + companion object { + fun seeds(): Array { + // I randomly picked these seeds until + // I got 3 in a row that passed without errors. + // Not perfect, but it's a start. + return arrayOf(96874, 15895, 121873, 174617) + } + } +} diff --git a/Src/java/tools/cql-formatter/src/main/java/org/cqframework/cql/tools/formatter/CqlFormatterVisitor.java b/Src/java/tools/cql-formatter/src/main/java/org/cqframework/cql/tools/formatter/CqlFormatterVisitor.java index e6fa66293..54354b25c 100644 --- a/Src/java/tools/cql-formatter/src/main/java/org/cqframework/cql/tools/formatter/CqlFormatterVisitor.java +++ b/Src/java/tools/cql-formatter/src/main/java/org/cqframework/cql/tools/formatter/CqlFormatterVisitor.java @@ -8,8 +8,8 @@ import java.util.List; import java.util.Stack; import java.util.stream.Collectors; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.tree.*; +import org.antlr.v4.kotlinruntime.*; +import org.antlr.v4.kotlinruntime.tree.*; import org.cqframework.cql.gen.cqlBaseVisitor; import org.cqframework.cql.gen.cqlLexer; import org.cqframework.cql.gen.cqlParser; @@ -22,7 +22,7 @@ public class CqlFormatterVisitor extends cqlBaseVisitor { private static List comments = new ArrayList<>(); public static FormatResult getFormattedOutput(InputStream is) throws IOException { - CharStream in = CharStreams.fromStream(is); + CharStream in = CharStreams.INSTANCE.fromStream(is); cqlLexer lexer = new cqlLexer(in); CommonTokenStream tokens = new CommonTokenStream(lexer); tokens.fill(); @@ -1450,6 +1450,11 @@ private void checkForComment(TerminalNode node) { } } + @Override + protected Object defaultResult() { + return null; + } + private static class CommentToken { private Token token; private String whitespaceBefore; diff --git a/Src/java/tools/cql-parsetree/build.gradle.kts b/Src/java/tools/cql-parsetree/build.gradle.kts index 8475d5f02..e256c3ba8 100644 --- a/Src/java/tools/cql-parsetree/build.gradle.kts +++ b/Src/java/tools/cql-parsetree/build.gradle.kts @@ -9,8 +9,4 @@ application { dependencies { implementation(project(":cql")) - implementation("org.antlr:antlr4:4.10.1") { - // antlr 4.5 includes these classes directly - exclude(group= "org.abego.treelayout", module= "org.abego.treelayout.core") - } } \ No newline at end of file diff --git a/Src/java/tools/cql-parsetree/src/main/java/org/cqframework/cql/tools/parsetree/Main.java b/Src/java/tools/cql-parsetree/src/main/java/org/cqframework/cql/tools/parsetree/Main.java index 8ee72216f..44b3e82d0 100644 --- a/Src/java/tools/cql-parsetree/src/main/java/org/cqframework/cql/tools/parsetree/Main.java +++ b/Src/java/tools/cql-parsetree/src/main/java/org/cqframework/cql/tools/parsetree/Main.java @@ -3,11 +3,10 @@ import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import org.antlr.v4.gui.Trees; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; -import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.kotlinruntime.CharStream; +import org.antlr.v4.kotlinruntime.CharStreams; +import org.antlr.v4.kotlinruntime.CommonTokenStream; +import org.antlr.v4.kotlinruntime.ParserRuleContext; import org.cqframework.cql.gen.cqlLexer; import org.cqframework.cql.gen.cqlParser; @@ -24,13 +23,13 @@ public static void main(String[] args) throws IOException { if (inputFile != null) { is = new FileInputStream(inputFile); } - CharStream input = CharStreams.fromStream(is); + CharStream input = CharStreams.INSTANCE.fromStream(is); cqlLexer lexer = new cqlLexer(input); CommonTokenStream tokens = new CommonTokenStream(lexer); tokens.fill(); cqlParser parser = new cqlParser(tokens); parser.setBuildParseTree(true); ParserRuleContext tree = parser.library(); - Trees.inspect(tree, parser); + // Trees.inspect(tree, parser); } } From 1cf7a685bfc83f699993a3fec2f448424c980980 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Fri, 20 Sep 2024 08:39:08 -0600 Subject: [PATCH 23/77] Fix formatting --- .../cqframework/cql/cql2elm/CqlCompiler.java | 1 - .../cql/cql2elm/CqlTranslator.java | 10 +- .../cqframework/cql/cql2elm/model/Chunk.java | 13 +- .../CqlPreprocessorElmCommonVisitor.java | 6 +- .../java/org/cqframework/cql/Application.kt | 2 +- .../cqframework/cql/elm/IdObjectFactory.kt | 4 +- .../cql/elm/visiting/RandomElmGraphTest.kt | 129 +++++++++--------- 7 files changed, 85 insertions(+), 80 deletions(-) diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java index bf5cd1b8d..c36b77bd2 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlCompiler.java @@ -14,7 +14,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; - import org.antlr.v4.kotlinruntime.*; import org.antlr.v4.kotlinruntime.tree.ParseTree; import org.cqframework.cql.cql2elm.elm.ElmEdit; diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java index aed591b47..f58c3de0a 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/CqlTranslator.java @@ -73,7 +73,10 @@ public static CqlTranslator fromFile(NamespaceInfo namespaceInfo, String cqlFile public static CqlTranslator fromFile(File cqlFile, LibraryManager libraryManager) throws IOException { return new CqlTranslator( - null, getSourceInfo(cqlFile), CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile)), libraryManager); + null, + getSourceInfo(cqlFile), + CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile)), + libraryManager); } public static CqlTranslator fromFile(NamespaceInfo namespaceInfo, File cqlFile, LibraryManager libraryManager) @@ -89,7 +92,10 @@ public static CqlTranslator fromFile( NamespaceInfo namespaceInfo, VersionedIdentifier sourceInfo, File cqlFile, LibraryManager libraryManager) throws IOException { return new CqlTranslator( - namespaceInfo, sourceInfo, CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile)), libraryManager); + namespaceInfo, + sourceInfo, + CharStreams.INSTANCE.fromStream(new FileInputStream(cqlFile)), + libraryManager); } private CqlTranslator( diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java index a3572e5b1..9a66a0bc1 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/model/Chunk.java @@ -80,7 +80,7 @@ public boolean hasChunks() { } public void addChunk(Chunk chunk) { - if (chunk.getInterval().getA()< interval.getA()|| chunk.getInterval().getB() > interval.getB()) { + if (chunk.getInterval().getA() < interval.getA() || chunk.getInterval().getB() > interval.getB()) { throw new IllegalArgumentException( "Child chunk cannot be added because it is not contained within the parent chunk."); } @@ -89,15 +89,15 @@ public void addChunk(Chunk chunk) { int chunkIndex = -1; Chunk targetChunk = null; for (int i = 0; i < chunks.size(); i++) { - if (chunk.getInterval().getA()>= chunks.get(i).getInterval().getA() - && chunk.getInterval().getA()<= chunks.get(i).getInterval().getB()) { + if (chunk.getInterval().getA() >= chunks.get(i).getInterval().getA() + && chunk.getInterval().getA() <= chunks.get(i).getInterval().getB()) { chunkIndex = i; targetChunk = chunks.get(chunkIndex); break; } } - if (chunk.getInterval().getA()== targetChunk.getInterval().getA()) { + if (chunk.getInterval().getA() == targetChunk.getInterval().getA()) { // the chunk being added starts the targetChunk // insert the chunk at the targetChunk's index // update the targetChunk's interval start to be the chunk's interval end + 1 @@ -112,10 +112,11 @@ public void addChunk(Chunk chunk) { } if (chunkIndex < chunks.size()) { chunks.get(chunkIndex) - .setInterval(new Interval(newA, chunks.get(chunkIndex).getInterval().getB())); + .setInterval(new Interval( + newA, chunks.get(chunkIndex).getInterval().getB())); } } else { - int newB = chunk.getInterval().getA()- 1; + int newB = chunk.getInterval().getA() - 1; int newA = chunk.getInterval().getB() + 1; int oldA = chunks.get(chunkIndex).getInterval().getA(); int oldB = chunks.get(chunkIndex).getInterval().getB(); diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java index 299b7f0c4..93996dbfc 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java @@ -321,7 +321,8 @@ private void popChunk(ParseTree tree, Object o, boolean pushedChunk) { .withIsHeaderChunk(true); Chunk newChunk = new Chunk() .withInterval(new org.antlr.v4.kotlinruntime.misc.Interval( - headerChunk.getInterval().getA(), chunk.getInterval().getB())); + headerChunk.getInterval().getA(), + chunk.getInterval().getB())); newChunk.addChunk(headerChunk); newChunk.setElement(chunk.getElement()); for (Chunk c : chunk.getChunks()) { @@ -345,7 +346,8 @@ private void popChunk(ParseTree tree, Object o, boolean pushedChunk) { new Chunk().withInterval(libraryInfo.getDefinition().getSourceInterval()); Chunk newChunk = new Chunk() .withInterval(new org.antlr.v4.kotlinruntime.misc.Interval( - headerChunk.getInterval().getA(), definitionChunk.getInterval().getB())); + headerChunk.getInterval().getA(), + definitionChunk.getInterval().getB())); newChunk.addChunk(headerChunk); newChunk.addChunk(definitionChunk); newChunk.setElement(chunk.getElement()); diff --git a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt index 955a40df1..1f3378717 100644 --- a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt +++ b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt @@ -1,8 +1,8 @@ package org.cqframework.cql +import java.io.FileInputStream import org.antlr.v4.kotlinruntime.CharStreams import org.antlr.v4.kotlinruntime.CommonTokenStream -import java.io.FileInputStream import org.cqframework.cql.gen.cqlLexer import org.cqframework.cql.gen.cqlParser diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt b/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt index f135ab69b..9692f4fc0 100644 --- a/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt +++ b/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt @@ -243,9 +243,7 @@ import org.hl7.elm.r1.Xor open class IdObjectFactory : ObjectFactory() { private var nextId = 0 - /** - * returns the next id and increments the counter - */ + /** returns the next id and increments the counter */ open fun nextId(): String { return nextId++.toString() } diff --git a/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt b/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt index d22a4037d..82176cad9 100644 --- a/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt +++ b/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt @@ -1,5 +1,9 @@ package org.cqframework.cql.elm.visiting +import java.lang.reflect.Field +import java.nio.charset.StandardCharsets +import java.util.function.BiFunction +import javax.xml.namespace.QName import org.cqframework.cql.elm.tracking.Trackable import org.hl7.cql_annotations.r1.Narrative import org.hl7.elm.r1.AccessModifier @@ -14,10 +18,6 @@ import org.jeasy.random.api.RandomizerContext import org.junit.jupiter.api.Assertions import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.MethodSource -import java.lang.reflect.Field -import java.nio.charset.StandardCharsets -import java.util.function.BiFunction -import javax.xml.namespace.QName class RandomElmGraphTest { @ParameterizedTest @@ -26,43 +26,46 @@ class RandomElmGraphTest { // This test generates a random ELM graph and verifies that all nodes are // visited exactly once. val elementsGenerated = HashMap() - val countingObjectFactory: ObjenesisObjectFactory = object : ObjenesisObjectFactory() { - override fun createInstance(type: Class, context: RandomizerContext): T { - val t = super.createInstance(type, context) - if (t is Element) { - val hash = System.identityHashCode(t) - elementsGenerated[hash] = t - } + val countingObjectFactory: ObjenesisObjectFactory = + object : ObjenesisObjectFactory() { + override fun createInstance(type: Class, context: RandomizerContext): T { + val t = super.createInstance(type, context) + if (t is Element) { + val hash = System.identityHashCode(t) + elementsGenerated[hash] = t + } - // Debugging for specific types and paths - // that aren't being visited. - // if (t instanceof ConvertsToDate || t instanceof SplitOnMatches || t instanceof DateFrom) { - // printContext((Element) t, context); - // } - return t - } + // Debugging for specific types and paths + // that aren't being visited. + // if (t instanceof ConvertsToDate || t instanceof SplitOnMatches || t + // instanceof DateFrom) { + // printContext((Element) t, context); + // } + return t + } - private fun printContext(t: Element, context: RandomizerContext) { - System.err.printf( - "Type: %s, Parent: %s, Path: %s, Hash: %s%n", - t.javaClass.simpleName, - context.currentObject.javaClass.simpleName, - context.currentField, - System.identityHashCode(t) - ) + private fun printContext(t: Element, context: RandomizerContext) { + System.err.printf( + "Type: %s, Parent: %s, Path: %s, Hash: %s%n", + t.javaClass.simpleName, + context.currentObject.javaClass.simpleName, + context.currentField, + System.identityHashCode(t) + ) + } } - } - val randomParams = EasyRandomParameters() - .objectFactory(countingObjectFactory) - .seed(seed.toLong()) - .randomizationDepth(15) - .objectPoolSize(1000) // Never reuse objects - .charset(StandardCharsets.UTF_8) - .stringLengthRange(5, 50) - .collectionSizeRange(1, 3) - .exclusionPolicy(NoTypeSpecifierRecursionPolicy()) - .scanClasspathForConcreteTypes(true) + val randomParams = + EasyRandomParameters() + .objectFactory(countingObjectFactory) + .seed(seed.toLong()) + .randomizationDepth(15) + .objectPoolSize(1000) // Never reuse objects + .charset(StandardCharsets.UTF_8) + .stringLengthRange(5, 50) + .collectionSizeRange(1, 3) + .exclusionPolicy(NoTypeSpecifierRecursionPolicy()) + .scanClasspathForConcreteTypes(true) val randomElmGenerator = EasyRandom(randomParams) val randomElm = randomElmGenerator.nextObject(Library::class.java) @@ -71,24 +74,25 @@ class RandomElmGraphTest { val elementsVisited = HashMap() val elementsDuplicated = HashMap() - val countingVisitor = FunctionalElmVisitor ( - BiFunction, Int> { x: Trackable?, y: HashMap? -> - if (x is Element) { - val hash = System.identityHashCode(x) - if (!elementsVisited.containsKey(hash)) { - elementsVisited[hash] = x - return@BiFunction 1 + val countingVisitor = + FunctionalElmVisitor( + BiFunction, Int> { + x: Trackable?, + y: HashMap? -> + if (x is Element) { + val hash = System.identityHashCode(x) + if (!elementsVisited.containsKey(hash)) { + elementsVisited[hash] = x + return@BiFunction 1 + } + elementsDuplicated[hash] = x + return@BiFunction 0 } - elementsDuplicated[hash] = x - return@BiFunction 0 + 0 } - 0 + ) { a: Int?, b: Int? -> + Integer.sum(a!!, b!!) } - ) { a: Int?, b: Int? -> - Integer.sum( - a!!, b!! - ) - } val visitorCount = countingVisitor.visitLibrary(randomElm, elementsVisited) @@ -96,11 +100,7 @@ class RandomElmGraphTest { if (elementsGenerated.isNotEmpty()) { System.err.println("Elements Missed:") elementsGenerated.forEach { (x: Int?, e: Element) -> - System.err.printf( - "Type: %s, Hash: %s%n", - e.javaClass.simpleName, - x - ) + System.err.printf("Type: %s, Hash: %s%n", e.javaClass.simpleName, x) } } @@ -111,11 +111,7 @@ class RandomElmGraphTest { if (elementsDuplicated.isNotEmpty()) { System.err.println("Elements Duplicated:") elementsDuplicated.forEach { (x: Int?, e: Element) -> - System.err.printf( - "Type: %s, Hash: %s%n", - e.javaClass.simpleName, - x - ) + System.err.printf("Type: %s, Hash: %s%n", e.javaClass.simpleName, x) } } @@ -134,8 +130,9 @@ class RandomElmGraphTest { return true } - return ((field.name == "resultTypeSpecifier" && TypeSpecifier::class.java.isAssignableFrom(field.type)) - || (field.name == "signature")) + return ((field.name == "resultTypeSpecifier" && + TypeSpecifier::class.java.isAssignableFrom(field.type)) || + (field.name == "signature")) } // These are excluded to simplify the ELM graph while bugs are being worked out. @@ -144,7 +141,9 @@ class RandomElmGraphTest { return true } - return type == QName::class.java || type == Narrative::class.java || type == AccessModifier::class.java + return type == QName::class.java || + type == Narrative::class.java || + type == AccessModifier::class.java } } From 59c02a6c5921bcd8253d319d53f4c5d7990b6873 Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Fri, 20 Sep 2024 10:36:25 -0600 Subject: [PATCH 24/77] WIP, multi-platform --- .gitignore | 1 + .../kotlin/cql.kotlin-conventions.gradle.kts | 7 +- ...otlin-multiplatform-conventions.gradle.kts | 71 + Src/java/cql-to-elm/build.gradle.kts | 3 +- .../CqlPreprocessorElmCommonVisitor.java | 7 +- .../cql2elm/targetmap/TargetMapVisitor.java | 7 +- .../cqframework/cql/cql2elm/TestLocalId.java | 6 +- .../cqframework/cql/cql2elm/TestUtils.java | 12 +- Src/java/cql/build.gradle.kts | 50 +- .../cqframework/cql/grammar/GrammarTest.kt | 56 + .../org/cqframework/cql/grammar/JsTest.kt | 56 + .../java/org/cqframework/cql/Application.kt | 0 .../cqframework/cql/grammar/GrammarTest.java | 57 - .../cqframework/cql/elm/IdObjectFactory.kt | 1 + .../cql/elm/visiting/RandomElmGraphTest.kt | 2 + Src/java/kotlin-js-store/yarn.lock | 2815 +++++++++++++++++ 16 files changed, 3049 insertions(+), 102 deletions(-) create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts create mode 100644 Src/java/cql/src/commonTest/kotlin/org/cqframework/cql/grammar/GrammarTest.kt create mode 100644 Src/java/cql/src/jsTest/kotlin/org/cqframework/cql/grammar/JsTest.kt rename Src/java/cql/src/{main => jvmMain}/java/org/cqframework/cql/Application.kt (100%) delete mode 100644 Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java create mode 100644 Src/java/kotlin-js-store/yarn.lock diff --git a/.gitignore b/.gitignore index 05eae09d5..cd0c1969b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ node_modules .nyc_output coverage gen +.kotlin diff --git a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts index b26e0bb74..576e18e02 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts @@ -1,12 +1,13 @@ -import gradle.kotlin.dsl.accessors._2d946b1c62c86c83708f6e287986eee0.implementation -import gradle.kotlin.dsl.accessors._2d946b1c62c86c83708f6e287986eee0.spotless - plugins { kotlin("jvm") id("com.diffplug.spotless") id("io.gitlab.arturbosch.detekt") } +repositories { + mavenCentral() +} + spotless { kotlin { ktfmt().kotlinlangStyle() diff --git a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts new file mode 100644 index 000000000..bcdfaf370 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts @@ -0,0 +1,71 @@ +plugins { + kotlin("multiplatform") + id("com.diffplug.spotless") + id("io.gitlab.arturbosch.detekt") +} + +repositories { + mavenCentral() +} + +spotless { + kotlin { + ktfmt().kotlinlangStyle() + } +} + +kotlin { + jvmToolchain(11) + jvm { + withJava() + } + js(IR) { + browser { + testTask { + useKarma { + useChromeHeadless() + } + } + } + + binaries.executable() + } + + sourceSets { + commonMain{ + dependencies { + implementation(kotlin("stdlib-common")) + } + } + + commonTest { + dependencies { + implementation(kotlin("test")) + } + } + + jvmMain { + dependencies { + implementation(kotlin("stdlib-jdk8")) + } + } + + jvmTest { + dependencies { + implementation(kotlin("test-junit")) + } + } + + jsMain { + dependencies { + implementation(kotlin("stdlib-js")) + } + } + + jsTest { + dependencies { + implementation(kotlin("test-js")) + } + } + } +} \ No newline at end of file diff --git a/Src/java/cql-to-elm/build.gradle.kts b/Src/java/cql-to-elm/build.gradle.kts index 848419d72..a853172cf 100644 --- a/Src/java/cql-to-elm/build.gradle.kts +++ b/Src/java/cql-to-elm/build.gradle.kts @@ -9,10 +9,9 @@ dependencies { api(project(":elm")) api("org.fhir:ucum:1.0.8") api("org.apache.commons:commons-text:1.10.0") - api("com.strumenta:antlr-kotlin-runtime:1.0.0") // TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives - // in the cql-to-elm project. Ideally, we"d factor out all serialization depedencies into common + // in the cql-to-elm project. Ideally, we"d factor out all serialization dependencies into common // libraries such that we could swap out jackson for something else. In the meantime, these are // "implementation" dependencies so that they are not exported downstream. implementation("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${project.findProperty("jackson.version")}") diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java index 93996dbfc..c8f39f3d4 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/preprocessor/CqlPreprocessorElmCommonVisitor.java @@ -32,7 +32,7 @@ /** * Common functionality used by {@link CqlPreprocessor} and {@link Cql2ElmVisitor} */ -public abstract class CqlPreprocessorElmCommonVisitor extends cqlBaseVisitor { +public class CqlPreprocessorElmCommonVisitor extends cqlBaseVisitor { protected final IdObjectFactory of; protected final org.hl7.cql_annotations.r1.ObjectFactory af = new org.hl7.cql_annotations.r1.ObjectFactory(); private boolean implicitContextCreated = false; @@ -83,6 +83,11 @@ protected String saveCurrentContext(String currentContext) { return saveContext; } + @Override + protected Object defaultResult() { + return null; + } + @Override public Object visit(ParseTree tree) { Objects.requireNonNull(tree, "ParseTree required"); diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java index a1f64bb50..b40045390 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/targetmap/TargetMapVisitor.java @@ -2,4 +2,9 @@ import org.cqframework.cql.gen.targetmapBaseVisitor; -public abstract class TargetMapVisitor extends targetmapBaseVisitor {} +public class TargetMapVisitor extends targetmapBaseVisitor { + @Override + protected Object defaultResult() { + return null; + } +} diff --git a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestLocalId.java b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestLocalId.java index 21889fab9..c6ad27a64 100644 --- a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestLocalId.java +++ b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestLocalId.java @@ -4,8 +4,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.kotlinruntime.CharStreams; +import org.antlr.v4.kotlinruntime.CommonTokenStream; import org.cqframework.cql.cql2elm.CqlCompilerOptions.Options; import org.cqframework.cql.cql2elm.preprocessor.CqlPreprocessor; import org.cqframework.cql.elm.IdObjectFactory; @@ -69,7 +69,7 @@ public String nextId() { var libraryBuilder = new LibraryBuilder(libraryManager, brokenFactory); // Simplest possible library, just to trigger a missing id error. - cqlLexer lexer = new cqlLexer(CharStreams.fromString("library Test\ndefine \"One\": 1")); + cqlLexer lexer = new cqlLexer(CharStreams.INSTANCE.fromString("library Test\ndefine \"One\": 1")); CommonTokenStream tokens = new CommonTokenStream(lexer); cqlParser parser = new cqlParser(tokens); parser.setBuildParseTree(true); diff --git a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestUtils.java b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestUtils.java index d46dd812d..58d82b9cf 100644 --- a/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestUtils.java +++ b/Src/java/cql-to-elm/src/test/java/org/cqframework/cql/cql2elm/TestUtils.java @@ -9,11 +9,11 @@ import java.nio.charset.StandardCharsets; import java.util.Objects; import java.util.Optional; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.CharStreams; -import org.antlr.v4.runtime.CommonTokenStream; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.kotlinruntime.CharStream; +import org.antlr.v4.kotlinruntime.CharStreams; +import org.antlr.v4.kotlinruntime.CommonTokenStream; +import org.antlr.v4.kotlinruntime.TokenStream; +import org.antlr.v4.kotlinruntime.tree.ParseTree; import org.cqframework.cql.cql2elm.CqlCompilerException.ErrorSeverity; import org.cqframework.cql.cql2elm.LibraryBuilder.SignatureLevel; import org.cqframework.cql.cql2elm.model.CompiledLibrary; @@ -32,7 +32,7 @@ private static ModelManager getModelManager() { public static Cql2ElmVisitor visitFile(String fileName, boolean inClassPath) throws IOException { InputStream is = inClassPath ? TestUtils.class.getResourceAsStream(fileName) : new FileInputStream(fileName); - TokenStream tokens = parseCharStream(CharStreams.fromStream(is)); + TokenStream tokens = parseCharStream(CharStreams.INSTANCE.fromStream(is)); ParseTree tree = parseTokenStream(tokens); Cql2ElmVisitor visitor = createElmTranslatorVisitor(tokens, tree); visitor.visit(tree); diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts index 576c7e1ee..6facd0672 100644 --- a/Src/java/cql/build.gradle.kts +++ b/Src/java/cql/build.gradle.kts @@ -1,50 +1,42 @@ import com.strumenta.antlrkotlin.gradle.AntlrKotlinTask +import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon plugins { - id("cql.java-conventions") - id("cql.kotlin-conventions") - id("application") + id("cql.kotlin-multiplatform-conventions") id("com.strumenta.antlr-kotlin") version "1.0.0" } -dependencies { - api("com.strumenta:antlr-kotlin-runtime:1.0.0") -} +kotlin { + sourceSets { + commonMain { + kotlin { + srcDir("build/generated/sources/antlr/main/kotlin") + } -application { - mainClass = "org.cqframework.cql.Application" -} + dependencies { + implementation("com.strumenta:antlr-kotlin-runtime:1.0.0") + } + } + + jvmMain { + dependencies { + api("com.strumenta:antlr-kotlin-runtime-jvm:1.0.0") + } -sourceSets { - main { - kotlin { - srcDir("build/generated/sources/antlr/main/kotlin") } } } val generateKotlinGrammarSource = tasks.register("generateKotlinGrammarSource") { dependsOn("cleanGenerateKotlinGrammarSource") - - source = fileTree("../../grammar") { - include("**/*.g4") - } - - // We want the generated source files to have this package name + source = fileTree("../../grammar") packageName = "org.cqframework.cql.gen" - - // We want visitors alongside listeners. - // The Kotlin target language is implicit, as is the file encoding (UTF-8) arguments = listOf("-visitor") - - // Generated files are outputted inside build/generatedAntlr/{package-name} outputDirectory = file("build/generated/sources/antlr/main/kotlin/${packageName!!.replace(".", "/")}") } -tasks.sourcesJar { - from(generateKotlinGrammarSource) -} - -tasks.compileKotlin { +tasks.withType> { dependsOn(generateKotlinGrammarSource) } \ No newline at end of file diff --git a/Src/java/cql/src/commonTest/kotlin/org/cqframework/cql/grammar/GrammarTest.kt b/Src/java/cql/src/commonTest/kotlin/org/cqframework/cql/grammar/GrammarTest.kt new file mode 100644 index 000000000..a89731f2b --- /dev/null +++ b/Src/java/cql/src/commonTest/kotlin/org/cqframework/cql/grammar/GrammarTest.kt @@ -0,0 +1,56 @@ +package org.cqframework.cql.grammar + +import org.cqframework.cql.gen.cqlParser.* +import org.antlr.v4.kotlinruntime.CharStream +import org.antlr.v4.kotlinruntime.CharStreams +import org.antlr.v4.kotlinruntime.CommonTokenStream +import org.antlr.v4.kotlinruntime.tree.ParseTree +import org.cqframework.cql.gen.cqlLexer +import org.cqframework.cql.gen.cqlParser +import kotlin.test.Test +import kotlin.test.assertEquals + +/** + * GrammarTest ensures that the grammar (and generated parsers) work as expected. If non-compatible changes are made + * to the grammar, these tests should fail. If the change is intentional, modify the tests to pass-- otherwise, fix + * the grammar. + */ +internal class GrammarTest { + @Test + fun ageAt() { + val tree: ParseTree = parseToTree("define inIPP : AgeAt(start of MeasurementPeriod) < 18") + val logic: LibraryContext = tree.payload as LibraryContext + + val def = logic.statement(0)?.expressionDefinition() + assertEquals("inIPP", def?.identifier()?.IDENTIFIER().toString()) + + val cmpExpr: InequalityExpressionContext = def?.expression() as InequalityExpressionContext + assertEquals("<", cmpExpr.getChild(1)?.text) + + val termExpression: TermExpressionContext = cmpExpr.expression(0) as TermExpressionContext + val termExpressionTerm: TermExpressionTermContext = termExpression.expressionTerm() as TermExpressionTermContext + val invocationTerm: InvocationTermContext = termExpressionTerm.term() as InvocationTermContext + val functionInvocation: FunctionInvocationContext = invocationTerm.invocation() as FunctionInvocationContext + assertEquals( + "AgeAt", functionInvocation.function().referentialIdentifier().text + ) + + val argExpression: TermExpressionContext = + functionInvocation.function().paramList()?.expression(0) as TermExpressionContext + val argExpressionTerm: TimeBoundaryExpressionTermContext = + argExpression.expressionTerm() as TimeBoundaryExpressionTermContext + assertEquals("start", argExpressionTerm.getChild(0)?.text) + assertEquals("MeasurementPeriod", argExpressionTerm.expressionTerm().text) + + val termExpr = cmpExpr.expression(1) + assertEquals("18", termExpr?.text) + } + + private fun parseToTree(logic: String): ParseTree { + val input: CharStream = CharStreams.fromString(logic) + val tokens = CommonTokenStream(cqlLexer(input)) + val parser = cqlParser(tokens) + parser.buildParseTree = true + return parser.library() + } +} diff --git a/Src/java/cql/src/jsTest/kotlin/org/cqframework/cql/grammar/JsTest.kt b/Src/java/cql/src/jsTest/kotlin/org/cqframework/cql/grammar/JsTest.kt new file mode 100644 index 000000000..9f1706e60 --- /dev/null +++ b/Src/java/cql/src/jsTest/kotlin/org/cqframework/cql/grammar/JsTest.kt @@ -0,0 +1,56 @@ +package org.cqframework.cql.grammar + +import org.cqframework.cql.gen.cqlParser.* +import org.antlr.v4.kotlinruntime.CharStream +import org.antlr.v4.kotlinruntime.CharStreams +import org.antlr.v4.kotlinruntime.CommonTokenStream +import org.antlr.v4.kotlinruntime.tree.ParseTree +import org.cqframework.cql.gen.cqlLexer +import org.cqframework.cql.gen.cqlParser +import kotlin.test.Test +import kotlin.test.assertEquals + +/** + * GrammarTest ensures that the grammar (and generated parsers) work as expected. If non-compatible changes are made + * to the grammar, these tests should fail. If the change is intentional, modify the tests to pass-- otherwise, fix + * the grammar. + */ +internal class JsTest { + @Test + fun ageAt() { + val tree: ParseTree = parseToTree("define inIPP : AgeAt(start of MeasurementPeriod) < 18") + val logic: LibraryContext = tree.payload as LibraryContext + + val def = logic.statement(0)?.expressionDefinition() + assertEquals("inIPP", def?.identifier()?.IDENTIFIER().toString()) + + val cmpExpr: InequalityExpressionContext = def?.expression() as InequalityExpressionContext + assertEquals("<", cmpExpr.getChild(1)?.text) + + val termExpression: TermExpressionContext = cmpExpr.expression(0) as TermExpressionContext + val termExpressionTerm: TermExpressionTermContext = termExpression.expressionTerm() as TermExpressionTermContext + val invocationTerm: InvocationTermContext = termExpressionTerm.term() as InvocationTermContext + val functionInvocation: FunctionInvocationContext = invocationTerm.invocation() as FunctionInvocationContext + assertEquals( + "AgeAt", functionInvocation.function().referentialIdentifier().text + ) + + val argExpression: TermExpressionContext = + functionInvocation.function().paramList()?.expression(0) as TermExpressionContext + val argExpressionTerm: TimeBoundaryExpressionTermContext = + argExpression.expressionTerm() as TimeBoundaryExpressionTermContext + assertEquals("start", argExpressionTerm.getChild(0)?.text) + assertEquals("MeasurementPeriod", argExpressionTerm.expressionTerm().text) + + val termExpr = cmpExpr.expression(1) + assertEquals("18", termExpr?.text) + } + + private fun parseToTree(logic: String): ParseTree { + val input: CharStream = CharStreams.fromString(logic) + val tokens = CommonTokenStream(cqlLexer(input)) + val parser = cqlParser(tokens) + parser.buildParseTree = true + return parser.library() + } +} diff --git a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt b/Src/java/cql/src/jvmMain/java/org/cqframework/cql/Application.kt similarity index 100% rename from Src/java/cql/src/main/java/org/cqframework/cql/Application.kt rename to Src/java/cql/src/jvmMain/java/org/cqframework/cql/Application.kt diff --git a/Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java b/Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java deleted file mode 100644 index ea484bcb4..000000000 --- a/Src/java/cql/src/test/java/org/cqframework/cql/grammar/GrammarTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.cqframework.cql.grammar; - -import static org.cqframework.cql.gen.cqlParser.*; -import static org.junit.jupiter.api.Assertions.assertEquals; - -import org.antlr.v4.kotlinruntime.CharStream; -import org.antlr.v4.kotlinruntime.CharStreams; -import org.antlr.v4.kotlinruntime.CommonTokenStream; -import org.antlr.v4.kotlinruntime.tree.ParseTree; -import org.cqframework.cql.gen.cqlLexer; -import org.cqframework.cql.gen.cqlParser; -import org.junit.jupiter.api.Test; - -/** - * GrammarTest ensures that the grammar (and generated parsers) work as expected. If non-compatible changes are made - * to the grammar, these tests should fail. If the change is intentional, modify the tests to pass-- otherwise, fix - * the grammar. - */ -class GrammarTest { - - @Test - void ageAt() { - ParseTree tree = parseToTree("define inIPP : AgeAt(start of MeasurementPeriod) < 18"); - LibraryContext logic = (LibraryContext) tree.getPayload(); - - ExpressionDefinitionContext def = logic.statement(0).expressionDefinition(); - assertEquals("inIPP", def.identifier().IDENTIFIER().toString()); - - InequalityExpressionContext cmpExpr = (InequalityExpressionContext) def.expression(); - assertEquals("<", cmpExpr.getChild(1).getText()); - - TermExpressionContext termExpression = (TermExpressionContext) cmpExpr.expression(0); - TermExpressionTermContext termExpressionTerm = (TermExpressionTermContext) termExpression.expressionTerm(); - InvocationTermContext invocationTerm = (InvocationTermContext) termExpressionTerm.term(); - FunctionInvocationContext functionInvocation = (FunctionInvocationContext) invocationTerm.invocation(); - assertEquals( - "AgeAt", functionInvocation.function().referentialIdentifier().getText()); - - TermExpressionContext argExpression = (TermExpressionContext) - functionInvocation.function().paramList().expression(0); - TimeBoundaryExpressionTermContext argExpressionTerm = - (TimeBoundaryExpressionTermContext) argExpression.expressionTerm(); - assertEquals("start", argExpressionTerm.getChild(0).getText()); - assertEquals("MeasurementPeriod", argExpressionTerm.expressionTerm().getText()); - - ExpressionContext termExpr = cmpExpr.expression(1); - assertEquals("18", termExpr.getText()); - } - - private ParseTree parseToTree(String logic) { - CharStream input = CharStreams.INSTANCE.fromString(logic); - CommonTokenStream tokens = new CommonTokenStream(new cqlLexer(input)); - cqlParser parser = new cqlParser(tokens); - parser.setBuildParseTree(true); - return parser.library(); - } -} diff --git a/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt b/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt index 9692f4fc0..c32557776 100644 --- a/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt +++ b/Src/java/elm/src/main/java/org/cqframework/cql/elm/IdObjectFactory.kt @@ -240,6 +240,7 @@ import org.hl7.elm.r1.Xor * given monotonically increasing ids. * */ +@Suppress("detekt:all") open class IdObjectFactory : ObjectFactory() { private var nextId = 0 diff --git a/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt b/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt index 82176cad9..3441d3e34 100644 --- a/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt +++ b/Src/java/elm/src/test/java/org/cqframework/cql/elm/visiting/RandomElmGraphTest.kt @@ -19,6 +19,7 @@ import org.junit.jupiter.api.Assertions import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.MethodSource +@Suppress("detekt:all") class RandomElmGraphTest { @ParameterizedTest @MethodSource("seeds") @@ -148,6 +149,7 @@ class RandomElmGraphTest { } companion object { + @JvmStatic fun seeds(): Array { // I randomly picked these seeds until // I got 3 in a row that passed without errors. diff --git a/Src/java/kotlin-js-store/yarn.lock b/Src/java/kotlin-js-store/yarn.lock new file mode 100644 index 000000000..dd1a803a5 --- /dev/null +++ b/Src/java/kotlin-js-store/yarn.lock @@ -0,0 +1,2815 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" + integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== + +"@socket.io/component-emitter@~3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== + +"@types/body-parser@*": + version "1.19.5" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.5.tgz#04ce9a3b677dc8bd681a17da1ab9835dc9d3ede4" + integrity sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/bonjour@^3.5.9": + version "3.5.13" + resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.13.tgz#adf90ce1a105e81dd1f9c61fdc5afda1bfb92956" + integrity sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ== + dependencies: + "@types/node" "*" + +"@types/connect-history-api-fallback@^1.3.5": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz#7de71645a103056b48ac3ce07b3520b819c1d5b3" + integrity sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw== + dependencies: + "@types/express-serve-static-core" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.17" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b" + integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA== + dependencies: + "@types/node" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "9.6.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" + integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.5": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": + version "4.19.5" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz#218064e321126fcf9048d1ca25dd2465da55d9c6" + integrity sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@*", "@types/express@^4.17.13": + version "4.17.21" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" + integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/http-errors@*": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.4.tgz#7eb47726c391b7345a6ec35ad7f4de469cf5ba4f" + integrity sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA== + +"@types/http-proxy@^1.17.8": + version "1.17.15" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.15.tgz#12118141ce9775a6499ecb4c01d02f90fc839d36" + integrity sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ== + dependencies: + "@types/node" "*" + +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/mime@^1": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" + integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== + +"@types/node-forge@^1.3.0": + version "1.3.11" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da" + integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== + dependencies: + "@types/node" "*" + +"@types/node@*", "@types/node@>=10.0.0": + version "22.5.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" + integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== + dependencies: + undici-types "~6.19.2" + +"@types/qs@*": + version "6.9.16" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.16.tgz#52bba125a07c0482d26747d5d4947a64daf8f794" + integrity sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A== + +"@types/range-parser@*": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" + integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== + +"@types/retry@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" + integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + +"@types/send@*": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" + integrity sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-index@^1.9.1": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.4.tgz#e6ae13d5053cb06ed36392110b4f9a49ac4ec898" + integrity sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug== + dependencies: + "@types/express" "*" + +"@types/serve-static@*", "@types/serve-static@^1.13.10": + version "1.15.7" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.7.tgz#22174bbd74fb97fe303109738e9b5c2f3064f714" + integrity sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "*" + +"@types/sockjs@^0.3.33": + version "0.3.36" + resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.36.tgz#ce322cf07bcc119d4cbf7f88954f3a3bd0f67535" + integrity sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q== + dependencies: + "@types/node" "*" + +"@types/ws@^8.5.5": + version "8.5.12" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.12.tgz#619475fe98f35ccca2a2f6c137702d85ec247b7e" + integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ== + dependencies: + "@types/node" "*" + +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-import-attributes@^1.9.5: + version "1.9.5" + resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" + integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== + +acorn@^8.7.1, acorn@^8.8.2: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv-keywords@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.0, ajv@^8.9.0: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + +ansi-colors@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-html-community@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" + integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +body-parser@1.20.3, body-parser@^1.19.0: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +bonjour-service@^1.0.11: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.2.1.tgz#eb41b3085183df3321da1264719fbada12478d02" + integrity sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw== + dependencies: + fast-deep-equal "^3.1.3" + multicast-dns "^7.2.5" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browser-stdout@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserslist@^4.21.10: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== + dependencies: + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001646: + version "1.0.30001662" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz#3574b22dfec54a3f3b6787331da1040fe8e763ec" + integrity sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA== + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@^3.5.1, chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chrome-trace-event@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" + integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.10, colorette@^2.0.14: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +connect-history-api-fallback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" + integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== + +connect@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" + integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== + +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== + +date-format@^4.0.14: + version "4.0.14" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" + integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^4.1.0, debug@^4.3.4, debug@^4.3.5, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +default-gateway@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" + integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== + dependencies: + execa "^5.0.0" + +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-node@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" + integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== + +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + +dns-packet@^5.2.2: + version "5.6.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.1.tgz#ae888ad425a9d1478a0674256ab866de1012cf2f" + integrity sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw== + dependencies: + "@leichtgewicht/ip-codec" "^2.0.1" + +dom-serialize@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.5.4: + version "1.5.26" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.26.tgz#449b4fa90e83ab98abbe3b6a96c8ee395de94452" + integrity sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + +engine.io-parser@~5.2.1: + version "5.2.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" + integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== + +engine.io@~6.5.2: + version "6.5.5" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.5.tgz#430b80d8840caab91a50e9e23cb551455195fc93" + integrity sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.17.1" + +enhanced-resolve@^5.17.0: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +ent@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.1.tgz#68dc99a002f115792c26239baedaaea9e70c0ca2" + integrity sha512-QHuXVeZx9d+tIQAz/XztU0ZwZf2Agg9CcXcgE1rurqvdBeDBrpSwjl8/6XUqMg7tw2Y7uAdKb2sRv+bSEFqQ5A== + dependencies: + punycode "^1.4.1" + +envinfo@^7.7.3: + version "7.14.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.14.0.tgz#26dac5db54418f2a4c1159153a0b2ae980838aae" + integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-module-lexer@^1.2.1: + version "1.5.4" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" + integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== + +escalade@^3.1.1, escalade@^3.1.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +express@^4.17.3: + version "4.21.0" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" + integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.3" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.6.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~2.0.0" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.3.1" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.3" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.10" + proxy-addr "~2.0.7" + qs "6.13.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.19.0" + serve-static "1.16.2" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-uri@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" + integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + +faye-websocket@^0.11.3: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== + dependencies: + websocket-driver ">=0.5.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== + dependencies: + debug "2.6.9" + encodeurl "~2.0.0" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.7: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== + +follow-redirects@^1.0.0: + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== + +format-util@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" + integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-monkey@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.6.tgz#8ead082953e88d992cf3ff844faa907b26756da2" + integrity sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@^7.1.3, glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +he@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + integrity sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ== + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-entities@^2.3.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" + integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-parser-js@>=0.5.1: + version "0.5.8" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" + integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== + +http-proxy-middleware@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" + integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== + dependencies: + "@types/http-proxy" "^1.17.8" + http-proxy "^1.18.1" + is-glob "^4.0.1" + is-plain-obj "^3.0.0" + micromatch "^4.0.2" + +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +import-local@^3.0.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +ipaddr.js@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz#d33fa7bac284f4de7af949638c9d68157c6b92e8" + integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-core-module@^2.13.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== + dependencies: + hasown "^2.0.2" + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-obj@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" + integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isbinaryfile@^4.0.8: + version "4.0.10" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" + integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +karma-chrome-launcher@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" + integrity sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q== + dependencies: + which "^1.2.1" + +karma-mocha@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-2.0.1.tgz#4b0254a18dfee71bdbe6188d9a6861bf86b0cd7d" + integrity sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ== + dependencies: + minimist "^1.2.3" + +karma-sourcemap-loader@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.4.0.tgz#b01d73f8f688f533bcc8f5d273d43458e13b5488" + integrity sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA== + dependencies: + graceful-fs "^4.2.10" + +karma-webpack@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-5.0.1.tgz#4eafd31bbe684a747a6e8f3e4ad373e53979ced4" + integrity sha512-oo38O+P3W2mSPCSUrQdySSPv1LvPpXP+f+bBimNomS5sW+1V4SuhCuW8TfJzV+rDv921w2fDSDw0xJbPe6U+kQ== + dependencies: + glob "^7.1.3" + minimatch "^9.0.3" + webpack-merge "^4.1.5" + +karma@6.4.3: + version "6.4.3" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.3.tgz#763e500f99597218bbb536de1a14acc4ceea7ce8" + integrity sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q== + dependencies: + "@colors/colors" "1.5.0" + body-parser "^1.19.0" + braces "^3.0.2" + chokidar "^3.5.1" + connect "^3.7.0" + di "^0.0.1" + dom-serialize "^2.2.1" + glob "^7.1.7" + graceful-fs "^4.2.6" + http-proxy "^1.18.1" + isbinaryfile "^4.0.8" + lodash "^4.17.21" + log4js "^6.4.1" + mime "^2.5.2" + minimatch "^3.0.4" + mkdirp "^0.5.5" + qjobs "^1.2.0" + range-parser "^1.2.1" + rimraf "^3.0.2" + socket.io "^4.7.2" + source-map "^0.6.1" + tmp "^0.2.1" + ua-parser-js "^0.7.30" + yargs "^16.1.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +launch-editor@^2.6.0: + version "2.9.1" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.9.1.tgz#253f173bd441e342d4344b4dae58291abb425047" + integrity sha512-Gcnl4Bd+hRO9P9icCP/RVVT2o8SFlPXofuCxvA2SaZuH45whSvf5p8x5oih5ftLiVhEI4sp5xDY+R+b3zJBh5w== + dependencies: + picocolors "^1.0.0" + shell-quote "^1.8.1" + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log4js@^6.4.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" + integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + flatted "^3.2.7" + rfdc "^1.3.0" + streamroller "^3.1.5" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +memfs@^3.4.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" + integrity sha512-EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ== + dependencies: + fs-monkey "^1.0.4" + +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.2: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +"mime-db@>= 1.43.0 < 2": + version "1.53.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.53.0.tgz#3cb63cd820fc29896d9d4e8c32ab4fcd74ccb447" + integrity sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg== + +mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mime@^2.5.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1, minimatch@^5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.3: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.3, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@10.7.0: + version "10.7.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a" + integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.3, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multicast-dns@^7.2.5: + version "7.2.5" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" + integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== + dependencies: + dns-packet "^5.2.2" + thunky "^1.0.2" + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + +obuf@^1.0.0, obuf@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.0.9: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-retry@^4.5.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" + integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== + dependencies: + "@types/retry" "0.12.0" + retry "^0.13.1" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== + +picocolors@^1.0.0, picocolors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qjobs@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== + +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readable-stream@^2.0.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.6: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.20.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + +rfdc@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +schema-utils@^3.1.1, schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" + integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== + +selfsigned@^2.1.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" + integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== + dependencies: + "@types/node-forge" "^1.3.0" + node-forge "^1" + +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serialize-javascript@^6.0.1, serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shell-quote@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +socket.io-adapter@~2.5.2: + version "2.5.5" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz#c7a1f9c703d7756844751b6ff9abfc1780664082" + integrity sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg== + dependencies: + debug "~4.3.4" + ws "~8.17.1" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@^4.7.2: + version "4.7.5" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" + integrity sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + cors "~2.8.5" + debug "~4.3.2" + engine.io "~6.5.2" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.4" + +sockjs@^0.3.24: + version "0.3.24" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" + integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== + dependencies: + faye-websocket "^0.11.3" + uuid "^8.3.2" + websocket-driver "^0.7.4" + +source-map-js@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + +source-map-loader@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-5.0.0.tgz#f593a916e1cc54471cfc8851b905c8a845fc7e38" + integrity sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA== + dependencies: + iconv-lite "^0.6.3" + source-map-js "^1.0.2" + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" + +spdy@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== + dependencies: + debug "^4.1.0" + handle-thing "^2.0.0" + http-deceiver "^1.2.7" + select-hose "^2.0.0" + spdy-transport "^3.0.0" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +"statuses@>= 1.4.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + +streamroller@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + fs-extra "^8.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0, supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + +terser@^5.26.0: + version "5.33.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.33.0.tgz#8f9149538c7468ffcb1246cfec603c16720d2db1" + integrity sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +thunky@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== + +tmp@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typescript@5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + +ua-parser-js@^0.7.30: + version "0.7.39" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.39.tgz#c71efb46ebeabc461c4612d22d54f88880fabe7e" + integrity sha512-IZ6acm6RhQHNibSt7+c09hhvsKy9WUr4DVbeq9U8o71qxyYtJpQeDxQnMrVqnIFMLcQjHO0I9wgfO2vIahht4w== + +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== + +watchpack@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" + integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +wbuf@^1.1.0, wbuf@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== + dependencies: + minimalistic-assert "^1.0.0" + +webpack-cli@5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" + colorette "^2.0.14" + commander "^10.0.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-dev-middleware@^5.3.4: + version "5.3.4" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz#eb7b39281cbce10e104eb2b8bf2b63fce49a3517" + integrity sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q== + dependencies: + colorette "^2.0.10" + memfs "^3.4.3" + mime-types "^2.1.31" + range-parser "^1.2.1" + schema-utils "^4.0.0" + +webpack-dev-server@4.15.2: + version "4.15.2" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz#9e0c70a42a012560860adb186986da1248333173" + integrity sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g== + dependencies: + "@types/bonjour" "^3.5.9" + "@types/connect-history-api-fallback" "^1.3.5" + "@types/express" "^4.17.13" + "@types/serve-index" "^1.9.1" + "@types/serve-static" "^1.13.10" + "@types/sockjs" "^0.3.33" + "@types/ws" "^8.5.5" + ansi-html-community "^0.0.8" + bonjour-service "^1.0.11" + chokidar "^3.5.3" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^2.0.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.3.2" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.0.1" + launch-editor "^2.6.0" + open "^8.0.9" + p-retry "^4.5.0" + rimraf "^3.0.2" + schema-utils "^4.0.0" + selfsigned "^2.1.1" + serve-index "^1.9.1" + sockjs "^0.3.24" + spdy "^4.0.2" + webpack-dev-middleware "^5.3.4" + ws "^8.13.0" + +webpack-merge@^4.1.5: + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== + dependencies: + lodash "^4.17.15" + +webpack-merge@^5.7.3: + version "5.10.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.0" + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@5.93.0: + version "5.93.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.93.0.tgz#2e89ec7035579bdfba9760d26c63ac5c3462a5e5" + integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-attributes "^1.9.5" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.17.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + +websocket-driver@>=0.5.1, websocket-driver@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +which@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^8.13.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +ws@~8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@^20.2.2, yargs-parser@^20.2.9: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@^16.1.1, yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 31a19dcc9ecd8d09f9bdf11840614914f46b05a4 Mon Sep 17 00:00:00 2001 From: Anton Vasetenkov Date: Mon, 4 Nov 2024 15:48:47 +1300 Subject: [PATCH 25/77] Build preliminary CQL parsing library targeting JS (#1434) * Try out jsRun * Compile Kotlin to JS with type definitions. Export parseToTree method. --- ...otlin-multiplatform-conventions.gradle.kts | 31 ++++++ Src/java/cql/src/jsMain/kotlin/Main.kt | 42 +++++++ Src/java/cql/src/jsMain/resources/index.html | 10 ++ Src/java/kotlin-js-store/yarn.lock | 103 +++++++++++------- 4 files changed, 147 insertions(+), 39 deletions(-) create mode 100644 Src/java/cql/src/jsMain/kotlin/Main.kt create mode 100644 Src/java/cql/src/jsMain/resources/index.html diff --git a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts index bcdfaf370..2e95e2d39 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts @@ -19,7 +19,26 @@ kotlin { jvm { withJava() } + + // This adds JavaScript as build target. + // Running the build outputs packages in the build/js/packages directory. + // These packages can e.g. be required or imported in JS or TS projects. + // If you get `Task :kotlinStoreYarnLock FAILED` during the build, + // run the `kotlinUpgradeYarnLock` task and build again. + // Run `jsRun --continuous` to start a local development server with + // live reloading (automatic re-build on file changes). The local server serves + // /src/jsMain/resources/index.html from the root. js(IR) { + + // Output ES2015 modules (.mjs files) to build/js/packages//kotlin + // instead of default UMD (.js) modules. + useEsModules() + + // Set web browser environment as the target execution environment. + // This also runs webpack which bundles everything into a single + // /build/dist/js/productionExecutable/.js file. + // This file can be e.g. included in an HTML file and distributed + // via a CDN. browser { testTask { useKarma { @@ -28,7 +47,19 @@ kotlin { } } + // `nodejs {}` can be added here to set Node.js as the target execution + // environment. If no browser APIs are used, having just `browser {}` + // creates an isomorphic library. + + // Explicitly instruct the Kotlin compiler to emit executable JS code. + // If `binaries.library()` is used instead, the + // /build/dist/js/productionExecutable directory has + // un-webpacked JS. binaries.executable() + + // Generate TypeScript definitions (.d.ts files) from Kotlin code. The files are + // finally saved to build/js/packages//kotlin. + generateTypeScriptDefinitions() } sourceSets { diff --git a/Src/java/cql/src/jsMain/kotlin/Main.kt b/Src/java/cql/src/jsMain/kotlin/Main.kt new file mode 100644 index 000000000..51a0df59d --- /dev/null +++ b/Src/java/cql/src/jsMain/kotlin/Main.kt @@ -0,0 +1,42 @@ +import org.antlr.v4.kotlinruntime.CharStream +import org.antlr.v4.kotlinruntime.CharStreams +import org.antlr.v4.kotlinruntime.CommonTokenStream +import org.cqframework.cql.gen.cqlLexer +import org.cqframework.cql.gen.cqlParser + +@ExperimentalJsExport +@JsExport +fun parseToTree(logic: String): String { + val input: CharStream = CharStreams.fromString(logic) + val tokens = CommonTokenStream(cqlLexer(input)) + val parser = cqlParser(tokens) + parser.buildParseTree = true + val library = parser.library() + + // Inspect the library object in the console. + // Methods like toStringTree are mangled because they have multiple overloads. + // TODO: Remove in the future. + console.log("Library:", library) + + return library.toStringTree(parser) +} + +// This method is not exported so it won't be available in the JS library. +// TODO: Remove in the future. +fun someMethod() { + console.log("I am not exported") +} + +// This `main` method always just runs. +// TODO: Remove in the future. +fun main() { + val logic = "define inIPP : AgeAt(start of MeasurementPeriod) < 18" + val input: CharStream = CharStreams.fromString(logic) + val tokens = CommonTokenStream(cqlLexer(input)) + val parser = cqlParser(tokens) + parser.buildParseTree = true + val library = parser.library() + + val def = library.statement(0)?.expressionDefinition() + console.log(def?.identifier()?.IDENTIFIER().toString()) +} \ No newline at end of file diff --git a/Src/java/cql/src/jsMain/resources/index.html b/Src/java/cql/src/jsMain/resources/index.html new file mode 100644 index 000000000..e020e0ce3 --- /dev/null +++ b/Src/java/cql/src/jsMain/resources/index.html @@ -0,0 +1,10 @@ + + + + + JS Client Demo + + + + + \ No newline at end of file diff --git a/Src/java/kotlin-js-store/yarn.lock b/Src/java/kotlin-js-store/yarn.lock index dd1a803a5..6f079bdbd 100644 --- a/Src/java/kotlin-js-store/yarn.lock +++ b/Src/java/kotlin-js-store/yarn.lock @@ -125,17 +125,37 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== -"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": - version "4.19.5" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz#218064e321126fcf9048d1ca25dd2465da55d9c6" - integrity sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg== +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^5.0.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.0.1.tgz#3c9997ae9d00bc236e45c6374e84f2596458d9db" + integrity sha512-CRICJIl0N5cXDONAdlTv5ShATZ4HEwk6kDDIW2/w9qOWKg+NU/5F8wYRWCrONad0/UKkloNSmmyN/wX4rtpbVA== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express-serve-static-core@^4.17.33": + version "4.19.6" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz#e01324c2a024ff367d92c66f48553ced0ab50267" + integrity sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A== dependencies: "@types/node" "*" "@types/qs" "*" "@types/range-parser" "*" "@types/send" "*" -"@types/express@*", "@types/express@^4.17.13": +"@types/express@*": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.0.tgz#13a7d1f75295e90d19ed6e74cab3678488eaa96c" + integrity sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^5.0.0" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/express@^4.17.13": version "4.17.21" resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== @@ -380,7 +400,7 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: +accepts@~1.3.4, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -565,11 +585,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== - bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" @@ -669,7 +684,7 @@ commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -compressible@~2.0.16: +compressible@~2.0.18: version "2.0.18" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== @@ -677,16 +692,16 @@ compressible@~2.0.16: mime-db ">= 1.43.0 < 2" compression@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + version "1.7.5" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.5.tgz#fdd256c0a642e39e314c478f6c2cd654edd74c93" + integrity sha512-bQJ0YRck5ak3LgtnpKkiabX5pNF7tMUh1BSy2ZBOTh0Dim0BUu6aPPwByIns6/A5Prh8PufSPerMDUklpzes2Q== dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" + bytes "3.1.2" + compressible "~2.0.18" debug "2.6.9" + negotiator "~0.6.4" on-headers "~1.0.2" - safe-buffer "5.1.2" + safe-buffer "5.2.1" vary "~1.1.2" concat-map@0.0.1: @@ -726,10 +741,10 @@ cookie-signature@1.0.6: resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== -cookie@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" - integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== +cookie@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" + integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== cookie@~0.4.1: version "0.4.2" @@ -1009,16 +1024,16 @@ execa@^5.0.0: strip-final-newline "^2.0.0" express@^4.17.3: - version "4.21.0" - resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" - integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== + version "4.21.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.1.tgz#9dae5dda832f16b4eec941a4e44aa89ec481b281" + integrity sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ== dependencies: accepts "~1.3.8" array-flatten "1.1.1" body-parser "1.20.3" content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.6.0" + cookie "0.7.1" cookie-signature "1.0.6" debug "2.6.9" depd "2.0.0" @@ -1061,9 +1076,9 @@ fast-json-stable-stringify@^2.0.0: integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-uri@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" - integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + version "3.0.3" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241" + integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw== fastest-levenshtein@^1.0.12: version "1.0.16" @@ -1339,9 +1354,9 @@ http-parser-js@>=0.5.1: integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== http-proxy-middleware@^2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" - integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== + version "2.0.7" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz#915f236d92ae98ef48278a95dedf17e991936ec6" + integrity sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA== dependencies: "@types/http-proxy" "^1.17.8" http-proxy "^1.18.1" @@ -1821,6 +1836,11 @@ negotiator@0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== +negotiator@~0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" + integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== + neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -1976,7 +1996,12 @@ path-to-regexp@0.1.10: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== -picocolors@^1.0.0, picocolors@^1.0.1: +picocolors@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picocolors@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== @@ -2139,16 +2164,16 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" From 6af4b689bf18bbe35abf82193e16fc3ba3745456 Mon Sep 17 00:00:00 2001 From: JP Date: Wed, 6 Nov 2024 08:55:37 -0700 Subject: [PATCH 26/77] Swap Gradle language from Groovy to Kotlin (#1413) * WIP * WIP * WIP * Working? * Fix usage of Java 17 API * Update checkstyle rules * Fix static analysis * Updates to src dirs * Fixing up missing test sourceSet * Try another way to specify the antlr directory * Third different way * Add some logging * merge master * Change toolchain resolution * Fix tests * More tweaks to animalsniffer * Fix formatting * Trying random stuff * More random stuff * Small improvements for Gradle build (#1418) * Removing references to idea * Fix duplicative generation * Remove references to idea project generation --------- Co-authored-by: Anton Vasetenkov --- Src/java-quickstart/README.md | 12 -- Src/java/README.md | 9 - Src/java/build.gradle | 55 ------ Src/java/build.gradle.kts | 24 +++ Src/java/buildSrc/build.gradle | 15 -- Src/java/buildSrc/build.gradle.kts | 19 ++ .../main/groovy/cql.fhir-conventions.gradle | 31 --- .../main/groovy/cql.java-conventions.gradle | 181 ----------------- .../groovy/cql.library-conventions.gradle | 19 -- .../main/groovy/cql.sca-conventions.gradle | 34 ---- .../main/groovy/cql.xjc-conventions.gradle | 69 ------- Src/java/buildSrc/src/main/kotlin/XjcTask.kt | 34 ++++ .../kotlin/cql.fhir-conventions.gradle.kts | 41 ++++ .../kotlin/cql.java-conventions.gradle.kts | 185 ++++++++++++++++++ .../kotlin/cql.library-conventions.gradle.kts | 16 ++ .../kotlin/cql.sca-conventions.gradle.kts | 29 +++ .../kotlin/cql.xjc-conventions.gradle.kts | 50 +++++ Src/java/cqf-fhir-npm/build.gradle | 10 - Src/java/cqf-fhir-npm/build.gradle.kts | 10 + Src/java/cqf-fhir/build.gradle | 3 - Src/java/cqf-fhir/build.gradle.kts | 3 + Src/java/cql-to-elm-cli/build.gradle | 24 --- Src/java/cql-to-elm-cli/build.gradle.kts | 24 +++ Src/java/cql-to-elm/build.gradle | 29 --- Src/java/cql-to-elm/build.gradle.kts | 25 +++ Src/java/cql/build.gradle | 34 ---- Src/java/cql/build.gradle.kts | 36 ++++ Src/java/elm-fhir/build.gradle | 25 --- Src/java/elm-fhir/build.gradle.kts | 14 ++ Src/java/elm-jackson/build.gradle | 14 -- Src/java/elm-jackson/build.gradle.kts | 11 ++ Src/java/elm-jaxb/build.gradle | 7 - Src/java/elm-jaxb/build.gradle.kts | 7 + Src/java/elm-test/build.gradle | 11 -- Src/java/elm-test/build.gradle.kts | 11 ++ Src/java/elm/build.gradle | 24 --- Src/java/elm/build.gradle.kts | 20 ++ Src/java/engine-fhir/build.gradle | 42 ---- Src/java/engine-fhir/build.gradle.kts | 36 ++++ .../engine/{build.gradle => build.gradle.kts} | 14 +- Src/java/gradle.properties | 2 +- Src/java/model-jackson/build.gradle | 16 -- Src/java/model-jackson/build.gradle.kts | 13 ++ Src/java/model-jaxb/build.gradle | 7 - Src/java/model-jaxb/build.gradle.kts | 7 + Src/java/model/build.gradle | 18 -- Src/java/model/build.gradle.kts | 13 ++ Src/java/qdm/build.gradle | 22 --- Src/java/qdm/build.gradle.kts | 17 ++ Src/java/quick/build.gradle | 19 -- Src/java/quick/build.gradle.kts | 14 ++ Src/java/settings.gradle | 26 --- Src/java/settings.gradle.kts | 26 +++ Src/java/tools/cql-formatter/build.gradle | 21 -- Src/java/tools/cql-formatter/build.gradle.kts | 21 ++ Src/java/tools/cql-parsetree/build.gradle | 16 -- Src/java/tools/cql-parsetree/build.gradle.kts | 16 ++ Src/java/tools/xsd-to-modelinfo/build.gradle | 16 -- .../tools/xsd-to-modelinfo/build.gradle.kts | 16 ++ 59 files changed, 746 insertions(+), 817 deletions(-) delete mode 100644 Src/java/build.gradle create mode 100644 Src/java/build.gradle.kts delete mode 100644 Src/java/buildSrc/build.gradle create mode 100644 Src/java/buildSrc/build.gradle.kts delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle delete mode 100644 Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle create mode 100644 Src/java/buildSrc/src/main/kotlin/XjcTask.kt create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts create mode 100644 Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts delete mode 100644 Src/java/cqf-fhir-npm/build.gradle create mode 100644 Src/java/cqf-fhir-npm/build.gradle.kts delete mode 100644 Src/java/cqf-fhir/build.gradle create mode 100644 Src/java/cqf-fhir/build.gradle.kts delete mode 100644 Src/java/cql-to-elm-cli/build.gradle create mode 100644 Src/java/cql-to-elm-cli/build.gradle.kts delete mode 100644 Src/java/cql-to-elm/build.gradle create mode 100644 Src/java/cql-to-elm/build.gradle.kts delete mode 100644 Src/java/cql/build.gradle create mode 100644 Src/java/cql/build.gradle.kts delete mode 100644 Src/java/elm-fhir/build.gradle create mode 100644 Src/java/elm-fhir/build.gradle.kts delete mode 100644 Src/java/elm-jackson/build.gradle create mode 100644 Src/java/elm-jackson/build.gradle.kts delete mode 100644 Src/java/elm-jaxb/build.gradle create mode 100644 Src/java/elm-jaxb/build.gradle.kts delete mode 100644 Src/java/elm-test/build.gradle create mode 100644 Src/java/elm-test/build.gradle.kts delete mode 100644 Src/java/elm/build.gradle create mode 100644 Src/java/elm/build.gradle.kts delete mode 100644 Src/java/engine-fhir/build.gradle create mode 100644 Src/java/engine-fhir/build.gradle.kts rename Src/java/engine/{build.gradle => build.gradle.kts} (63%) delete mode 100644 Src/java/model-jackson/build.gradle create mode 100644 Src/java/model-jackson/build.gradle.kts delete mode 100644 Src/java/model-jaxb/build.gradle create mode 100644 Src/java/model-jaxb/build.gradle.kts delete mode 100644 Src/java/model/build.gradle create mode 100644 Src/java/model/build.gradle.kts delete mode 100644 Src/java/qdm/build.gradle create mode 100644 Src/java/qdm/build.gradle.kts delete mode 100644 Src/java/quick/build.gradle create mode 100644 Src/java/quick/build.gradle.kts delete mode 100644 Src/java/settings.gradle create mode 100644 Src/java/settings.gradle.kts delete mode 100644 Src/java/tools/cql-formatter/build.gradle create mode 100644 Src/java/tools/cql-formatter/build.gradle.kts delete mode 100644 Src/java/tools/cql-parsetree/build.gradle create mode 100644 Src/java/tools/cql-parsetree/build.gradle.kts delete mode 100644 Src/java/tools/xsd-to-modelinfo/build.gradle create mode 100644 Src/java/tools/xsd-to-modelinfo/build.gradle.kts diff --git a/Src/java-quickstart/README.md b/Src/java-quickstart/README.md index 94b8ecf21..ff3f9792d 100644 --- a/Src/java-quickstart/README.md +++ b/Src/java-quickstart/README.md @@ -20,18 +20,6 @@ To clean up the artifacts: ./gradlew clean -# Generating IDE Projects - -You can generate an IDE project for IntelliJ IDEA: - - ./gradlew idea - -This is preferred over having IDEA load the gradle file directly, because it (a) generates the CQL -libraries, and (b) generates the configuration for the IDEA ANTLR plugin. To open the project in -IntelliJ IDEA, launch IDEA and open the `java-quickstart.ipr` file. - -See further below for installing and using the ANTLR plugin for IDEA. - # Executing the Sample Code You can execute the sample code using the `gradlew` command or a script generated by gradle. diff --git a/Src/java/README.md b/Src/java/README.md index 83caae007..c4fa54940 100644 --- a/Src/java/README.md +++ b/Src/java/README.md @@ -31,15 +31,6 @@ To clean up the build artifacts: ./gradlew clean -# Generating IDE Projects - -You can generate an IDE project for IntelliJ IDEa: - - ./gradlew idea - -In addition to creating project modules for cql, model, quick, elm, cql-to-elm, and the tools projects, this will also import project -modules for the CQL grammar and examples. - # Executing the Sample Code You can execute the sample code using the `gradlew` command or a script generated by gradle. diff --git a/Src/java/build.gradle b/Src/java/build.gradle deleted file mode 100644 index 938708ac2..000000000 --- a/Src/java/build.gradle +++ /dev/null @@ -1,55 +0,0 @@ -plugins { - id 'idea' - id 'eclipse' - id "org.sonarqube" version "4.4.1.3373" -} - -sonar { - properties { - property "sonar.projectKey", "cqframework_clinical_quality_language" - property "sonar.organization", "cqframework" - property "sonar.host.url", "https://sonarcloud.io" - } -} - -idea { - project { - languageLevel = JavaVersion.VERSION_11 - ipr { - withXml { provider -> - provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git' - } - - whenMerged { project -> - def examples = new org.gradle.plugins.ide.idea.model.Path('file://$PROJECT_DIR$/examples.iml', 'file://$PROJECT_DIR$/examples.iml', '$PROJECT_DIR$/examples.iml') - if ((project.modulePaths.findAll { p -> p.url == examples.url }).empty) project.modulePaths.add(examples) - - def grammar = new org.gradle.plugins.ide.idea.model.Path('file://$PROJECT_DIR$/grammar.iml', 'file://$PROJECT_DIR$/grammar.iml', '$PROJECT_DIR$/grammar.iml') - if ((project.modulePaths.findAll { p -> p.url == grammar.url }).empty) project.modulePaths.add(grammar) - - def cqllm = new org.gradle.plugins.ide.idea.model.Path('file://$PROJECT_DIR$/cql-lm.iml', 'file://$PROJECT_DIR$/cql-lm.iml', '$PROJECT_DIR$/cql-lm.iml') - if ((project.modulePaths.findAll { p -> p.url == cqllm.url }).empty) project.modulePaths.add(cqllm) - } - } - } - workspace { - iws { - withXml { provider -> - def props = provider.node.component.find { it.@name == 'PropertiesComponent' } - - def propMap = [ - '$PROJECT_DIR$/../grammar/cql.g4::/output-dir' : '$PROJECT_DIR$/cql/src/generated/java', - '$PROJECT_DIR$/../grammar/cql.g4::/lib-dir' : '$PROJECT_DIR$/../grammar', - '$PROJECT_DIR$/../grammar/cql.g4::/package' : 'org.cqframework.cql.gen', - '$PROJECT_DIR$/../grammar/cql.g4::/gen-listener' : 'true', - '$PROJECT_DIR$/../grammar/cql.g4::/gen-visitor' : 'true' - ] - - propMap.each() { key, value -> - if (! props.property.find { it.@name == key }) - props.appendNode('property', ['name' : key, 'value' : value]) - } - } - } - } -} \ No newline at end of file diff --git a/Src/java/build.gradle.kts b/Src/java/build.gradle.kts new file mode 100644 index 000000000..8986259f2 --- /dev/null +++ b/Src/java/build.gradle.kts @@ -0,0 +1,24 @@ +plugins { + kotlin("jvm") version "2.0.20" + id("org.sonarqube") version "4.4.1.3373" +} + +sonar { + properties { + property("sonar.projectKey", "cqframework_clinical_quality_language") + property("sonar.organization", "cqframework") + property("sonar.host.url", "https://sonarcloud.io") + } +} + +repositories { + mavenCentral() +} + +dependencies { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") +} + +kotlin { + jvmToolchain(11) +} \ No newline at end of file diff --git a/Src/java/buildSrc/build.gradle b/Src/java/buildSrc/build.gradle deleted file mode 100644 index b7ecf8ca3..000000000 --- a/Src/java/buildSrc/build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id 'groovy-gradle-plugin' -} - -repositories { - mavenCentral() - gradlePluginPortal() -} - -dependencies { - implementation 'net.ltgt.gradle:gradle-errorprone-plugin:3.1.0' - implementation 'ru.vyarus:gradle-animalsniffer-plugin:1.7.0' - implementation 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14' - implementation 'com.diffplug.spotless:spotless-plugin-gradle:6.23.3' -} \ No newline at end of file diff --git a/Src/java/buildSrc/build.gradle.kts b/Src/java/buildSrc/build.gradle.kts new file mode 100644 index 000000000..a4ee2ec71 --- /dev/null +++ b/Src/java/buildSrc/build.gradle.kts @@ -0,0 +1,19 @@ +plugins { + `kotlin-dsl` +} + +repositories { + mavenCentral() + gradlePluginPortal() +} + +dependencies { + implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0") + implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.0") + implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14") + implementation("com.diffplug.spotless:spotless-plugin-gradle:6.23.3") +} + +kotlin { + jvmToolchain(11) +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle deleted file mode 100644 index 80622c10c..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -ext { - hapiVersion = project['hapi.version'] -} - -dependencies { - api platform("ca.uhn.hapi.fhir:hapi-fhir-bom:${hapiVersion}") { - exclude group: 'org.eclipse.jetty' - exclude group: 'xpp3' - exclude group: 'org.junit' - } - - implementation "ca.uhn.hapi.fhir:hapi-fhir-base" - implementation "ca.uhn.hapi.fhir:hapi-fhir-converter" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-hl7org-dstu2" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r4" - implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r5" - - // This is to align with the FHIR core dependencies - // Note that this dependency hasn't been updated since 2013 - // we probably need to standardize on a fork up the dependency chain - implementation ('org.ogce:xpp3:1.1.6') { - exclude group: 'org.junit' - exclude group: 'org.hamcrest' - } -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle deleted file mode 100644 index 42614d30b..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.java-conventions.gradle +++ /dev/null @@ -1,181 +0,0 @@ -plugins { - id 'java' - id 'maven-publish' - id 'jacoco' - id 'signing' - id 'cql.sca-conventions' - id 'com.diffplug.spotless' -} - -java { - withJavadocJar() - withSourcesJar() -} - -compileJava { - options.release = 11 -} - -repositories { - mavenLocal() - mavenCentral() - maven { - url "https://oss.sonatype.org/content/repositories/snapshots" - } -} - -dependencies { - implementation 'org.slf4j:slf4j-api:1.7.36' - testImplementation 'org.hamcrest:hamcrest-all:1.3' - testImplementation 'uk.co.datumedge:hamcrest-json:0.2' - testImplementation(platform('org.junit:junit-bom:5.10.2')) - testImplementation('org.junit.jupiter:junit-jupiter') - testImplementation 'org.slf4j:slf4j-simple:1.7.36' - - // These are JAXB dependencies excluded because the libraries need to work - // on Android. But for test purposes we use them pretty much everywhere. - testRuntimeOnly 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' - testRuntimeOnly 'org.eclipse.parsson:parsson:1.1.5' - testRuntimeOnly('org.junit.platform:junit-platform-launcher') -} - -jar { - manifest { - attributes('Implementation-Title': project.name, - 'Implementation-Version': project.version, - 'Specification-Title': 'HL7 Clinical Quality Language (CQL)', - 'Specification-Version': project['specification.version']) - } -} - -jacoco { - toolVersion = "0.8.11" -} - -test { - useJUnitPlatform() - testLogging { - events "skipped", "failed" - } - finalizedBy jacocoTestReport // report is always generated after tests run -} - -jacocoTestReport { - reports { - xml.required = true - } - dependsOn test // tests are required to run before generating the report -} - -tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') -} - -tasks.withType(JavaCompile) { - options.compilerArgs << '-Xlint:unchecked' - options.deprecation = true -} - -spotless { - java { - targetExclude '**/generated/**' - palantirJavaFormat() - } -} - -/* -A few things: - - You must have an OSSRH Jira account (https://issues.sonatype.org/secure/Signup!default.jspa) - - Your account must have privileges to upload info.cqframework artifacts (https://issues.sonatype.org/browse/OSSRH-15514) - - You must have a gpg key (http://central.sonatype.org/pages/working-with-pgp-signatures.html) - - You must set your account info and GPG key in your user's gradle.properties file. For example: - ossrhUsername=foo - ossrhPassword=b@r - signing.keyId=24875D73 - signing.password=secret - signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg - - If the library version ends with '-SNAPSHOT', it will be deployed to the snapshot repository, else it will be - deployed to the staging repository (which you then must manually release http://central.sonatype.org/pages/releasing-the-deployment.html). - - Repo for snapshots and releases for the translator modules: https://oss.sonatype.org/content/groups/public/info/cqframework/ - - Repo for snpashots, releases, and staged releases for the translator modules: https://oss.sonatype.org/content/groups/staging/info/cqframework/ - - Repo for snapshots and releases for the engine modules: https://oss.sonatype.org/content/groups/public/org/opencds/cqf/cql/ - - Repo for snapshots, releases, and staged releases for the engine modules: https://oss.sonatype.org/content/groups/staging/org/opencds/cqf/cql/ - */ -publishing { - publications { - mavenDeployer(MavenPublication) { - from components.java - - pom { - name = project.name - packaging = 'jar' - description = "The ${project.name} library for the Clinical Quality Language Java reference implementation" - url = 'http://cqframework.info' - - scm { - connection = 'scm:git:git@github.com:cqframework/clinical_quality_language.git' - developerConnection = 'scm:git:git@github.com:cqframework/clinical_quality_language.git' - url = 'git@github.com:cqframework/clinical_quality_language.git' - } - - licenses { - license { - name ='The Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - - developers { - developer { - name = 'Bryn Rhodes' - } - developer { - name = 'Chris Moesel' - } - developer { - name = 'Rob Dingwell' - } - developer { - name = 'Jason Walonoski' - } - developer { - name = 'Marc Hadley' - } - developer { - name = 'Jonathan Percival' - } - } - } - } - } - repositories { - maven { - credentials { - username project.hasProperty("ossrhUsername") ? ossrhUsername : System.getenv("OSSRH_USERNAME") != null ? System.getenv("OSSRH_USERNAME") : "" - password project.hasProperty("ossrhPassword") ? ossrhPassword : System.getenv("OSSRH_TOKEN") != null ? System.getenv("OSSRH_TOKEN") : "" - } - - /* Use these to test locally (but don't forget to comment out others!) - def releasesRepoUrl = "file://${buildDir}/repo" - def snapshotsRepoUrl = "file://${buildDir}/ssRepo" - */ - - // change URLs to point to your repos, e.g. http://my.org/repo - def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" - def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - } - } -} - -signing { - if (!version.endsWith('SNAPSHOT')){ - sign publishing.publications.mavenDeployer - } -} - -javadoc { - if(JavaVersion.current().isJava9Compatible()) { - options.addBooleanOption('html5', true) - } -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle deleted file mode 100644 index 52f3ea967..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.library-conventions.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'java-library' - id 'ru.vyarus.animalsniffer' - id 'cql.java-conventions' -} - -ext { - androidApiLevel = project['android.api.level'] -} - - -dependencies { - // Various libraries for Android signatures are available, Jackson uses this one - signature "com.toasttab.android:gummy-bears-api-${androidApiLevel}:0.5.0@signature" -} - -animalsniffer { - sourceSets = [sourceSets.main] -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle deleted file mode 100644 index d23a15b6b..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.sca-conventions.gradle +++ /dev/null @@ -1,34 +0,0 @@ -plugins { - id 'java' - id 'net.ltgt.errorprone' - id 'checkstyle' -} - -ext { - errorproneVersion = '2.24.1' -} - -dependencies { - errorprone "com.google.errorprone:error_prone_core:${errorproneVersion}" -} - -checkstyleMain.source = "src/main/java" -// TODO: Have a conversation with the team about enforcing checkstyle in tests -checkstyleTest.enabled = false - -tasks.withType(JavaCompile).configureEach { - // TODO: Change this once we fix all the errors - options.errorprone.disableAllWarnings = true - options.errorprone.disableWarningsInGeneratedCode = true - options.errorprone.disable("DoubleBraceInitialization") - // This applies recommended fixes to the source code in place - // options.errorprone.errorproneArgs = ["-XepPatchLocation:IN_PLACE"] -} - -tasks { - compileTestJava { - // TODO: Talk to the team about warnings in tests - options.errorprone.disableAllWarnings = true - options.errorprone.disableWarningsInGeneratedCode = true - } -} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle b/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle deleted file mode 100644 index 8f9e15407..000000000 --- a/Src/java/buildSrc/src/main/groovy/cql.xjc-conventions.gradle +++ /dev/null @@ -1,69 +0,0 @@ -plugins { - id 'java' -} - -configurations { - xjc -} - -dependencies { - xjc 'codes.rafael.jaxb2_commons:jaxb2-basics-ant:3.0.0' - xjc 'codes.rafael.jaxb2_commons:jaxb2-basics:3.0.0' - xjc 'codes.rafael.jaxb2_commons:jaxb2-fluent-api:3.0.0' - // Eclipse has taken over all Java EE reference components - // https://www.infoworld.com/article/3310042/eclipse-takes-over-all-java-ee-reference-components.html - // https://wiki.eclipse.org/Jakarta_EE_Maven_Coordinates - xjc 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - xjc 'org.glassfish.jaxb:jaxb-xjc:3.0.2' - xjc 'org.glassfish.jaxb:jaxb-runtime:4.0.3' - xjc 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' - xjc 'org.slf4j:slf4j-simple:1.7.36' - api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' - api 'codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0' -} - -ext.xjc = [ - destDir: "${buildDir}/generated/sources/$name/main/java", - args: '-disableXmlSecurity -Xfluent-api -Xequals -XhashCode -XtoString -Xsetters -Xsetters-mode=direct' -] - - -task generateSources { - - outputs.dir xjc.destDir - - doLast { - file(xjc.destDir).mkdirs() - - ant.taskdef(name: 'xjc', classname: 'org.jvnet.jaxb2_commons.xjc.XJC2Task', classpath: configurations.xjc.asPath) - - /* The above sets up the task, but the real work of the task should be specified in the subproject using - generateSources.doLast. For example: - generateSources.doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/path/to/file.xsd") { - arg(line: xjc.args) - } - } - */ - } -} - -compileJava { - dependsOn generateSources -} - -sourcesJar { - dependsOn generateSources -} - -sourceSets { - main { - java { - srcDir(xjc.destDir) - } - } -} - -clean { - delete xjc.destDir -} diff --git a/Src/java/buildSrc/src/main/kotlin/XjcTask.kt b/Src/java/buildSrc/src/main/kotlin/XjcTask.kt new file mode 100644 index 000000000..c3d12b321 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/XjcTask.kt @@ -0,0 +1,34 @@ +import org.gradle.api.DefaultTask +import org.gradle.api.tasks.* + +open class XjcTask : DefaultTask() { + @Input + lateinit var schema: String + + @Input + var extraArgs : List = emptyList() + + @Input + var binding: String = "" + + @OutputDirectory + lateinit var outputDir: String + + + @TaskAction + fun generate() { + var bindingArgs : List = emptyList(); + if (binding.isNotBlank()) { + bindingArgs = listOf("-b", binding) + } + + val defaultArgs = listOf("-quiet", "-disableXmlSecurity", "-Xfluent-api", "-Xequals" ,"-XhashCode", "-XtoString" , "-Xsetters", "-Xsetters-mode=direct") + val options = listOf("-d", outputDir, schema) + bindingArgs + defaultArgs + extraArgs + + project.javaexec { + mainClass.set("com.sun.tools.xjc.XJCFacade") + classpath = project.configurations.getByName("xjc") + args = options + } + } +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts new file mode 100644 index 000000000..236198ee0 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.fhir-conventions.gradle.kts @@ -0,0 +1,41 @@ +plugins { + id("cql.library-conventions") +} + +// bug fix for the hapi-bom +configurations.all { + resolutionStrategy { + eachDependency { + if (requested.group == "org.eclipse.jetty") { + useVersion("11.0.20") + because("jetty 12 is java 17") + } + } + } +} + +dependencies { + + api(platform("ca.uhn.hapi.fhir:hapi-fhir-bom:${project.findProperty("hapi.version")}")) + + implementation("ca.uhn.hapi.fhir:hapi-fhir-base") { + exclude(group = "org.eclipse.jetty") + exclude(group = "xpp3") + exclude(group = "org.junit") + } + + implementation("ca.uhn.hapi.fhir:hapi-fhir-converter") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-hl7org-dstu2") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r4") + implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r5") + + // This is to align with the FHIR core dependencies + // Note that this dependency hasn"t been updated since 2013 + // we probably need to standardize on a fork up the dependency chain + implementation("org.ogce:xpp3:1.1.6") { + exclude(group = "org.junit") + exclude(group = "org.hamcrest") + } +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts new file mode 100644 index 000000000..f75f566cb --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.java-conventions.gradle.kts @@ -0,0 +1,185 @@ +plugins { + id("java") + id("maven-publish") + id("jacoco") + id("signing") + id("cql.sca-conventions") + id("com.diffplug.spotless") +} + +java { + withJavadocJar() + withSourcesJar() + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } +} + +repositories { + mavenLocal() + mavenCentral() + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots") + mavenContent { + snapshotsOnly() + } + } +} + +dependencies { + implementation("org.slf4j:slf4j-api:1.7.36") + testImplementation("org.hamcrest:hamcrest-all:1.3") + testImplementation("uk.co.datumedge:hamcrest-json:0.2") + testImplementation(platform("org.junit:junit-bom:5.10.2")) + testImplementation("org.junit.jupiter:junit-jupiter") + testImplementation("org.slf4j:slf4j-simple:1.7.36") + + // These are JAXB dependencies excluded because the libraries need to work + // on Android. But for test purposes we use them pretty much everywhere. + testRuntimeOnly("org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2") + testRuntimeOnly("org.eclipse.parsson:parsson:1.1.5") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") +} + +tasks.jar { + manifest { + attributes["Implementation-Title"] = project.name + attributes["Implementation-Version"] = project.version + attributes["Specification-Title"] = "HL7 Clinical Quality Language (CQL)" + attributes["Specification-Version"] = project.findProperty("specification.version") ?: "" + } +} + +jacoco { + toolVersion = "0.8.11" +} + +tasks.withType { + useJUnitPlatform() + testLogging { + events("skipped", "failed") + } + finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run +} + +tasks.jacocoTestReport { + reports { + xml.required = true + } + dependsOn(tasks.test)// tests are required to run before generating the report +} + +tasks.javadoc { + options { + val standardOptions = this as StandardJavadocDocletOptions + standardOptions.addStringOption("Xdoclint:none", "-quiet") + } +} + +tasks.withType { + options.compilerArgs.add("-Xlint:unchecked") + options.isDeprecation = true +} + +spotless { + java { + targetExclude("**/generated/**") + palantirJavaFormat() + } +} + +/* +A few things: + - You must have an OSSRH Jira account (https://issues.sonatype.org/secure/Signup!valault.jspa) + - Your account must have privileges to upload info.cqframework artifacts (https://issues.sonatype.org/browse/OSSRH-15514) + - You must have a gpg key (http://central.sonatype.org/pages/working-with-pgp-signatures.html) + - You must set your account info and GPG key in your user"s gradle.properties file. For example: + ossrhUsername=foo + ossrhPassword=b@r + signing.keyId=24875D73 + signing.password=secret + signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg + - If the library version ends with "-SNAPSHOT", it will be deployed to the snapshot repository, else it will be + deployed to the staging repository (which you then must manually release http://central.sonatype.org/pages/releasing-the-deployment.html). + - Repo for snapshots and releases for the translator modules: https://oss.sonatype.org/content/groups/public/info/cqframework/ + - Repo for snpashots, releases, and staged releases for the translator modules: https://oss.sonatype.org/content/groups/staging/info/cqframework/ + - Repo for snapshots and releases for the engine modules: https://oss.sonatype.org/content/groups/public/org/opencds/cqf/cql/ + - Repo for snapshots, releases, and staged releases for the engine modules: https://oss.sonatype.org/content/groups/staging/org/opencds/cqf/cql/ + */ +publishing { + publications { + create("mavenJava") { + from(components["java"]) + + pom { + name = project.name + packaging = "jar" + description = + "The ${project.name} library for the Clinical Quality Language Java reference implementation" + url = "http://cqframework.info" + + scm { + connection = "scm:git:git@github.com:cqframework/clinical_quality_language.git" + developerConnection = "scm:git:git@github.com:cqframework/clinical_quality_language.git" + url = "git@github.com:cqframework/clinical_quality_language.git" + } + + licenses { + license { + name = "The Apache License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + + developers { + developer { + name = "Bryn Rhodes" + } + developer { + name = "Chris Moesel" + } + developer { + name = "Rob Dingwell" + } + developer { + name = "Jason Walonoski" + } + developer { + name = "Marc Hadley" + } + developer { + name = "Jonathan Percival" + } + } + } + } + } + repositories { + maven { + credentials { + username = project.findProperty("ossrhUsername") as String? ?: System.getenv("OSSRH_USERNAME") ?: "" + password = project.findProperty("ossrhPassword") as String? ?: System.getenv("OSSRH_TOKEN") ?: "" + } + + /* Use these to test locally (but don"t forget to comment out others!) + val releasesRepoUrl = "file://${buildDir}/repo" + val snapshotsRepoUrl = "file://${buildDir}/ssRepo" + */ + + // change URLs to point to your repos, e.g. http://my.org/repo + val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" + if ((project.version as String).endsWith("SNAPSHOT")) { + url = uri(snapshotsRepoUrl) + } else { + url = uri(releasesRepoUrl) + } + } + } +} + +signing { + if (!(version as String).endsWith("SNAPSHOT")) { + sign(publishing.publications["mavenJava"]) + } +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts new file mode 100644 index 000000000..0d17e8b3b --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -0,0 +1,16 @@ +import ru.vyarus.gradle.plugin.animalsniffer.AnimalSniffer + +plugins { + id("java-library") + id("ru.vyarus.animalsniffer") + id("cql.java-conventions") +} + +dependencies { + // Various libraries for Android signatures are available, Jackson uses this one + signature("com.toasttab.android:gummy-bears-api-${project.findProperty("android.api.level")}:0.5.0@signature") +} + +tasks.animalsnifferTest { + enabled = false +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts new file mode 100644 index 000000000..c9a6a4be4 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.sca-conventions.gradle.kts @@ -0,0 +1,29 @@ +import net.ltgt.gradle.errorprone.errorprone + +plugins { + id("java") + id("net.ltgt.errorprone") + id("checkstyle") +} + +repositories { + mavenCentral() +} +dependencies { + errorprone("com.google.errorprone:error_prone_core:2.29.2") +} + +tasks.named("checkstyleMain") { + exclude { it.file.path.contains("generated")} +} + +tasks.named("checkstyleTest") { + enabled = false +} + +tasks.withType().configureEach { + options.errorprone.disableAllWarnings = true + options.errorprone.disableWarningsInGeneratedCode = true + options.errorprone.disable("DoubleBraceInitialization") + // errorproneArgs = ["-XepPatchLocation:IN_PLACE"] +} \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts new file mode 100644 index 000000000..9ab5ad518 --- /dev/null +++ b/Src/java/buildSrc/src/main/kotlin/cql.xjc-conventions.gradle.kts @@ -0,0 +1,50 @@ +plugins { + id("java-library") +} + +val xjc by configurations.creating + +dependencies { + xjc("codes.rafael.jaxb2_commons:jaxb2-basics-ant:3.0.0") + xjc("codes.rafael.jaxb2_commons:jaxb2-basics:3.0.0") + xjc("codes.rafael.jaxb2_commons:jaxb2-fluent-api:3.0.0") + // Eclipse has taken over all Java EE reference components + // https://www.infoworld.com/article/3310042/eclipse-takes-over-all-java-ee-reference-components.html + // https://wiki.eclipse.org/Jakarta_EE_Maven_Coordinates + xjc("jakarta.xml.bind:jakarta.xml.bind-api:4.0.1") + xjc("org.glassfish.jaxb:jaxb-xjc:3.0.2") + xjc("org.glassfish.jaxb:jaxb-runtime:4.0.3") + xjc("org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2") + xjc("org.slf4j:slf4j-simple:1.7.36") + xjc("org.apache.ant:ant:1.10.14") + + api("jakarta.xml.bind:jakarta.xml.bind-api:4.0.1") + api("codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0") +} + +var buildDir = project.layout.buildDirectory.get().toString() +val destDir = "${buildDir}/generated/sources/$name/main/java" + +tasks.compileJava { + dependsOn(tasks.withType()) +} + +tasks.withType().configureEach { + outputDir = destDir +} + +tasks.named("sourcesJar") { + dependsOn(tasks.withType()) +} + +sourceSets { + main { + java { + srcDir(destDir) + } + } +} + +tasks.named("clean") { + delete(destDir) +} diff --git a/Src/java/cqf-fhir-npm/build.gradle b/Src/java/cqf-fhir-npm/build.gradle deleted file mode 100644 index 89422d105..000000000 --- a/Src/java/cqf-fhir-npm/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -plugins { - id "cql.fhir-conventions" -} - -dependencies { - implementation project(':cql-to-elm') - implementation project(':cqf-fhir') - implementation 'com.google.code.gson:gson:2.9.1' - implementation 'org.apache.commons:commons-compress:1.24.0' -} diff --git a/Src/java/cqf-fhir-npm/build.gradle.kts b/Src/java/cqf-fhir-npm/build.gradle.kts new file mode 100644 index 000000000..86efb4dc2 --- /dev/null +++ b/Src/java/cqf-fhir-npm/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + id("cql.fhir-conventions") +} + +dependencies { + implementation(project(":cql-to-elm")) + implementation(project(":cqf-fhir")) + implementation("com.google.code.gson:gson:2.9.1") + implementation("org.apache.commons:commons-compress:1.24.0") +} \ No newline at end of file diff --git a/Src/java/cqf-fhir/build.gradle b/Src/java/cqf-fhir/build.gradle deleted file mode 100644 index ece5a847e..000000000 --- a/Src/java/cqf-fhir/build.gradle +++ /dev/null @@ -1,3 +0,0 @@ -plugins { - id 'cql.fhir-conventions' -} \ No newline at end of file diff --git a/Src/java/cqf-fhir/build.gradle.kts b/Src/java/cqf-fhir/build.gradle.kts new file mode 100644 index 000000000..d5c16b25c --- /dev/null +++ b/Src/java/cqf-fhir/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + id("cql.fhir-conventions") +} \ No newline at end of file diff --git a/Src/java/cql-to-elm-cli/build.gradle b/Src/java/cql-to-elm-cli/build.gradle deleted file mode 100644 index 332ac9c93..000000000 --- a/Src/java/cql-to-elm-cli/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id 'cql.java-conventions' - id "application" -} - -application { - mainClass = 'org.cqframework.cql.cql2elm.cli.Main' -} - -dependencies { - implementation project(':cql-to-elm') - implementation project(':quick') - implementation project(':qdm') - implementation project(':model-jaxb') - implementation project(':elm-jaxb') - implementation 'net.sf.jopt-simple:jopt-simple:4.7' - implementation 'org.slf4j:slf4j-simple:1.7.36' - implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.5' - implementation 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' - testImplementation project(':model-jaxb') - testImplementation project(':model-jackson') - testImplementation project(':elm-jaxb') - testImplementation project(':elm-jackson') -} \ No newline at end of file diff --git a/Src/java/cql-to-elm-cli/build.gradle.kts b/Src/java/cql-to-elm-cli/build.gradle.kts new file mode 100644 index 000000000..ca47368a8 --- /dev/null +++ b/Src/java/cql-to-elm-cli/build.gradle.kts @@ -0,0 +1,24 @@ +plugins { + id("cql.java-conventions") + id("application") +} + +application { + mainClass = "org.cqframework.cql.cql2elm.cli.Main" +} + +dependencies { + implementation(project(":cql-to-elm")) + implementation(project(":quick")) + implementation(project(":qdm")) + implementation(project(":model-jaxb")) + implementation(project(":elm-jaxb")) + implementation("net.sf.jopt-simple:jopt-simple:4.7") + implementation("org.slf4j:slf4j-simple:1.7.36") + implementation("org.glassfish.jaxb:jaxb-runtime:4.0.5") + implementation("org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2") + testImplementation(project(":model-jaxb")) + testImplementation(project(":model-jackson")) + testImplementation(project(":elm-jaxb")) + testImplementation(project(":elm-jackson")) +} \ No newline at end of file diff --git a/Src/java/cql-to-elm/build.gradle b/Src/java/cql-to-elm/build.gradle deleted file mode 100644 index 5b782b882..000000000 --- a/Src/java/cql-to-elm/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' -} - -ext { - jacksonVersion = project['jackson.version'] -} - -dependencies { - api project(':cql') - api project(':model') - api project(':elm') - api 'org.fhir:ucum:1.0.8' - api 'org.apache.commons:commons-text:1.10.0' - - // TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives - // in the cql-to-elm project. Ideally, we'd factor out all serialization depedencies into common - // libraries such that we could swap out jackson for something else. In the meantime, these are - // "implementation" dependencies so that they are not exported downstream. - implementation "com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}" - testImplementation project(':elm-jackson') - testImplementation project(':model-jackson') - testImplementation project(':quick') - testImplementation project(':qdm') - testImplementation 'com.github.reinert:jjschema:1.16' - testImplementation 'com.tngtech.archunit:archunit:1.2.1' - testImplementation 'org.skyscreamer:jsonassert:1.5.1' -} \ No newline at end of file diff --git a/Src/java/cql-to-elm/build.gradle.kts b/Src/java/cql-to-elm/build.gradle.kts new file mode 100644 index 000000000..e22e3fa60 --- /dev/null +++ b/Src/java/cql-to-elm/build.gradle.kts @@ -0,0 +1,25 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":cql")) + api(project(":model")) + api(project(":elm")) + api("org.fhir:ucum:1.0.8") + api("org.apache.commons:commons-text:1.10.0") + + // TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives + // in the cql-to-elm project. Ideally, we"d factor out all serialization depedencies into common + // libraries such that we could swap out jackson for something else. In the meantime, these are + // "implementation" dependencies so that they are not exported downstream. + implementation("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${project.findProperty("jackson.version")}") + testImplementation(project(":elm-jackson")) + testImplementation(project(":model-jackson")) + testImplementation(project(":quick")) + testImplementation(project(":qdm")) + testImplementation("com.github.reinert:jjschema:1.16") + testImplementation("com.tngtech.archunit:archunit:1.2.1") + testImplementation("org.skyscreamer:jsonassert:1.5.1") +} \ No newline at end of file diff --git a/Src/java/cql/build.gradle b/Src/java/cql/build.gradle deleted file mode 100644 index 1c2f641d2..000000000 --- a/Src/java/cql/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -plugins { - id 'cql.java-conventions' - id 'application' - id 'antlr' -} - -dependencies { - antlr "org.antlr:antlr4:${project['antlr.version']}" - api "org.antlr:antlr4-runtime:${project['antlr.version']}" -} - -application { - mainClass = 'org.cqframework.cql.Main' -} - -sourceSets { - main { - antlr { - srcDirs = ["../../grammar"] - } - java { - srcDir 'build/generated/sources/antlr/main/java' - } - } -} - -sourcesJar { - from generateGrammarSource -} - -generateGrammarSource { - outputDirectory = file("${project.buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") - arguments = ['-visitor', '-package', 'org.cqframework.cql.gen'] -} \ No newline at end of file diff --git a/Src/java/cql/build.gradle.kts b/Src/java/cql/build.gradle.kts new file mode 100644 index 000000000..0df27595c --- /dev/null +++ b/Src/java/cql/build.gradle.kts @@ -0,0 +1,36 @@ +plugins { + id("cql.java-conventions") + id("application") + id("antlr") +} + +dependencies { + val version = project.findProperty("antlr.version") + antlr("org.antlr:antlr4:${version}") + api("org.antlr:antlr4-runtime:${version}") +} + +application { + mainClass = "org.cqframework.cql.Main" +} + +sourceSets { + main { + antlr { + setSrcDirs(listOf("../../grammar")) + } + java { + srcDir("build/generated/sources/antlr/main/java") + } + } +} + +tasks.generateGrammarSource { + val buildDir = layout.buildDirectory.get().toString() + outputDirectory = file("${buildDir}/generated/sources/antlr/main/java/org/cqframework/cql/gen") + arguments = listOf("-visitor", "-package", "org.cqframework.cql.gen") +} + +tasks.sourcesJar { + from(tasks.generateGrammarSource) +} \ No newline at end of file diff --git a/Src/java/elm-fhir/build.gradle b/Src/java/elm-fhir/build.gradle deleted file mode 100644 index 3f4b66ba5..000000000 --- a/Src/java/elm-fhir/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id "cql.library-conventions" - id "cql.fhir-conventions" -} - -ext { - mapstructVersion = "1.4.2.Final" -} - -dependencies { - api project(':cql-to-elm') - api project(':engine') - api project(":engine-fhir") - - testImplementation project(':quick') - testImplementation "org.reflections:reflections:0.10.2" - testRuntimeOnly project(':model-jackson') - -} - -tasks.withType(JavaCompile) { - options.compilerArgs = [ - "-Amapstruct.suppressGeneratorTimestamp=true" - ] -} diff --git a/Src/java/elm-fhir/build.gradle.kts b/Src/java/elm-fhir/build.gradle.kts new file mode 100644 index 000000000..4e3eaf320 --- /dev/null +++ b/Src/java/elm-fhir/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + id("cql.library-conventions") + id("cql.fhir-conventions") +} + +dependencies { + api(project(":cql-to-elm")) + api(project(":engine")) + api(project(":engine-fhir")) + + testImplementation(project(":quick")) + testImplementation("org.reflections:reflections:0.10.2") + testRuntimeOnly(project(":model-jackson")) +} \ No newline at end of file diff --git a/Src/java/elm-jackson/build.gradle b/Src/java/elm-jackson/build.gradle deleted file mode 100644 index 73bb1a2d8..000000000 --- a/Src/java/elm-jackson/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -ext { - jacksonVersion = properties['jackson.version'] -} - -dependencies { - api project(':model') - api project(':elm') - api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}" - api "com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}" -} diff --git a/Src/java/elm-jackson/build.gradle.kts b/Src/java/elm-jackson/build.gradle.kts new file mode 100644 index 000000000..e3394c46c --- /dev/null +++ b/Src/java/elm-jackson/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + val jacksonVersion = project.findProperty("jackson.version") + api(project(":model")) + api(project(":elm")) + api("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}") + api("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}") +} diff --git a/Src/java/elm-jaxb/build.gradle b/Src/java/elm-jaxb/build.gradle deleted file mode 100644 index e3f90a2ab..000000000 --- a/Src/java/elm-jaxb/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -dependencies { - api project(':elm') -} diff --git a/Src/java/elm-jaxb/build.gradle.kts b/Src/java/elm-jaxb/build.gradle.kts new file mode 100644 index 000000000..6ad735088 --- /dev/null +++ b/Src/java/elm-jaxb/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + api(project(":elm")) +} diff --git a/Src/java/elm-test/build.gradle b/Src/java/elm-test/build.gradle deleted file mode 100644 index 0e9c83526..000000000 --- a/Src/java/elm-test/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -dependencies { - implementation project(':cql-to-elm') - // implementation project(':model-jaxb') - implementation project(':elm-jaxb') - implementation project(':model-jackson') - implementation project(':elm-jackson') -} diff --git a/Src/java/elm-test/build.gradle.kts b/Src/java/elm-test/build.gradle.kts new file mode 100644 index 000000000..eca6618a4 --- /dev/null +++ b/Src/java/elm-test/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + implementation(project(":cql-to-elm")) + // implementation project(":model-jaxb") + implementation(project(":elm-jaxb")) + implementation(project(":model-jackson")) + implementation(project(":elm-jackson")) +} diff --git a/Src/java/elm/build.gradle b/Src/java/elm/build.gradle deleted file mode 100644 index 9791c0612..000000000 --- a/Src/java/elm/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' -} - -dependencies { - api project(':model') - testImplementation 'org.jeasy:easy-random-core:5.0.0' - testImplementation 'com.tngtech.archunit:archunit:1.2.1' -} - -generateSources { - inputs.dir "${projectDir}/../../cql-lm/schema" - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/elm/library.xsd") { - arg(line: "${xjc.args} -npa -XautoInheritance -XautoInheritance-xmlTypesExtend=org.cqframework.cql.elm.tracking.Trackable") - } - - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/elm/cqlannotations.xsd") { - arg(line: "${xjc.args} -npa") - } - } -} \ No newline at end of file diff --git a/Src/java/elm/build.gradle.kts b/Src/java/elm/build.gradle.kts new file mode 100644 index 000000000..8a7521a74 --- /dev/null +++ b/Src/java/elm/build.gradle.kts @@ -0,0 +1,20 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":model")) + testImplementation("org.jeasy:easy-random-core:5.0.0") + testImplementation("com.tngtech.archunit:archunit:1.2.1") +} + +tasks.register("generateAnnotation") { + schema = "${projectDir}/../../cql-lm/schema/elm/cqlannotations.xsd" + extraArgs = listOf("-npa") +} + +tasks.register("generateElm") { + schema = "${projectDir}/../../cql-lm/schema/elm/library.xsd" + extraArgs = listOf("-npa", "-XautoInheritance", "-XautoInheritance-xmlTypesExtend=org.cqframework.cql.elm.tracking.Trackable") +} \ No newline at end of file diff --git a/Src/java/engine-fhir/build.gradle b/Src/java/engine-fhir/build.gradle deleted file mode 100644 index 3072caf70..000000000 --- a/Src/java/engine-fhir/build.gradle +++ /dev/null @@ -1,42 +0,0 @@ -plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' - id 'cql.fhir-conventions' -} - -dependencies { - api project(':engine') - testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.2' - testImplementation project(':cql-to-elm') - testImplementation project(':model-jackson') - testImplementation project(':elm-jackson') - testImplementation project(':quick') - testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-client' -} - -generateSources { - inputs.dir "${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema" - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema/testSchema.xsd") { - arg(line: "${xjc.args} -npa " + - "-p org.hl7.fhirpath.tests") - } - } -} - -jacocoTestReport { - sourceDirectories.setFrom(files( - "${projectDir}/../elm/src/main/java", - "${projectDir}/../cql-to-elm/src/main/java", - "${projectDir}/../engine/src/main/java", - "${projectDir}/../engine-fhir/src/main/java", - )) - - classDirectories.setFrom(files( - "${projectDir}/../elm/build/classes/java/main", - "${projectDir}/../cql-to-elm/build/classes/java/main", - "${projectDir}/../engine/build/classes/java/main", - "${projectDir}/../engine-fhir/build/classes/java/main", - )) -} \ No newline at end of file diff --git a/Src/java/engine-fhir/build.gradle.kts b/Src/java/engine-fhir/build.gradle.kts new file mode 100644 index 000000000..9139bf9b7 --- /dev/null +++ b/Src/java/engine-fhir/build.gradle.kts @@ -0,0 +1,36 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") + id("cql.fhir-conventions") +} + +dependencies { + api(project(":engine")) + testImplementation("org.wiremock:wiremock:3.9.1") + testImplementation(project(":cql-to-elm")) + testImplementation(project(":model-jackson")) + testImplementation(project(":elm-jackson")) + testImplementation(project(":quick")) + testImplementation("ca.uhn.hapi.fhir:hapi-fhir-client") +} + +tasks.register("generateFhirPathTests") { + schema = "${projectDir}/src/test/resources/org/hl7/fhirpath/testSchema" + extraArgs = listOf("-npa", "-p", "org.hl7.fhirpath.tests") +} + +tasks.jacocoTestReport { + sourceDirectories.setFrom(files( + "${projectDir}/../elm/src/main/java", + "${projectDir}/../cql-to-elm/src/main/java", + "${projectDir}/../engine/src/main/java", + "${projectDir}/../engine-fhir/src/main/java", + )) + + classDirectories.setFrom(files( + "${projectDir}/../elm/build/classes/java/main", + "${projectDir}/../cql-to-elm/build/classes/java/main", + "${projectDir}/../engine/build/classes/java/main", + "${projectDir}/../engine-fhir/build/classes/java/main", + )) +} \ No newline at end of file diff --git a/Src/java/engine/build.gradle b/Src/java/engine/build.gradle.kts similarity index 63% rename from Src/java/engine/build.gradle rename to Src/java/engine/build.gradle.kts index 03212da9a..1e68e05e0 100644 --- a/Src/java/engine/build.gradle +++ b/Src/java/engine/build.gradle.kts @@ -1,17 +1,17 @@ plugins { - id 'cql.library-conventions' + id("cql.library-conventions") } dependencies { - api project(':elm') - api project(':cql-to-elm') + api(project(":elm")) + api(project(":cql-to-elm")) - testImplementation project(':model-jackson') - testImplementation project(':elm-jackson') - testImplementation 'org.mockito:mockito-core:5.4.0' + testImplementation(project(":model-jackson")) + testImplementation(project(":elm-jackson")) + testImplementation("org.mockito:mockito-core:5.4.0") } -jacocoTestReport { +tasks.jacocoTestReport { sourceDirectories.setFrom(files( "${projectDir}/../elm/src/main/java", "${projectDir}/../cql-to-elm/src/main/java", diff --git a/Src/java/gradle.properties b/Src/java/gradle.properties index 91b5a44d8..a25cef364 100644 --- a/Src/java/gradle.properties +++ b/Src/java/gradle.properties @@ -10,4 +10,4 @@ specification.version=1.5.2 hapi.version=7.4.5 jackson.version=2.17.1 antlr.version=4.13.1 -android.api.level=28 +android.api.level=28 \ No newline at end of file diff --git a/Src/java/model-jackson/build.gradle b/Src/java/model-jackson/build.gradle deleted file mode 100644 index 9f0fe1621..000000000 --- a/Src/java/model-jackson/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -ext { - jacksonVersion = project['jackson.version'] -} - -dependencies { - api project(':model') - api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}" - api "com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}" - - testImplementation project(":quick") - testImplementation project(":qdm") -} diff --git a/Src/java/model-jackson/build.gradle.kts b/Src/java/model-jackson/build.gradle.kts new file mode 100644 index 000000000..f004e6b4c --- /dev/null +++ b/Src/java/model-jackson/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + val jacksonVersion = project.findProperty("jackson.version") + api(project(":model")) + api("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}") + api("com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:${jacksonVersion}") + + testImplementation(project(":quick")) + testImplementation(project(":qdm")) +} diff --git a/Src/java/model-jaxb/build.gradle b/Src/java/model-jaxb/build.gradle deleted file mode 100644 index 990a7efaf..000000000 --- a/Src/java/model-jaxb/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - id 'cql.library-conventions' -} - -dependencies { - api project(':model') -} diff --git a/Src/java/model-jaxb/build.gradle.kts b/Src/java/model-jaxb/build.gradle.kts new file mode 100644 index 000000000..bc8870e71 --- /dev/null +++ b/Src/java/model-jaxb/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + id("cql.library-conventions") +} + +dependencies { + api(project(":model")) +} diff --git a/Src/java/model/build.gradle b/Src/java/model/build.gradle deleted file mode 100644 index 1bb18cc98..000000000 --- a/Src/java/model/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' -} - -dependencies { - implementation 'org.apache.commons:commons-text:1.10.0' -} - -generateSources { - inputs.dir "${projectDir}/../../cql-lm/schema" - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/../../cql-lm/schema/model/modelinfo.xsd") { - arg(line: "${xjc.args} -npa") - } - } -} diff --git a/Src/java/model/build.gradle.kts b/Src/java/model/build.gradle.kts new file mode 100644 index 000000000..e0ef4e153 --- /dev/null +++ b/Src/java/model/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + implementation("org.apache.commons:commons-text:1.10.0") +} + +tasks.register("generateModel") { + schema = "${projectDir}/../../cql-lm/schema/model/modelinfo.xsd" + extraArgs = listOf("-npa") +} \ No newline at end of file diff --git a/Src/java/qdm/build.gradle b/Src/java/qdm/build.gradle deleted file mode 100644 index 2047aec7c..000000000 --- a/Src/java/qdm/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' -} - -dependencies { - api project(':elm') - api project(':model') -} - -generateSources{ - inputs.dir "${projectDir}/schema" - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/qdm.xsd") { - arg(line: xjc.args) - } - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/qdm.4.2.xsd") { - arg(line: xjc.args) - } - } -} \ No newline at end of file diff --git a/Src/java/qdm/build.gradle.kts b/Src/java/qdm/build.gradle.kts new file mode 100644 index 000000000..16fa5038d --- /dev/null +++ b/Src/java/qdm/build.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":elm")) + api(project(":model")) +} + +tasks.register("generateQdm") { + schema = "${projectDir}/schema/qdm.xsd" +} + +tasks.register("generateQdm42") { + schema = "${projectDir}/schema/qdm.4.2.xsd" +} diff --git a/Src/java/quick/build.gradle b/Src/java/quick/build.gradle deleted file mode 100644 index 97275a85d..000000000 --- a/Src/java/quick/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'cql.library-conventions' - id 'cql.xjc-conventions' -} - -dependencies { - api project(':elm') - api project(':model') -} - -generateSources{ - inputs.dir "${projectDir}/schema" - - doLast { - ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/schema/v1.4/quick.xsd", binding: "${projectDir}/schema/v1.4/quick-binding.xjb") { - arg(line: xjc.args) - } - } -} diff --git a/Src/java/quick/build.gradle.kts b/Src/java/quick/build.gradle.kts new file mode 100644 index 000000000..32e82ad6a --- /dev/null +++ b/Src/java/quick/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + id("cql.library-conventions") + id("cql.xjc-conventions") +} + +dependencies { + api(project(":elm")) + api(project(":model")) +} + +tasks.register("generateQuick") { + schema = "${projectDir}/schema/v1.4/quick.xsd" + binding = "${projectDir}/schema/v1.4/quick-binding.xjb" +} \ No newline at end of file diff --git a/Src/java/settings.gradle b/Src/java/settings.gradle deleted file mode 100644 index 497fe4274..000000000 --- a/Src/java/settings.gradle +++ /dev/null @@ -1,26 +0,0 @@ -rootProject.name = 'cql-all' - -include ( - 'cqf-fhir', - 'cqf-fhir-npm', - 'cql', - 'model', - 'model-jackson', - 'model-jaxb', - 'elm', - 'elm-jackson', - 'elm-jaxb', - 'elm-test', - 'engine', - 'engine-fhir', - 'qdm', - 'quick', - 'cql-to-elm', - 'cql-to-elm-cli', - 'elm-fhir', - 'tools:cql-formatter', - 'tools:cql-parsetree', - 'tools:xsd-to-modelinfo' -) - - diff --git a/Src/java/settings.gradle.kts b/Src/java/settings.gradle.kts new file mode 100644 index 000000000..4e6f7bdf1 --- /dev/null +++ b/Src/java/settings.gradle.kts @@ -0,0 +1,26 @@ +rootProject.name = "cql-all" + +include( + "cqf-fhir", + "cqf-fhir-npm", + "cql", + "model", + "model-jackson", + "model-jaxb", + "elm", + "elm-jackson", + "elm-jaxb", + "elm-test", + "engine", + "engine-fhir", + "qdm", + "quick", + "cql-to-elm", + "cql-to-elm-cli", + "elm-fhir", + "tools:cql-formatter", + "tools:cql-parsetree", + "tools:xsd-to-modelinfo" +) + + diff --git a/Src/java/tools/cql-formatter/build.gradle b/Src/java/tools/cql-formatter/build.gradle deleted file mode 100644 index 03ade1839..000000000 --- a/Src/java/tools/cql-formatter/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -plugins { - id 'cql.java-conventions' - id 'application' -} - -application { - mainClass = 'org.cqframework.cql.tools.formatter.Main' -} - -dependencies { - testImplementation project(":cql-to-elm") - implementation project(":cql") -} - -sourceSets { - test { - resources { - srcDir "../../cql-to-elm/src/test/resources" - } - } -} \ No newline at end of file diff --git a/Src/java/tools/cql-formatter/build.gradle.kts b/Src/java/tools/cql-formatter/build.gradle.kts new file mode 100644 index 000000000..3531f740c --- /dev/null +++ b/Src/java/tools/cql-formatter/build.gradle.kts @@ -0,0 +1,21 @@ +plugins { + id("cql.java-conventions") + id("application") +} + +application { + mainClass = "org.cqframework.cql.tools.formatter.Main" +} + +dependencies { + testImplementation(project(":cql-to-elm")) + implementation(project(":cql")) +} + +sourceSets { + test { + resources { + srcDir("../../cql-to-elm/src/test/resources") + } + } +} \ No newline at end of file diff --git a/Src/java/tools/cql-parsetree/build.gradle b/Src/java/tools/cql-parsetree/build.gradle deleted file mode 100644 index 476878ea2..000000000 --- a/Src/java/tools/cql-parsetree/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'cql.java-conventions' - id 'application' -} - -application { - mainClass = 'org.cqframework.cql.tools.parsetree.Main' -} - -dependencies { - implementation project(':cql') - implementation (group: "org.antlr", name: "antlr4", version: "4.10.1") { - // antlr 4.5 includes these classes directly - exclude(group: "org.abego.treelayout", module: "org.abego.treelayout.core") - } -} \ No newline at end of file diff --git a/Src/java/tools/cql-parsetree/build.gradle.kts b/Src/java/tools/cql-parsetree/build.gradle.kts new file mode 100644 index 000000000..8475d5f02 --- /dev/null +++ b/Src/java/tools/cql-parsetree/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + id("cql.java-conventions") + id("application") +} + +application { + mainClass = "org.cqframework.cql.tools.parsetree.Main" +} + +dependencies { + implementation(project(":cql")) + implementation("org.antlr:antlr4:4.10.1") { + // antlr 4.5 includes these classes directly + exclude(group= "org.abego.treelayout", module= "org.abego.treelayout.core") + } +} \ No newline at end of file diff --git a/Src/java/tools/xsd-to-modelinfo/build.gradle b/Src/java/tools/xsd-to-modelinfo/build.gradle deleted file mode 100644 index de960982e..000000000 --- a/Src/java/tools/xsd-to-modelinfo/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - id 'cql.java-conventions' - id 'cql.library-conventions' - id 'application' -} - -application { - mainClass = 'org.cqframework.cql.tools.xsd2modelinfo.Main' -} - -dependencies { - api project(':model') - implementation 'net.sf.jopt-simple:jopt-simple:4.7' - implementation 'org.apache.ws.xmlschema:xmlschema-core:2.2.5' - implementation 'org.apache.ws.xmlschema:xmlschema-walker:2.2.5' -} \ No newline at end of file diff --git a/Src/java/tools/xsd-to-modelinfo/build.gradle.kts b/Src/java/tools/xsd-to-modelinfo/build.gradle.kts new file mode 100644 index 000000000..e4613dc38 --- /dev/null +++ b/Src/java/tools/xsd-to-modelinfo/build.gradle.kts @@ -0,0 +1,16 @@ +plugins { + id("cql.java-conventions") + id("cql.library-conventions") + id("application") +} + +application { + mainClass = "org.cqframework.cql.tools.xsd2modelinfo.Main" +} + +dependencies { + api(project(":model")) + implementation("net.sf.jopt-simple:jopt-simple:4.7") + implementation("org.apache.ws.xmlschema:xmlschema-core:2.2.5") + implementation("org.apache.ws.xmlschema:xmlschema-walker:2.2.5") +} \ No newline at end of file From fc0b9ec65cd1ab88471f1ab4e26a93f0046de650 Mon Sep 17 00:00:00 2001 From: JP Date: Wed, 6 Nov 2024 09:11:46 -0700 Subject: [PATCH 27/77] Origin/feature kotlin conventions patch (#1437) * small cleanup * fix the jvm toolchain version --------- Co-authored-by: Anton Vasetenkov --- Src/java/buildSrc/build.gradle.kts | 4 ++++ .../src/main/kotlin/cql.kotlin-conventions.gradle.kts | 3 --- .../src/main/kotlin/cql.library-conventions.gradle.kts | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Src/java/buildSrc/build.gradle.kts b/Src/java/buildSrc/build.gradle.kts index 2970b3396..3e6782756 100644 --- a/Src/java/buildSrc/build.gradle.kts +++ b/Src/java/buildSrc/build.gradle.kts @@ -14,4 +14,8 @@ dependencies { implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.0") implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14") implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0") +} + +kotlin { + jvmToolchain(11) } \ No newline at end of file diff --git a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts index b26e0bb74..9a82bf5b8 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-conventions.gradle.kts @@ -1,6 +1,3 @@ -import gradle.kotlin.dsl.accessors._2d946b1c62c86c83708f6e287986eee0.implementation -import gradle.kotlin.dsl.accessors._2d946b1c62c86c83708f6e287986eee0.spotless - plugins { kotlin("jvm") id("com.diffplug.spotless") diff --git a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts index d40d4cb18..d9f3f3e7a 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.library-conventions.gradle.kts @@ -1,5 +1,3 @@ -import ru.vyarus.gradle.plugin.animalsniffer.AnimalSniffer - plugins { id("java-library") id("ru.vyarus.animalsniffer") From 170c33c9c8f186c4c08cdda57b5f544dd5551aae Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Thu, 7 Nov 2024 09:23:29 -0700 Subject: [PATCH 28/77] Fix static app entry point, fix build dependencies --- Src/java/cql/src/main/java/org/cqframework/cql/Application.kt | 1 + Src/java/elm/build.gradle.kts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt index cdf094a6b..946041a34 100644 --- a/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt +++ b/Src/java/cql/src/main/java/org/cqframework/cql/Application.kt @@ -7,6 +7,7 @@ import org.cqframework.cql.gen.cqlLexer import org.cqframework.cql.gen.cqlParser object Application { + @JvmStatic fun main(args: Array) { val inputFile = args.getOrNull(0) val stream = inputFile?.let { FileInputStream(it) } ?: System.`in` diff --git a/Src/java/elm/build.gradle.kts b/Src/java/elm/build.gradle.kts index b1ee2dafd..60c7599dd 100644 --- a/Src/java/elm/build.gradle.kts +++ b/Src/java/elm/build.gradle.kts @@ -21,4 +21,8 @@ tasks.register("generateElm") { tasks.compileKotlin { dependsOn("generateAnnotation", "generateElm") +} + +tasks.kotlinSourcesJar { + dependsOn("generateAnnotation", "generateElm") } \ No newline at end of file From 8dd237d4f6e40d3f137e4d52b609b6fd8f299d0d Mon Sep 17 00:00:00 2001 From: Jonathan Percival Date: Thu, 7 Nov 2024 12:05:55 -0700 Subject: [PATCH 29/77] Play within memory options --- Src/java/gradle.properties | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/java/gradle.properties b/Src/java/gradle.properties index 91b5a44d8..eb7fa98f9 100644 --- a/Src/java/gradle.properties +++ b/Src/java/gradle.properties @@ -1,6 +1,9 @@ org.gradle.caching=true org.gradle.parallel=true -org.gradle.jvmargs=-Xmx4096m +org.gradle.jvmargs=-Xmx4g -XX:+UseG1GC +org.gradle.workers.max=4 + +kotlin.daemon.jvm.options=-Xmx4g -XX:+UseG1GC systemProp.sonar.gradle.skipCompile=true From 78580bd83e21760980c32fcbdd348464cee2f2e7 Mon Sep 17 00:00:00 2001 From: Anton Vasetenkov Date: Sat, 16 Nov 2024 09:59:59 +1300 Subject: [PATCH 30/77] Add demo UI for CQL parser (#1439) * Add demo for the UI that uses Kotlin/JS- and Kotlin/WASM-based CQL parser * Tweak config * Update README.md * Update docs * Update docs --- ...otlin-multiplatform-conventions.gradle.kts | 12 +- Src/java/cql/src/commonMain/kotlin/main.kt | 16 + Src/java/cql/src/jsMain/kotlin/Main.kt | 42 - Src/js/cql-ui/.eslintrc.json | 3 + Src/js/cql-ui/.gitignore | 40 + Src/js/cql-ui/README.md | 14 + Src/js/cql-ui/app/cql-playground.tsx | 95 + Src/js/cql-ui/app/globals.css | 9 + Src/js/cql-ui/app/layout.tsx | 19 + Src/js/cql-ui/app/page.tsx | 5 + Src/js/cql-ui/next.config.ts | 37 + Src/js/cql-ui/package-lock.json | 5186 +++++++++++++++++ Src/js/cql-ui/package.json | 29 + Src/js/cql-ui/public/cql-all-cql-wasm-js.wasm | 1 + Src/js/cql-ui/tsconfig.json | 27 + 15 files changed, 5491 insertions(+), 44 deletions(-) create mode 100644 Src/java/cql/src/commonMain/kotlin/main.kt delete mode 100644 Src/java/cql/src/jsMain/kotlin/Main.kt create mode 100644 Src/js/cql-ui/.eslintrc.json create mode 100644 Src/js/cql-ui/.gitignore create mode 100644 Src/js/cql-ui/README.md create mode 100644 Src/js/cql-ui/app/cql-playground.tsx create mode 100644 Src/js/cql-ui/app/globals.css create mode 100644 Src/js/cql-ui/app/layout.tsx create mode 100644 Src/js/cql-ui/app/page.tsx create mode 100644 Src/js/cql-ui/next.config.ts create mode 100644 Src/js/cql-ui/package-lock.json create mode 100644 Src/js/cql-ui/package.json create mode 120000 Src/js/cql-ui/public/cql-all-cql-wasm-js.wasm create mode 100644 Src/js/cql-ui/tsconfig.json diff --git a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts index 2e95e2d39..2e18ba59a 100644 --- a/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts +++ b/Src/java/buildSrc/src/main/kotlin/cql.kotlin-multiplatform-conventions.gradle.kts @@ -24,7 +24,7 @@ kotlin { // Running the build outputs packages in the build/js/packages directory. // These packages can e.g. be required or imported in JS or TS projects. // If you get `Task :kotlinStoreYarnLock FAILED` during the build, - // run the `kotlinUpgradeYarnLock` task and build again. + // run the `:kotlinUpgradeYarnLock` task and build again. // Run `jsRun --continuous` to start a local development server with // live reloading (automatic re-build on file changes). The local server serves // /src/jsMain/resources/index.html from the root. @@ -62,8 +62,16 @@ kotlin { generateTypeScriptDefinitions() } + // Add Kotlin/WASM compilation target. + // The output is in the JS packages directory. + wasmJs { + browser { } + binaries.executable() + generateTypeScriptDefinitions() + } + sourceSets { - commonMain{ + commonMain { dependencies { implementation(kotlin("stdlib-common")) } diff --git a/Src/java/cql/src/commonMain/kotlin/main.kt b/Src/java/cql/src/commonMain/kotlin/main.kt new file mode 100644 index 000000000..08844f98c --- /dev/null +++ b/Src/java/cql/src/commonMain/kotlin/main.kt @@ -0,0 +1,16 @@ +import org.antlr.v4.kotlinruntime.CharStream +import org.antlr.v4.kotlinruntime.CharStreams +import org.antlr.v4.kotlinruntime.CommonTokenStream +import org.cqframework.cql.gen.cqlLexer +import org.cqframework.cql.gen.cqlParser +import kotlin.js.JsExport + +@JsExport +fun parseToTree(logic: String): String { + val input: CharStream = CharStreams.fromString(logic) + val tokens = CommonTokenStream(cqlLexer(input)) + val parser = cqlParser(tokens) + parser.buildParseTree = true + val library = parser.library() + return library.toStringTree(parser) +} diff --git a/Src/java/cql/src/jsMain/kotlin/Main.kt b/Src/java/cql/src/jsMain/kotlin/Main.kt deleted file mode 100644 index 51a0df59d..000000000 --- a/Src/java/cql/src/jsMain/kotlin/Main.kt +++ /dev/null @@ -1,42 +0,0 @@ -import org.antlr.v4.kotlinruntime.CharStream -import org.antlr.v4.kotlinruntime.CharStreams -import org.antlr.v4.kotlinruntime.CommonTokenStream -import org.cqframework.cql.gen.cqlLexer -import org.cqframework.cql.gen.cqlParser - -@ExperimentalJsExport -@JsExport -fun parseToTree(logic: String): String { - val input: CharStream = CharStreams.fromString(logic) - val tokens = CommonTokenStream(cqlLexer(input)) - val parser = cqlParser(tokens) - parser.buildParseTree = true - val library = parser.library() - - // Inspect the library object in the console. - // Methods like toStringTree are mangled because they have multiple overloads. - // TODO: Remove in the future. - console.log("Library:", library) - - return library.toStringTree(parser) -} - -// This method is not exported so it won't be available in the JS library. -// TODO: Remove in the future. -fun someMethod() { - console.log("I am not exported") -} - -// This `main` method always just runs. -// TODO: Remove in the future. -fun main() { - val logic = "define inIPP : AgeAt(start of MeasurementPeriod) < 18" - val input: CharStream = CharStreams.fromString(logic) - val tokens = CommonTokenStream(cqlLexer(input)) - val parser = cqlParser(tokens) - parser.buildParseTree = true - val library = parser.library() - - val def = library.statement(0)?.expressionDefinition() - console.log(def?.identifier()?.IDENTIFIER().toString()) -} \ No newline at end of file diff --git a/Src/js/cql-ui/.eslintrc.json b/Src/js/cql-ui/.eslintrc.json new file mode 100644 index 000000000..372241854 --- /dev/null +++ b/Src/js/cql-ui/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["next/core-web-vitals", "next/typescript"] +} diff --git a/Src/js/cql-ui/.gitignore b/Src/js/cql-ui/.gitignore new file mode 100644 index 000000000..26b002aac --- /dev/null +++ b/Src/js/cql-ui/.gitignore @@ -0,0 +1,40 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# env files (can opt-in for commiting if needed) +.env* + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/Src/js/cql-ui/README.md b/Src/js/cql-ui/README.md new file mode 100644 index 000000000..1766d9e65 --- /dev/null +++ b/Src/js/cql-ui/README.md @@ -0,0 +1,14 @@ +# CQL Kotlin UI + +A front end for the Kotlin/JS- and Kotlin/WASM-based CQL parser. + +## Local development + +The Kotlin version of CQL tooling is in development, so you'll need to build it locally by running the `:cql:build` task in +the `../../java` project. This will output the cql-all-cql and cql-all-cql-wasm-js packages to the +`../../java/build/js/packages` directory. + +To then run this project locally: + + npm install + npm run dev diff --git a/Src/js/cql-ui/app/cql-playground.tsx b/Src/js/cql-ui/app/cql-playground.tsx new file mode 100644 index 000000000..bead792d5 --- /dev/null +++ b/Src/js/cql-ui/app/cql-playground.tsx @@ -0,0 +1,95 @@ +"use client"; + +import { useState } from "react"; +import * as cqlJs from "cql-all-cql"; +import * as cqlWasm from "cql-all-cql-wasm-js"; + +export function CqlPlayground() { + const [state, setState] = useState({ + cql: `library Test + define x: 5`, + useWasm: false, + }); + + const cqlLib = state.useWasm ? cqlWasm : cqlJs; + + const parseResult = (() => { + try { + const tree = cqlLib.parseToTree(state.cql); + return { + ok: true, + tree, + } as const; + } catch (e) { + return { + ok: false, + error: String(e), + } as const; + } + })(); + + return ( +
+

CQL Kotlin Playground

+