From a92f9673acc074b1fce83a065c2141bdc02b54f9 Mon Sep 17 00:00:00 2001 From: Kirill Grachev Date: Sat, 22 Apr 2023 17:10:23 +0300 Subject: [PATCH 01/34] SNRK-58: Add gradle files to new subproject --- settings.gradle.kts | 1 + snark-document-builder/build.gradle.kts | 15 +++++++++++++++ snark-document-builder/src/main/kotlin/Hello.kt | 12 ++++++++++++ snark-document-builder/src/test/kotlin/Hello.kt | 11 +++++++++++ 4 files changed, 39 insertions(+) create mode 100644 snark-document-builder/build.gradle.kts create mode 100644 snark-document-builder/src/main/kotlin/Hello.kt create mode 100644 snark-document-builder/src/test/kotlin/Hello.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index 7e9af2c..e502783 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -43,4 +43,5 @@ include( ":snark-html", ":snark-ktor", ":snark-storage-driver", + ":snark-document-builder", ) \ No newline at end of file diff --git a/snark-document-builder/build.gradle.kts b/snark-document-builder/build.gradle.kts new file mode 100644 index 0000000..4895628 --- /dev/null +++ b/snark-document-builder/build.gradle.kts @@ -0,0 +1,15 @@ +plugins { + id("space.kscience.gradle.jvm") + `maven-publish` +} + +val coroutinesVersion = space.kscience.gradle.KScienceVersions.coroutinesVersion +val jacksonVersion = "2.14.2" + + +dependencies { + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion") + + implementation(project(":snark-storage-driver")) + implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") +} diff --git a/snark-document-builder/src/main/kotlin/Hello.kt b/snark-document-builder/src/main/kotlin/Hello.kt new file mode 100644 index 0000000..027138f --- /dev/null +++ b/snark-document-builder/src/main/kotlin/Hello.kt @@ -0,0 +1,12 @@ +package hello + +import com.fasterxml.jackson.core.io.BigDecimalParser +import space.kscience.snark.storage.* +import space.kscience.snark.storage.local.LocalDirectory +import java.nio.file.Path + + +public suspend fun doSomethingEssential() { + val dir: Directory = LocalDirectory(".") + dir.get("notexists") +} \ No newline at end of file diff --git a/snark-document-builder/src/test/kotlin/Hello.kt b/snark-document-builder/src/test/kotlin/Hello.kt new file mode 100644 index 0000000..4ba4d64 --- /dev/null +++ b/snark-document-builder/src/test/kotlin/Hello.kt @@ -0,0 +1,11 @@ +package hello + +import org.junit.jupiter.api.Test +import kotlinx.coroutines.runBlocking + +class SomeTest { + @Test + fun testEssential() = runBlocking { + doSomethingEssential() + } +} From 4465e68408d5d6fd405fe746046d863cce56d55b Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Mon, 24 Apr 2023 07:01:31 +0300 Subject: [PATCH 02/34] SNRK-66:buildDocument function scratch is added, AstNodes are copied from prototype --- snark-document-builder/build.gradle.kts | 2 + .../src/main/kotlin/DocumentBuilder.kt | 16 +++ .../src/main/kotlin/Hello.kt | 12 -- .../src/main/kotlin/MdParser.kt | 112 ++++++++++++++++++ .../kotlin/{Hello.kt => DocumentBuilder.kt} | 4 +- 5 files changed, 132 insertions(+), 14 deletions(-) create mode 100644 snark-document-builder/src/main/kotlin/DocumentBuilder.kt delete mode 100644 snark-document-builder/src/main/kotlin/Hello.kt create mode 100644 snark-document-builder/src/main/kotlin/MdParser.kt rename snark-document-builder/src/test/kotlin/{Hello.kt => DocumentBuilder.kt} (71%) diff --git a/snark-document-builder/build.gradle.kts b/snark-document-builder/build.gradle.kts index 4895628..d7d9d05 100644 --- a/snark-document-builder/build.gradle.kts +++ b/snark-document-builder/build.gradle.kts @@ -1,6 +1,7 @@ plugins { id("space.kscience.gradle.jvm") `maven-publish` + id("kotlinx-serialization") } val coroutinesVersion = space.kscience.gradle.KScienceVersions.coroutinesVersion @@ -12,4 +13,5 @@ dependencies { implementation(project(":snark-storage-driver")) implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3") } diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt new file mode 100644 index 0000000..891848c --- /dev/null +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -0,0 +1,16 @@ +package documentBuilder + +import com.fasterxml.jackson.core.io.BigDecimalParser +import space.kscience.snark.storage.* +import space.kscience.snark.storage.local.LocalDirectory +import java.nio.file.Path + +val DEFAULT_DOCUMENT_ROOT = "main.md" + +public suspend fun buildDocument(documentPath: String) { + val documentDirectory: Directory = LocalDirectory(documentPath) + val documentRoot = documentDirectory.get(DEFAULT_DOCUMENT_ROOT) + + // val (dependencies, vertex) = parseMd(documentRoot.readAll()) + +} \ No newline at end of file diff --git a/snark-document-builder/src/main/kotlin/Hello.kt b/snark-document-builder/src/main/kotlin/Hello.kt deleted file mode 100644 index 027138f..0000000 --- a/snark-document-builder/src/main/kotlin/Hello.kt +++ /dev/null @@ -1,12 +0,0 @@ -package hello - -import com.fasterxml.jackson.core.io.BigDecimalParser -import space.kscience.snark.storage.* -import space.kscience.snark.storage.local.LocalDirectory -import java.nio.file.Path - - -public suspend fun doSomethingEssential() { - val dir: Directory = LocalDirectory(".") - dir.get("notexists") -} \ No newline at end of file diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt new file mode 100644 index 0000000..0d40c67 --- /dev/null +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -0,0 +1,112 @@ +package documentBuilder + +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerialName +import com.fasterxml.jackson.annotation.JsonSubTypes +import com.fasterxml.jackson.annotation.JsonTypeInfo + +sealed interface DependencyGraphEdge { +} + +data class IncludeDependency( + val parentNode: MdAstParent, + val dependentNode: Iterator, + val includeList: List +) : DependencyGraphEdge + +data class DependencyGraphVertex( + val mdAst: MdAstRoot, + val dependencies: MutableList +) + +// data class DependencyGraph( +// val root: DependencyGraphVertex +// ) + +enum class DependenceType { + INCLUDE +} + +data class ParseResult(val dependencies: Dependencies, val vertex: DependencyGraphVertex) + +typealias Dependencies = HashMap> + +// public suspend fun parseMd(mdFile: ByteArray): ParseResult { +// } + +@Serializable +data class Point(val line: Int, val column: Int, val offset: Int) + +@Serializable +data class Position(val start: Point, val end: Point) + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type" +) +@JsonSubTypes( + JsonSubTypes.Type(value = MdAstRoot::class, name = "root"), + JsonSubTypes.Type(value = MdAstParagraph::class, name = "paragraph"), + JsonSubTypes.Type(value = MdAstText::class, name = "text"), + JsonSubTypes.Type(value = MdAstHeading::class, name = "heading"), + JsonSubTypes.Type(value = MdAstCode::class, name = "code"), + JsonSubTypes.Type(value = MdAstBlockquote::class, name = "blockquote") +) +@Serializable +sealed interface MdAstElement{ + abstract var position: Position +} + +@Serializable +sealed interface MdAstParent: MdAstElement{ + var children: List +} + +@Serializable +@SerialName("root") +data class MdAstRoot( + override var children: List, + override var position: Position +): MdAstParent + + +@Serializable +@SerialName("paragraph") +data class MdAstParagraph( + override var children: List, + override var position: Position +): MdAstParent + + +@Serializable +@SerialName("text") +data class MdAstText( + val value: String, + override var position: Position +): MdAstElement + + +@Serializable +@SerialName("heading") +data class MdAstHeading( + val depth: Int, + override var children: List, + override var position: Position +): MdAstParent + +@Serializable +@SerialName("code") +data class MdAstCode( + var lang: String? = null, + var meta: String? = null, + var value: String, + override var position: Position, +) : MdAstElement + +@Serializable +@SerialName("blockquote") +data class MdAstBlockquote( + override var children: List, + override var position: Position +): MdAstParent \ No newline at end of file diff --git a/snark-document-builder/src/test/kotlin/Hello.kt b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt similarity index 71% rename from snark-document-builder/src/test/kotlin/Hello.kt rename to snark-document-builder/src/test/kotlin/DocumentBuilder.kt index 4ba4d64..1c4436f 100644 --- a/snark-document-builder/src/test/kotlin/Hello.kt +++ b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt @@ -1,4 +1,4 @@ -package hello +package documentBuilder import org.junit.jupiter.api.Test import kotlinx.coroutines.runBlocking @@ -6,6 +6,6 @@ import kotlinx.coroutines.runBlocking class SomeTest { @Test fun testEssential() = runBlocking { - doSomethingEssential() + buildDocument("./example") } } From 0ef269ec5cef79ef212605e03834e384377502e2 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Mon, 24 Apr 2023 07:24:18 +0300 Subject: [PATCH 03/34] SNRK-66: documentDependencies and dependencyGraph are added --- snark-document-builder/src/main/kotlin/DocumentBuilder.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 891848c..cd4ddfd 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -11,6 +11,12 @@ public suspend fun buildDocument(documentPath: String) { val documentDirectory: Directory = LocalDirectory(documentPath) val documentRoot = documentDirectory.get(DEFAULT_DOCUMENT_ROOT) - // val (dependencies, vertex) = parseMd(documentRoot.readAll()) + val (dependencies, vertex) = parseMd(documentRoot.readAll()) + val documentDependencies: HashMap = HashMap() + val dependencyGraph: HashMap = + HashMap() + + documentDependencies.put(documentPath, dependencies) + dependencyGraph.put(documentPath, vertex) } \ No newline at end of file From 49c350abad8a06414f6a24bfe494765883f535e1 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Mon, 24 Apr 2023 07:27:07 +0300 Subject: [PATCH 04/34] SNRK-66: parseMd is added --- snark-document-builder/src/main/kotlin/MdParser.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 0d40c67..5b6b5c2 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -19,10 +19,6 @@ data class DependencyGraphVertex( val dependencies: MutableList ) -// data class DependencyGraph( -// val root: DependencyGraphVertex -// ) - enum class DependenceType { INCLUDE } @@ -31,8 +27,9 @@ data class ParseResult(val dependencies: Dependencies, val vertex: DependencyGra typealias Dependencies = HashMap> -// public suspend fun parseMd(mdFile: ByteArray): ParseResult { -// } +public suspend fun parseMd(mdFile: ByteArray): ParseResult { + TODO() +} @Serializable data class Point(val line: Int, val column: Int, val offset: Int) From 0ab26812f84cda66e22ef5c58aae531494c2577c Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Mon, 24 Apr 2023 07:27:32 +0300 Subject: [PATCH 05/34] SNRK-66: example is added --- snark-document-builder/src/test/example/main.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 snark-document-builder/src/test/example/main.md diff --git a/snark-document-builder/src/test/example/main.md b/snark-document-builder/src/test/example/main.md new file mode 100644 index 0000000..e69de29 From 57df19f1bf07e9c619ee45de6b8647b325079bc1 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Mon, 24 Apr 2023 07:27:44 +0300 Subject: [PATCH 06/34] SNRK-66: better test --- snark-document-builder/src/test/kotlin/DocumentBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snark-document-builder/src/test/kotlin/DocumentBuilder.kt b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt index 1c4436f..bc019e3 100644 --- a/snark-document-builder/src/test/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt @@ -6,6 +6,6 @@ import kotlinx.coroutines.runBlocking class SomeTest { @Test fun testEssential() = runBlocking { - buildDocument("./example") + buildDocument("../example") } } From ea4fef95b897e9379b5322fa99b234376b7c78d4 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sun, 30 Apr 2023 22:33:40 +0300 Subject: [PATCH 07/34] SNRK-70: MdAstElements and DependencyGraph moved to seperate files, return type of parseMd is changed to DepencyGraphVertex --- .../src/main/kotlin/DependencyGraph.kt | 19 +++ .../src/main/kotlin/MdAstElements.kt | 84 ++++++++++++++ .../src/main/kotlin/MdParser.kt | 108 +----------------- 3 files changed, 105 insertions(+), 106 deletions(-) create mode 100644 snark-document-builder/src/main/kotlin/DependencyGraph.kt create mode 100644 snark-document-builder/src/main/kotlin/MdAstElements.kt diff --git a/snark-document-builder/src/main/kotlin/DependencyGraph.kt b/snark-document-builder/src/main/kotlin/DependencyGraph.kt new file mode 100644 index 0000000..c10e666 --- /dev/null +++ b/snark-document-builder/src/main/kotlin/DependencyGraph.kt @@ -0,0 +1,19 @@ +package documentBuilder + +sealed interface DependencyGraphEdge { +} + +data class IncludeDependency( + val parentNode: MdAstParent, + val dependentNode: Iterator, + val includeList: List +) : DependencyGraphEdge + +data class DependencyGraphNode( + val mdAst: MdAstRoot, + val dependencies: List +) + +data class DependencyGraph( + val nodes: Map +) \ No newline at end of file diff --git a/snark-document-builder/src/main/kotlin/MdAstElements.kt b/snark-document-builder/src/main/kotlin/MdAstElements.kt new file mode 100644 index 0000000..313ca2b --- /dev/null +++ b/snark-document-builder/src/main/kotlin/MdAstElements.kt @@ -0,0 +1,84 @@ +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerialName +import com.fasterxml.jackson.annotation.JsonSubTypes +import com.fasterxml.jackson.annotation.JsonTypeInfo + +package documentBuilder + +@Serializable +data class Point(val line: Int, val column: Int, val offset: Int) + +@Serializable +data class Position(val start: Point, val end: Point) + +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type" +) + +@JsonSubTypes( + JsonSubTypes.Type(value = MdAstRoot::class, name = "root"), + JsonSubTypes.Type(value = MdAstParagraph::class, name = "paragraph"), + JsonSubTypes.Type(value = MdAstText::class, name = "text"), + JsonSubTypes.Type(value = MdAstHeading::class, name = "heading"), + JsonSubTypes.Type(value = MdAstCode::class, name = "code"), + JsonSubTypes.Type(value = MdAstBlockquote::class, name = "blockquote") +) + +@Serializable +sealed interface MdAstElement{ + abstract var position: Position +} + +@Serializable +sealed interface MdAstParent: MdAstElement{ + var children: List +} + +@Serializable +@SerialName("root") +data class MdAstRoot( + override var children: List, + override var position: Position +): MdAstParent + + +@Serializable +@SerialName("paragraph") +data class MdAstParagraph( + override var children: List, + override var position: Position +): MdAstParent + + +@Serializable +@SerialName("text") +data class MdAstText( + val value: String, + override var position: Position +): MdAstElement + +@Serializable +@SerialName("heading") +data class MdAstHeading( + val depth: Int, + override var children: List, + override var position: Position +): MdAstParent + +@Serializable +@SerialName("code") +data class MdAstCode( + var lang: String? = null, + var meta: String? = null, + var value: String, + override var position: Position, +) : MdAstElement + +@Serializable +@SerialName("blockquote") +data class MdAstBlockquote( + override var children: List, + override var position: Position +): MdAstParent \ No newline at end of file diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 5b6b5c2..69c97d0 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -1,109 +1,5 @@ package documentBuilder -import kotlinx.serialization.Serializable -import kotlinx.serialization.SerialName -import com.fasterxml.jackson.annotation.JsonSubTypes -import com.fasterxml.jackson.annotation.JsonTypeInfo - -sealed interface DependencyGraphEdge { -} - -data class IncludeDependency( - val parentNode: MdAstParent, - val dependentNode: Iterator, - val includeList: List -) : DependencyGraphEdge - -data class DependencyGraphVertex( - val mdAst: MdAstRoot, - val dependencies: MutableList -) - -enum class DependenceType { - INCLUDE -} - -data class ParseResult(val dependencies: Dependencies, val vertex: DependencyGraphVertex) - -typealias Dependencies = HashMap> - -public suspend fun parseMd(mdFile: ByteArray): ParseResult { +public suspend fun parseMd(mdFile: ByteArray): DependencyGraphVertex { TODO() -} - -@Serializable -data class Point(val line: Int, val column: Int, val offset: Int) - -@Serializable -data class Position(val start: Point, val end: Point) - -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "type" -) -@JsonSubTypes( - JsonSubTypes.Type(value = MdAstRoot::class, name = "root"), - JsonSubTypes.Type(value = MdAstParagraph::class, name = "paragraph"), - JsonSubTypes.Type(value = MdAstText::class, name = "text"), - JsonSubTypes.Type(value = MdAstHeading::class, name = "heading"), - JsonSubTypes.Type(value = MdAstCode::class, name = "code"), - JsonSubTypes.Type(value = MdAstBlockquote::class, name = "blockquote") -) -@Serializable -sealed interface MdAstElement{ - abstract var position: Position -} - -@Serializable -sealed interface MdAstParent: MdAstElement{ - var children: List -} - -@Serializable -@SerialName("root") -data class MdAstRoot( - override var children: List, - override var position: Position -): MdAstParent - - -@Serializable -@SerialName("paragraph") -data class MdAstParagraph( - override var children: List, - override var position: Position -): MdAstParent - - -@Serializable -@SerialName("text") -data class MdAstText( - val value: String, - override var position: Position -): MdAstElement - - -@Serializable -@SerialName("heading") -data class MdAstHeading( - val depth: Int, - override var children: List, - override var position: Position -): MdAstParent - -@Serializable -@SerialName("code") -data class MdAstCode( - var lang: String? = null, - var meta: String? = null, - var value: String, - override var position: Position, -) : MdAstElement - -@Serializable -@SerialName("blockquote") -data class MdAstBlockquote( - override var children: List, - override var position: Position -): MdAstParent \ No newline at end of file +} \ No newline at end of file From efc3bc25372bb71a3efa30624a8b1de8493e7493 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sun, 30 Apr 2023 22:34:17 +0300 Subject: [PATCH 08/34] SNRK-70: typo is removed --- snark-document-builder/src/main/kotlin/MdParser.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 69c97d0..0fd107a 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -1,5 +1,5 @@ package documentBuilder -public suspend fun parseMd(mdFile: ByteArray): DependencyGraphVertex { +public suspend fun parseMd(mdFile: ByteArray): DependencyGraphNode { TODO() } \ No newline at end of file From 7a57de989b5da4a2e441c3b0b554f52dccf83cd6 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sun, 30 Apr 2023 22:40:53 +0300 Subject: [PATCH 09/34] SNRK-70: better package placement --- snark-document-builder/src/main/kotlin/MdAstElements.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/MdAstElements.kt b/snark-document-builder/src/main/kotlin/MdAstElements.kt index 313ca2b..605e2e7 100644 --- a/snark-document-builder/src/main/kotlin/MdAstElements.kt +++ b/snark-document-builder/src/main/kotlin/MdAstElements.kt @@ -1,10 +1,10 @@ +package documentBuilder + import kotlinx.serialization.Serializable import kotlinx.serialization.SerialName import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonTypeInfo -package documentBuilder - @Serializable data class Point(val line: Int, val column: Int, val offset: Int) From b7a439f711f6411e6eadcf1d80254dd9b572d9fc Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sun, 30 Apr 2023 22:43:21 +0300 Subject: [PATCH 10/34] SNRK-70: obsollete code is removed --- .../src/main/kotlin/DocumentBuilder.kt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index cd4ddfd..551ba70 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -11,12 +11,5 @@ public suspend fun buildDocument(documentPath: String) { val documentDirectory: Directory = LocalDirectory(documentPath) val documentRoot = documentDirectory.get(DEFAULT_DOCUMENT_ROOT) - val (dependencies, vertex) = parseMd(documentRoot.readAll()) - - val documentDependencies: HashMap = HashMap() - val dependencyGraph: HashMap = - HashMap() - - documentDependencies.put(documentPath, dependencies) - dependencyGraph.put(documentPath, vertex) + TODO() } \ No newline at end of file From 3c2ffb572bdea64225d82cc42939882763c617b5 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sun, 30 Apr 2023 22:46:31 +0300 Subject: [PATCH 11/34] SNRK-70: alias is added for names of files --- snark-document-builder/src/main/kotlin/DependencyGraph.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DependencyGraph.kt b/snark-document-builder/src/main/kotlin/DependencyGraph.kt index c10e666..bb1e311 100644 --- a/snark-document-builder/src/main/kotlin/DependencyGraph.kt +++ b/snark-document-builder/src/main/kotlin/DependencyGraph.kt @@ -1,12 +1,14 @@ package documentBuilder +typealias FileName = String + sealed interface DependencyGraphEdge { } data class IncludeDependency( val parentNode: MdAstParent, val dependentNode: Iterator, - val includeList: List + val includeList: List ) : DependencyGraphEdge data class DependencyGraphNode( @@ -15,5 +17,5 @@ data class DependencyGraphNode( ) data class DependencyGraph( - val nodes: Map + val nodes: Map ) \ No newline at end of file From 417d90b842676f0e8968d8454304e42fd7184d0c Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sun, 30 Apr 2023 23:16:56 +0300 Subject: [PATCH 12/34] SNRK-70: documentation is added --- .../src/main/kotlin/DependencyGraph.kt | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DependencyGraph.kt b/snark-document-builder/src/main/kotlin/DependencyGraph.kt index bb1e311..7058a2c 100644 --- a/snark-document-builder/src/main/kotlin/DependencyGraph.kt +++ b/snark-document-builder/src/main/kotlin/DependencyGraph.kt @@ -2,20 +2,43 @@ package documentBuilder typealias FileName = String +/** + * Node of dependency graph. + * + * One node represents one file and its dependencies + * + * @property mdAst - AST tree of current file. + * @property dependencies - list of tail end adjacent to this node (dependencies of current file to be resolved). + */ +data class DependencyGraphNode( + val mdAst: MdAstRoot, + val dependencies: List +) + +/** + * Interface of all dependency edges. + */ sealed interface DependencyGraphEdge { } - + +/** + * Include dependency edge. + * + * @property parentNode - node inside AST tree, that is parent for dependent node. + * @property dependentNode - iterator to a dependent node, i.e. node of part of document with include commands + * @property includeList - list of files to be included. + */ data class IncludeDependency( val parentNode: MdAstParent, val dependentNode: Iterator, val includeList: List ) : DependencyGraphEdge - -data class DependencyGraphNode( - val mdAst: MdAstRoot, - val dependencies: List -) - + +/** + * Whole dependency graph. + * + * @property nodes - map of nodes, where you can find DependencyGraphNode of file by its name. + */ data class DependencyGraph( val nodes: Map ) \ No newline at end of file From fd45104a7e9aa87feb1bbe3fe1b7fb321332aab9 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Mon, 1 May 2023 14:48:34 +0300 Subject: [PATCH 13/34] SNRK-70: visibility specificators are added --- .../src/main/kotlin/DependencyGraph.kt | 10 ++++---- .../src/main/kotlin/MdAstElements.kt | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DependencyGraph.kt b/snark-document-builder/src/main/kotlin/DependencyGraph.kt index 7058a2c..bb00d47 100644 --- a/snark-document-builder/src/main/kotlin/DependencyGraph.kt +++ b/snark-document-builder/src/main/kotlin/DependencyGraph.kt @@ -1,6 +1,6 @@ package documentBuilder -typealias FileName = String +public typealias FileName = String /** * Node of dependency graph. @@ -10,7 +10,7 @@ typealias FileName = String * @property mdAst - AST tree of current file. * @property dependencies - list of tail end adjacent to this node (dependencies of current file to be resolved). */ -data class DependencyGraphNode( +public data class DependencyGraphNode( val mdAst: MdAstRoot, val dependencies: List ) @@ -18,7 +18,7 @@ data class DependencyGraphNode( /** * Interface of all dependency edges. */ -sealed interface DependencyGraphEdge { +public sealed interface DependencyGraphEdge { } /** @@ -28,7 +28,7 @@ sealed interface DependencyGraphEdge { * @property dependentNode - iterator to a dependent node, i.e. node of part of document with include commands * @property includeList - list of files to be included. */ -data class IncludeDependency( +public data class IncludeDependency( val parentNode: MdAstParent, val dependentNode: Iterator, val includeList: List @@ -39,6 +39,6 @@ data class IncludeDependency( * * @property nodes - map of nodes, where you can find DependencyGraphNode of file by its name. */ -data class DependencyGraph( +public data class DependencyGraph( val nodes: Map ) \ No newline at end of file diff --git a/snark-document-builder/src/main/kotlin/MdAstElements.kt b/snark-document-builder/src/main/kotlin/MdAstElements.kt index 605e2e7..035ce37 100644 --- a/snark-document-builder/src/main/kotlin/MdAstElements.kt +++ b/snark-document-builder/src/main/kotlin/MdAstElements.kt @@ -6,10 +6,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonTypeInfo @Serializable -data class Point(val line: Int, val column: Int, val offset: Int) +public data class Point(val line: Int, val column: Int, val offset: Int) @Serializable -data class Position(val start: Point, val end: Point) +public data class Position(val start: Point, val end: Point) @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, @@ -27,18 +27,18 @@ data class Position(val start: Point, val end: Point) ) @Serializable -sealed interface MdAstElement{ - abstract var position: Position +public sealed interface MdAstElement{ + public abstract var position: Position } @Serializable -sealed interface MdAstParent: MdAstElement{ - var children: List +public sealed interface MdAstParent: MdAstElement{ + public var children: List } @Serializable @SerialName("root") -data class MdAstRoot( +public data class MdAstRoot( override var children: List, override var position: Position ): MdAstParent @@ -46,7 +46,7 @@ data class MdAstRoot( @Serializable @SerialName("paragraph") -data class MdAstParagraph( +public data class MdAstParagraph( override var children: List, override var position: Position ): MdAstParent @@ -54,14 +54,14 @@ data class MdAstParagraph( @Serializable @SerialName("text") -data class MdAstText( +public data class MdAstText( val value: String, override var position: Position ): MdAstElement @Serializable @SerialName("heading") -data class MdAstHeading( +public data class MdAstHeading( val depth: Int, override var children: List, override var position: Position @@ -69,7 +69,7 @@ data class MdAstHeading( @Serializable @SerialName("code") -data class MdAstCode( +public data class MdAstCode( var lang: String? = null, var meta: String? = null, var value: String, @@ -78,7 +78,7 @@ data class MdAstCode( @Serializable @SerialName("blockquote") -data class MdAstBlockquote( +public data class MdAstBlockquote( override var children: List, override var position: Position ): MdAstParent \ No newline at end of file From 1db2afce125e597ae6543980396e11c878a61c53 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Mon, 1 May 2023 21:23:09 +0300 Subject: [PATCH 14/34] SNRK-71: buildDependencyGraph scratch is added --- .../src/main/kotlin/DocumentBuilder.kt | 20 ++++++++++++++++++- .../src/main/kotlin/MdParser.kt | 6 +++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 551ba70..ff069d5 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -9,7 +9,25 @@ val DEFAULT_DOCUMENT_ROOT = "main.md" public suspend fun buildDocument(documentPath: String) { val documentDirectory: Directory = LocalDirectory(documentPath) - val documentRoot = documentDirectory.get(DEFAULT_DOCUMENT_ROOT) + val dependencyGraph = buildDependencyGraph(documentDirectory) + + TODO() /*resolving of dependencies*/ +} + +public suspend fun buildDependencyGraph(root: Directory) : DependencyGraph { + // val rootDcoument = root.get(DEFAULT_DOCUMENT_ROOT) + + // val filesToParse: Queue = LinkedList(listOf(root)) + // var documentName = "." + + // val nodes = HashMap() + + // while (!filesToParse.isEmpty()) + // { + // dependencyGraphNode = buildDependencyNode(filesToParse.remove()) + + // nodes.put() + // } TODO() } \ No newline at end of file diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 0fd107a..0f6d90b 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -1,5 +1,9 @@ package documentBuilder -public suspend fun parseMd(mdFile: ByteArray): DependencyGraphNode { +public suspend fun parseMd(mdFile: ByteArray): MdAstRoot { + TODO() +} + +public suspend fun buildDependencyGraphNode(mdFile: ByteArray): DependencyGraphNode { TODO() } \ No newline at end of file From 6c9a08a14a1acc031fd42c6220c3224597bcf72e Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 02:18:37 +0300 Subject: [PATCH 15/34] SNRK-70: better test naming --- snark-document-builder/src/test/kotlin/DocumentBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snark-document-builder/src/test/kotlin/DocumentBuilder.kt b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt index bc019e3..6c16cc9 100644 --- a/snark-document-builder/src/test/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt @@ -5,7 +5,7 @@ import kotlinx.coroutines.runBlocking class SomeTest { @Test - fun testEssential() = runBlocking { + fun justWorks() = runBlocking { buildDocument("../example") } } From 5458bd367740773e0a25f24d638fb679c88ddc23 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 02:30:03 +0300 Subject: [PATCH 16/34] SNRK-70: better arguments in buildDocument --- snark-document-builder/src/main/kotlin/DocumentBuilder.kt | 4 +--- snark-document-builder/src/test/kotlin/DocumentBuilder.kt | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 551ba70..1b1ebe5 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -2,13 +2,11 @@ package documentBuilder import com.fasterxml.jackson.core.io.BigDecimalParser import space.kscience.snark.storage.* -import space.kscience.snark.storage.local.LocalDirectory import java.nio.file.Path val DEFAULT_DOCUMENT_ROOT = "main.md" -public suspend fun buildDocument(documentPath: String) { - val documentDirectory: Directory = LocalDirectory(documentPath) +public suspend fun buildDocument(documentDirectory: Directory) { val documentRoot = documentDirectory.get(DEFAULT_DOCUMENT_ROOT) TODO() diff --git a/snark-document-builder/src/test/kotlin/DocumentBuilder.kt b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt index 6c16cc9..95c6002 100644 --- a/snark-document-builder/src/test/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/test/kotlin/DocumentBuilder.kt @@ -6,6 +6,6 @@ import kotlinx.coroutines.runBlocking class SomeTest { @Test fun justWorks() = runBlocking { - buildDocument("../example") + // buildDocument(Directory("../example")) } } From dee40ecdcc699f33fa64e4bc7c92b0251845f264 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 02:33:58 +0300 Subject: [PATCH 17/34] SNRK-70: visibility of DEFAULT_DICUMENT_ROOT is specified --- snark-document-builder/src/main/kotlin/DocumentBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 1b1ebe5..fe96f5e 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -4,7 +4,7 @@ import com.fasterxml.jackson.core.io.BigDecimalParser import space.kscience.snark.storage.* import java.nio.file.Path -val DEFAULT_DOCUMENT_ROOT = "main.md" +private val DEFAULT_DOCUMENT_ROOT = "main.md" public suspend fun buildDocument(documentDirectory: Directory) { val documentRoot = documentDirectory.get(DEFAULT_DOCUMENT_ROOT) From c76ecd592fd9c3478e2f388344a18cd895afd8de Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 07:55:48 +0300 Subject: [PATCH 18/34] SNARK-71: buildDependencyGraph is implemented --- .../src/main/kotlin/DocumentBuilder.kt | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 0ad0933..1b26d45 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -7,25 +7,44 @@ import java.nio.file.Path private val DEFAULT_DOCUMENT_ROOT = "main.md" public suspend fun buildDocument(documentDirectory: Directory) { - val dependencyGraph = buildDependencyGraph(documentDirectory) TODO() /*resolving of dependencies*/ } -public suspend fun buildDependencyGraph(root: Directory) : DependencyGraph { - // val rootDcoument = root.get(DEFAULT_DOCUMENT_ROOT) +public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { + val nodes = HashMap() - // val filesToParse: Queue = LinkedList(listOf(root)) - // var documentName = "." + // buildNodes(root, nodes) - // val nodes = HashMap() + val rootDcoument = root.get(DEFAULT_DOCUMENT_ROOT) - // while (!filesToParse.isEmpty()) - // { - // dependencyGraphNode = buildDependencyNode(filesToParse.remove()) + nodes.put(".", buildDependencyGraphNode(rootDcoument.readAll())) - // nodes.put() - // } + val filesToParse = getDependencies(nodes.getValue(".")) + + while (!filesToParse.isEmpty()) + { + val currentFile = filesToParse.remove() + val currentDocument = Directory(currentFile).get(DEFAULT_DOCUMENT_ROOT) + + nodes.put(currentFile, buildDependencyGraphNode(currentDocument.readAll())) + + val currentDependencies = getDependencies(nodes.getValue(currentFile)) + + for (fileName in currentDependencies) { + if (!nodes.containsKey(fileName) && !filesToParse.contains(fileName)) + filesToParse.add(fileName) + } + } + + return DependencyGraph(nodes) +} + +// private suspend fun buildNodes(folder: Directory, nodes: HashMap) { +// assert(!nodes.containsKey(folder.getPath())) +// } + +public suspend fun getDependencies(node: DependencyGraphNode): Set { TODO() } \ No newline at end of file From 54828a6535a308f7b8f60298b95831a2e9b99f52 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 08:09:06 +0300 Subject: [PATCH 19/34] SNARK-71: better implementation --- .../src/main/kotlin/DocumentBuilder.kt | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 1b26d45..d421599 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -15,35 +15,25 @@ public suspend fun buildDocument(documentDirectory: Directory) { public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { val nodes = HashMap() - // buildNodes(root, nodes) - - val rootDcoument = root.get(DEFAULT_DOCUMENT_ROOT) - - nodes.put(".", buildDependencyGraphNode(rootDcoument.readAll())) - - val filesToParse = getDependencies(nodes.getValue(".")) - - while (!filesToParse.isEmpty()) - { - val currentFile = filesToParse.remove() - val currentDocument = Directory(currentFile).get(DEFAULT_DOCUMENT_ROOT) - - nodes.put(currentFile, buildDependencyGraphNode(currentDocument.readAll())) - - val currentDependencies = getDependencies(nodes.getValue(currentFile)) - - for (fileName in currentDependencies) { - if (!nodes.containsKey(fileName) && !filesToParse.contains(fileName)) - filesToParse.add(fileName) - } - } + buildNodes(root, nodes) return DependencyGraph(nodes) } -// private suspend fun buildNodes(folder: Directory, nodes: HashMap) { -// assert(!nodes.containsKey(folder.getPath())) -// } +private suspend fun buildNodes(folder: Directory, nodes: HashMap) { + assert(!nodes.containsKey(folder.getPath())) + + val path = folder.getPath() + val rootDcoument = folder.get(DEFAULT_DOCUMENT_ROOT) + nodes.put(path, buildDependencyGraphNode(rootDcoument.readAll())) + + val dependencies = getDependencies(nodes.getValue(path)) + + for (dependency in dependencies) { + if (!nodes.containsKey(dependency)) + buildNodes(folder.getSubdir(dependency), nodes) + } +} public suspend fun getDependencies(node: DependencyGraphNode): Set { TODO() From a411849d6f38c84b2fa6a403bc10c39b12827609 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 09:47:00 +0300 Subject: [PATCH 20/34] SNARK-71: getDependencies are implemented --- .../src/main/kotlin/DocumentBuilder.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index d421599..dffae85 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -3,6 +3,7 @@ package documentBuilder import com.fasterxml.jackson.core.io.BigDecimalParser import space.kscience.snark.storage.* import java.nio.file.Path +import java.nio.file.Paths private val DEFAULT_DOCUMENT_ROOT = "main.md" @@ -31,10 +32,19 @@ private suspend fun buildNodes(folder: Directory, nodes: HashMap { - TODO() + val dependencies = mutableListOf() + + for (dependency in node.dependencies) { + when (dependency) { + is IncludeDependency -> dependencies.addAll(dependency.includeList) + else -> TODO() + } + } + + return dependencies.toSet() } \ No newline at end of file From 06bcdbd48942bc0cad8f9d39599c75978aec09e9 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 18:53:55 +0300 Subject: [PATCH 21/34] SNARK-71: better path using --- .../src/main/kotlin/DocumentBuilder.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index dffae85..a004ef6 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -22,13 +22,14 @@ public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { } private suspend fun buildNodes(folder: Directory, nodes: HashMap) { - assert(!nodes.containsKey(folder.getPath())) + val pathString = folder.getPath().pathString + + assert(!nodes.containsKey(pathString)) - val path = folder.getPath() val rootDcoument = folder.get(DEFAULT_DOCUMENT_ROOT) - nodes.put(path, buildDependencyGraphNode(rootDcoument.readAll())) + nodes.put(pathString, buildDependencyGraphNode(rootDcoument.readAll())) - val dependencies = getDependencies(nodes.getValue(path)) + val dependencies = getDependencies(nodes.getValue(pathString)) for (dependency in dependencies) { if (!nodes.containsKey(dependency)) From 859c53745f37fa044ab9ce32ba2699617aa720a6 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 18:54:21 +0300 Subject: [PATCH 22/34] SNARK-71: redundant else is removed --- snark-document-builder/src/main/kotlin/DocumentBuilder.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index a004ef6..f9d81ad 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -43,7 +43,6 @@ public suspend fun getDependencies(node: DependencyGraphNode): Set { for (dependency in node.dependencies) { when (dependency) { is IncludeDependency -> dependencies.addAll(dependency.includeList) - else -> TODO() } } From e90c9728c198512e76d73eac0a5f77516b023887 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 18:57:25 +0300 Subject: [PATCH 23/34] SNRK-71: pathString replaced with toString() --- snark-document-builder/src/main/kotlin/DocumentBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index f9d81ad..6f92c77 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -22,7 +22,7 @@ public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { } private suspend fun buildNodes(folder: Directory, nodes: HashMap) { - val pathString = folder.getPath().pathString + val pathString = folder.getPath().toString() assert(!nodes.containsKey(pathString)) From 248677dad9a4f924e0cfdf94002dffea4a65b609 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Thu, 4 May 2023 23:54:57 +0300 Subject: [PATCH 24/34] SNRK-71: nodejs scripts for markdown parsing are added --- .../src/main/nodejs/MarkdownParser.js | 14 + .../src/main/nodejs/package-lock.json | 4152 +++++++++++++++++ .../src/main/nodejs/package.json | 30 + 3 files changed, 4196 insertions(+) create mode 100644 snark-document-builder/src/main/nodejs/MarkdownParser.js create mode 100644 snark-document-builder/src/main/nodejs/package-lock.json create mode 100644 snark-document-builder/src/main/nodejs/package.json diff --git a/snark-document-builder/src/main/nodejs/MarkdownParser.js b/snark-document-builder/src/main/nodejs/MarkdownParser.js new file mode 100644 index 0000000..46436d3 --- /dev/null +++ b/snark-document-builder/src/main/nodejs/MarkdownParser.js @@ -0,0 +1,14 @@ +import {fromMarkdown} from 'mdast-util-from-markdown' + +main() + +function main() +{ + if (process.argv.length < 3) + throw "No input" + + const markdown_string = process.argv[2] + const mdast = fromMarkdown(markdown_string) + + console.log(JSON.stringify(mdast)) +} \ No newline at end of file diff --git a/snark-document-builder/src/main/nodejs/package-lock.json b/snark-document-builder/src/main/nodejs/package-lock.json new file mode 100644 index 0000000..c9a8052 --- /dev/null +++ b/snark-document-builder/src/main/nodejs/package-lock.json @@ -0,0 +1,4152 @@ +{ + + "name": "SnarkPrototype", + + "lockfileVersion": 2, + + "requires": true, + + "packages": { + + "": { + + "dependencies": { + + "fs": "^0.0.1-security", + + "hast-util-to-html": "^8.0.4", + + "mdast-util-to-hast": "^12.3.0", + + "node-fetch": "^3.3.1", + + "remark-html": "^15.0.2", + + "remark-parse": "^10.0.1", + + "require": "^2.4.20", + + "to-vfile": "^7.2.4", + + "unified": "^10.1.2", + + "whatwg-fetch": "^3.6.2" + + } + + }, + + "node_modules/@types/debug": { + + "version": "4.1.7", + + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + + "dependencies": { + + "@types/ms": "*" + + } + + }, + + "node_modules/@types/hast": { + + "version": "2.3.4", + + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + + "dependencies": { + + "@types/unist": "*" + + } + + }, + + "node_modules/@types/mdast": { + + "version": "3.0.11", + + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.11.tgz", + + "integrity": "sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==", + + "dependencies": { + + "@types/unist": "*" + + } + + }, + + "node_modules/@types/ms": { + + "version": "0.7.31", + + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + + }, + + "node_modules/@types/parse5": { + + "version": "6.0.3", + + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==" + + }, + + "node_modules/@types/unist": { + + "version": "2.0.6", + + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + + }, + + "node_modules/amdefine": { + + "version": "1.0.1", + + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + + "engines": { + + "node": ">=0.4.2" + + } + + }, + + "node_modules/async": { + + "version": "0.2.10", + + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + + "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==" + + }, + + "node_modules/bail": { + + "version": "2.0.2", + + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/ccount": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/character-entities": { + + "version": "2.0.2", + + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/character-entities-html4": { + + "version": "2.1.0", + + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/character-entities-legacy": { + + "version": "3.0.0", + + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/comma-separated-tokens": { + + "version": "2.0.3", + + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/data-uri-to-buffer": { + + "version": "4.0.1", + + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + + "engines": { + + "node": ">= 12" + + } + + }, + + "node_modules/debug": { + + "version": "4.3.4", + + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + + "dependencies": { + + "ms": "2.1.2" + + }, + + "engines": { + + "node": ">=6.0" + + }, + + "peerDependenciesMeta": { + + "supports-color": { + + "optional": true + + } + + } + + }, + + "node_modules/decode-named-character-reference": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + + "dependencies": { + + "character-entities": "^2.0.0" + + }, + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/dequal": { + + "version": "2.0.3", + + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + + "engines": { + + "node": ">=6" + + } + + }, + + "node_modules/diff": { + + "version": "5.1.0", + + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + + "engines": { + + "node": ">=0.3.1" + + } + + }, + + "node_modules/extend": { + + "version": "3.0.2", + + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + + }, + + "node_modules/fetch-blob": { + + "version": "3.2.0", + + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + + "funding": [ + + { + + "type": "github", + + "url": "https://github.com/sponsors/jimmywarting" + + }, + + { + + "type": "paypal", + + "url": "https://paypal.me/jimmywarting" + + } + + ], + + "dependencies": { + + "node-domexception": "^1.0.0", + + "web-streams-polyfill": "^3.0.3" + + }, + + "engines": { + + "node": "^12.20 || >= 14.13" + + } + + }, + + "node_modules/formdata-polyfill": { + + "version": "4.0.10", + + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + + "dependencies": { + + "fetch-blob": "^3.1.2" + + }, + + "engines": { + + "node": ">=12.20.0" + + } + + }, + + "node_modules/fs": { + + "version": "0.0.1-security", + + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + + }, + + "node_modules/hast-util-from-parse5": { + + "version": "7.1.2", + + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", + + "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", + + "dependencies": { + + "@types/hast": "^2.0.0", + + "@types/unist": "^2.0.0", + + "hastscript": "^7.0.0", + + "property-information": "^6.0.0", + + "vfile": "^5.0.0", + + "vfile-location": "^4.0.0", + + "web-namespaces": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/hast-util-parse-selector": { + + "version": "3.1.1", + + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + + "dependencies": { + + "@types/hast": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/hast-util-raw": { + + "version": "7.2.3", + + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + + "dependencies": { + + "@types/hast": "^2.0.0", + + "@types/parse5": "^6.0.0", + + "hast-util-from-parse5": "^7.0.0", + + "hast-util-to-parse5": "^7.0.0", + + "html-void-elements": "^2.0.0", + + "parse5": "^6.0.0", + + "unist-util-position": "^4.0.0", + + "unist-util-visit": "^4.0.0", + + "vfile": "^5.0.0", + + "web-namespaces": "^2.0.0", + + "zwitch": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/hast-util-sanitize": { + + "version": "4.1.0", + + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-4.1.0.tgz", + + "integrity": "sha512-Hd9tU0ltknMGRDv+d6Ro/4XKzBqQnP/EZrpiTbpFYfXv/uOhWeKc+2uajcbEvAEH98VZd7eII2PiXm13RihnLw==", + + "dependencies": { + + "@types/hast": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/hast-util-to-html": { + + "version": "8.0.4", + + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz", + + "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==", + + "dependencies": { + + "@types/hast": "^2.0.0", + + "@types/unist": "^2.0.0", + + "ccount": "^2.0.0", + + "comma-separated-tokens": "^2.0.0", + + "hast-util-raw": "^7.0.0", + + "hast-util-whitespace": "^2.0.0", + + "html-void-elements": "^2.0.0", + + "property-information": "^6.0.0", + + "space-separated-tokens": "^2.0.0", + + "stringify-entities": "^4.0.0", + + "zwitch": "^2.0.4" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/hast-util-to-parse5": { + + "version": "7.1.0", + + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", + + "dependencies": { + + "@types/hast": "^2.0.0", + + "comma-separated-tokens": "^2.0.0", + + "property-information": "^6.0.0", + + "space-separated-tokens": "^2.0.0", + + "web-namespaces": "^2.0.0", + + "zwitch": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/hast-util-whitespace": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==", + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/hastscript": { + + "version": "7.2.0", + + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + + "dependencies": { + + "@types/hast": "^2.0.0", + + "comma-separated-tokens": "^2.0.0", + + "hast-util-parse-selector": "^3.0.0", + + "property-information": "^6.0.0", + + "space-separated-tokens": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/html-void-elements": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/is-buffer": { + + "version": "2.0.5", + + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + + "funding": [ + + { + + "type": "github", + + "url": "https://github.com/sponsors/feross" + + }, + + { + + "type": "patreon", + + "url": "https://www.patreon.com/feross" + + }, + + { + + "type": "consulting", + + "url": "https://feross.org/support" + + } + + ], + + "engines": { + + "node": ">=4" + + } + + }, + + "node_modules/is-plain-obj": { + + "version": "4.1.0", + + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + + "engines": { + + "node": ">=12" + + }, + + "funding": { + + "url": "https://github.com/sponsors/sindresorhus" + + } + + }, + + "node_modules/kleur": { + + "version": "4.1.5", + + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + + "engines": { + + "node": ">=6" + + } + + }, + + "node_modules/mdast-util-definitions": { + + "version": "5.1.2", + + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", + + "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", + + "dependencies": { + + "@types/mdast": "^3.0.0", + + "@types/unist": "^2.0.0", + + "unist-util-visit": "^4.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/mdast-util-from-markdown": { + + "version": "1.3.0", + + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz", + + "integrity": "sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==", + + "dependencies": { + + "@types/mdast": "^3.0.0", + + "@types/unist": "^2.0.0", + + "decode-named-character-reference": "^1.0.0", + + "mdast-util-to-string": "^3.1.0", + + "micromark": "^3.0.0", + + "micromark-util-decode-numeric-character-reference": "^1.0.0", + + "micromark-util-decode-string": "^1.0.0", + + "micromark-util-normalize-identifier": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "unist-util-stringify-position": "^3.0.0", + + "uvu": "^0.5.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/mdast-util-to-hast": { + + "version": "12.3.0", + + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", + + "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", + + "dependencies": { + + "@types/hast": "^2.0.0", + + "@types/mdast": "^3.0.0", + + "mdast-util-definitions": "^5.0.0", + + "micromark-util-sanitize-uri": "^1.1.0", + + "trim-lines": "^3.0.0", + + "unist-util-generated": "^2.0.0", + + "unist-util-position": "^4.0.0", + + "unist-util-visit": "^4.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/mdast-util-to-string": { + + "version": "3.1.1", + + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.1.tgz", + + "integrity": "sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==", + + "dependencies": { + + "@types/mdast": "^3.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/micromark": { + + "version": "3.1.0", + + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", + + "integrity": "sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "@types/debug": "^4.0.0", + + "debug": "^4.0.0", + + "decode-named-character-reference": "^1.0.0", + + "micromark-core-commonmark": "^1.0.1", + + "micromark-factory-space": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-combine-extensions": "^1.0.0", + + "micromark-util-decode-numeric-character-reference": "^1.0.0", + + "micromark-util-encode": "^1.0.0", + + "micromark-util-normalize-identifier": "^1.0.0", + + "micromark-util-resolve-all": "^1.0.0", + + "micromark-util-sanitize-uri": "^1.0.0", + + "micromark-util-subtokenize": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.1", + + "uvu": "^0.5.0" + + } + + }, + + "node_modules/micromark-core-commonmark": { + + "version": "1.0.6", + + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz", + + "integrity": "sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "decode-named-character-reference": "^1.0.0", + + "micromark-factory-destination": "^1.0.0", + + "micromark-factory-label": "^1.0.0", + + "micromark-factory-space": "^1.0.0", + + "micromark-factory-title": "^1.0.0", + + "micromark-factory-whitespace": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-classify-character": "^1.0.0", + + "micromark-util-html-tag-name": "^1.0.0", + + "micromark-util-normalize-identifier": "^1.0.0", + + "micromark-util-resolve-all": "^1.0.0", + + "micromark-util-subtokenize": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.1", + + "uvu": "^0.5.0" + + } + + }, + + "node_modules/micromark-factory-destination": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", + + "integrity": "sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "node_modules/micromark-factory-label": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz", + + "integrity": "sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "uvu": "^0.5.0" + + } + + }, + + "node_modules/micromark-factory-space": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz", + + "integrity": "sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "node_modules/micromark-factory-title": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz", + + "integrity": "sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-factory-space": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "uvu": "^0.5.0" + + } + + }, + + "node_modules/micromark-factory-whitespace": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz", + + "integrity": "sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-factory-space": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-character": { + + "version": "1.1.0", + + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz", + + "integrity": "sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-chunked": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz", + + "integrity": "sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-classify-character": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz", + + "integrity": "sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-combine-extensions": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz", + + "integrity": "sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-decode-numeric-character-reference": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", + + "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-decode-string": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", + + "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "decode-named-character-reference": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-decode-numeric-character-reference": "^1.0.0", + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-encode": { + + "version": "1.0.1", + + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", + + "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ] + + }, + + "node_modules/micromark-util-html-tag-name": { + + "version": "1.1.0", + + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", + + "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ] + + }, + + "node_modules/micromark-util-normalize-identifier": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", + + "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-resolve-all": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", + + "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-types": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-sanitize-uri": { + + "version": "1.1.0", + + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", + + "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-encode": "^1.0.0", + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "node_modules/micromark-util-subtokenize": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", + + "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ], + + "dependencies": { + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "uvu": "^0.5.0" + + } + + }, + + "node_modules/micromark-util-symbol": { + + "version": "1.0.1", + + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", + + "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ] + + }, + + "node_modules/micromark-util-types": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", + + "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==", + + "funding": [ + + { + + "type": "GitHub Sponsors", + + "url": "https://github.com/sponsors/unifiedjs" + + }, + + { + + "type": "OpenCollective", + + "url": "https://opencollective.com/unified" + + } + + ] + + }, + + "node_modules/mri": { + + "version": "1.2.0", + + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + + "engines": { + + "node": ">=4" + + } + + }, + + "node_modules/ms": { + + "version": "2.1.2", + + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + + }, + + "node_modules/node-domexception": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + + "funding": [ + + { + + "type": "github", + + "url": "https://github.com/sponsors/jimmywarting" + + }, + + { + + "type": "github", + + "url": "https://paypal.me/jimmywarting" + + } + + ], + + "engines": { + + "node": ">=10.5.0" + + } + + }, + + "node_modules/node-fetch": { + + "version": "3.3.1", + + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + + "dependencies": { + + "data-uri-to-buffer": "^4.0.0", + + "fetch-blob": "^3.1.4", + + "formdata-polyfill": "^4.0.10" + + }, + + "engines": { + + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/node-fetch" + + } + + }, + + "node_modules/optimist": { + + "version": "0.3.7", + + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + + "dependencies": { + + "wordwrap": "~0.0.2" + + } + + }, + + "node_modules/parse5": { + + "version": "6.0.1", + + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + + }, + + "node_modules/property-information": { + + "version": "6.2.0", + + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz", + + "integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/remark-html": { + + "version": "15.0.2", + + "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-15.0.2.tgz", + + "integrity": "sha512-/CIOI7wzHJzsh48AiuIyIe1clxVkUtreul73zcCXLub0FmnevQE0UMFDQm7NUx8/3rl/4zCshlMfqBdWScQthw==", + + "dependencies": { + + "@types/mdast": "^3.0.0", + + "hast-util-sanitize": "^4.0.0", + + "hast-util-to-html": "^8.0.0", + + "mdast-util-to-hast": "^12.0.0", + + "unified": "^10.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/remark-parse": { + + "version": "10.0.1", + + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.1.tgz", + + "integrity": "sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==", + + "dependencies": { + + "@types/mdast": "^3.0.0", + + "mdast-util-from-markdown": "^1.0.0", + + "unified": "^10.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/require": { + + "version": "2.4.20", + + "resolved": "https://registry.npmjs.org/require/-/require-2.4.20.tgz", + + "integrity": "sha512-7eop5rvh38qhQQQOoUyf68meVIcxT2yFySNywTbxoEECgkX4KDqqDRaEszfvFnuB3fuZVjDdJZ1TI/Esr16RRA==", + + "dependencies": { + + "std": "0.1.40", + + "uglify-js": "2.3.0" + + }, + + "bin": { + + "require": "bin/require-command.js" + + }, + + "engines": { + + "browsers": "*", + + "node": "*" + + } + + }, + + "node_modules/sade": { + + "version": "1.8.1", + + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + + "dependencies": { + + "mri": "^1.1.0" + + }, + + "engines": { + + "node": ">=6" + + } + + }, + + "node_modules/source-map": { + + "version": "0.1.43", + + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + + "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==", + + "dependencies": { + + "amdefine": ">=0.0.4" + + }, + + "engines": { + + "node": ">=0.8.0" + + } + + }, + + "node_modules/space-separated-tokens": { + + "version": "2.0.2", + + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/std": { + + "version": "0.1.40", + + "resolved": "https://registry.npmjs.org/std/-/std-0.1.40.tgz", + + "integrity": "sha512-wUf57hkDGCoVShrhPA8Q7lAg2Qosk+FaMlECmAsr1A4/rL2NRXFHQGBcgMUFKVkPEemJFW9gzjCQisRty14ohg==", + + "engines": { + + "node": "*" + + } + + }, + + "node_modules/stringify-entities": { + + "version": "4.0.3", + + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", + + "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", + + "dependencies": { + + "character-entities-html4": "^2.0.0", + + "character-entities-legacy": "^3.0.0" + + }, + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/to-vfile": { + + "version": "7.2.4", + + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-7.2.4.tgz", + + "integrity": "sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==", + + "dependencies": { + + "is-buffer": "^2.0.0", + + "vfile": "^5.1.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/trim-lines": { + + "version": "3.0.1", + + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/trough": { + + "version": "2.1.0", + + "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", + + "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/uglify-js": { + + "version": "2.3.0", + + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.0.tgz", + + "integrity": "sha512-AQvbxRKdaQeYADywQaao0k8Tj+7NGEVTne6xwgX1yQpv/G8b0CKdIw70HkCptwfvNGDsVe+0Bng3U9hfWbxxfg==", + + "dependencies": { + + "async": "~0.2.6", + + "optimist": "~0.3.5", + + "source-map": "~0.1.7" + + }, + + "bin": { + + "uglifyjs": "bin/uglifyjs" + + }, + + "engines": { + + "node": ">=0.4.0" + + } + + }, + + "node_modules/unified": { + + "version": "10.1.2", + + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + + "dependencies": { + + "@types/unist": "^2.0.0", + + "bail": "^2.0.0", + + "extend": "^3.0.0", + + "is-buffer": "^2.0.0", + + "is-plain-obj": "^4.0.0", + + "trough": "^2.0.0", + + "vfile": "^5.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/unist-util-generated": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", + + "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==", + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/unist-util-is": { + + "version": "5.2.1", + + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + + "dependencies": { + + "@types/unist": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/unist-util-position": { + + "version": "4.0.4", + + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + + "dependencies": { + + "@types/unist": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/unist-util-stringify-position": { + + "version": "3.0.3", + + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + + "dependencies": { + + "@types/unist": "^2.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/unist-util-visit": { + + "version": "4.1.2", + + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + + "dependencies": { + + "@types/unist": "^2.0.0", + + "unist-util-is": "^5.0.0", + + "unist-util-visit-parents": "^5.1.1" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/unist-util-visit-parents": { + + "version": "5.1.3", + + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + + "dependencies": { + + "@types/unist": "^2.0.0", + + "unist-util-is": "^5.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/uvu": { + + "version": "0.5.6", + + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + + "dependencies": { + + "dequal": "^2.0.0", + + "diff": "^5.0.0", + + "kleur": "^4.0.3", + + "sade": "^1.7.3" + + }, + + "bin": { + + "uvu": "bin.js" + + }, + + "engines": { + + "node": ">=8" + + } + + }, + + "node_modules/vfile": { + + "version": "5.3.7", + + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + + "dependencies": { + + "@types/unist": "^2.0.0", + + "is-buffer": "^2.0.0", + + "unist-util-stringify-position": "^3.0.0", + + "vfile-message": "^3.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/vfile-location": { + + "version": "4.1.0", + + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz", + + "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==", + + "dependencies": { + + "@types/unist": "^2.0.0", + + "vfile": "^5.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/vfile-message": { + + "version": "3.1.4", + + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + + "dependencies": { + + "@types/unist": "^2.0.0", + + "unist-util-stringify-position": "^3.0.0" + + }, + + "funding": { + + "type": "opencollective", + + "url": "https://opencollective.com/unified" + + } + + }, + + "node_modules/web-namespaces": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + }, + + "node_modules/web-streams-polyfill": { + + "version": "3.2.1", + + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + + "engines": { + + "node": ">= 8" + + } + + }, + + "node_modules/whatwg-fetch": { + + "version": "3.6.2", + + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + + }, + + "node_modules/wordwrap": { + + "version": "0.0.3", + + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", + + "engines": { + + "node": ">=0.4.0" + + } + + }, + + "node_modules/zwitch": { + + "version": "2.0.4", + + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + + "funding": { + + "type": "github", + + "url": "https://github.com/sponsors/wooorm" + + } + + } + + }, + + "dependencies": { + + "@types/debug": { + + "version": "4.1.7", + + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + + "requires": { + + "@types/ms": "*" + + } + + }, + + "@types/hast": { + + "version": "2.3.4", + + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz", + + "integrity": "sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==", + + "requires": { + + "@types/unist": "*" + + } + + }, + + "@types/mdast": { + + "version": "3.0.11", + + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.11.tgz", + + "integrity": "sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==", + + "requires": { + + "@types/unist": "*" + + } + + }, + + "@types/ms": { + + "version": "0.7.31", + + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + + }, + + "@types/parse5": { + + "version": "6.0.3", + + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", + + "integrity": "sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==" + + }, + + "@types/unist": { + + "version": "2.0.6", + + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==" + + }, + + "amdefine": { + + "version": "1.0.1", + + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==" + + }, + + "async": { + + "version": "0.2.10", + + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + + "integrity": "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ==" + + }, + + "bail": { + + "version": "2.0.2", + + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==" + + }, + + "ccount": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==" + + }, + + "character-entities": { + + "version": "2.0.2", + + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==" + + }, + + "character-entities-html4": { + + "version": "2.1.0", + + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==" + + }, + + "character-entities-legacy": { + + "version": "3.0.0", + + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==" + + }, + + "comma-separated-tokens": { + + "version": "2.0.3", + + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==" + + }, + + "data-uri-to-buffer": { + + "version": "4.0.1", + + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" + + }, + + "debug": { + + "version": "4.3.4", + + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + + "requires": { + + "ms": "2.1.2" + + } + + }, + + "decode-named-character-reference": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", + + "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", + + "requires": { + + "character-entities": "^2.0.0" + + } + + }, + + "dequal": { + + "version": "2.0.3", + + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==" + + }, + + "diff": { + + "version": "5.1.0", + + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==" + + }, + + "extend": { + + "version": "3.0.2", + + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + + }, + + "fetch-blob": { + + "version": "3.2.0", + + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + + "requires": { + + "node-domexception": "^1.0.0", + + "web-streams-polyfill": "^3.0.3" + + } + + }, + + "formdata-polyfill": { + + "version": "4.0.10", + + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + + "requires": { + + "fetch-blob": "^3.1.2" + + } + + }, + + "fs": { + + "version": "0.0.1-security", + + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + + }, + + "hast-util-from-parse5": { + + "version": "7.1.2", + + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz", + + "integrity": "sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw==", + + "requires": { + + "@types/hast": "^2.0.0", + + "@types/unist": "^2.0.0", + + "hastscript": "^7.0.0", + + "property-information": "^6.0.0", + + "vfile": "^5.0.0", + + "vfile-location": "^4.0.0", + + "web-namespaces": "^2.0.0" + + } + + }, + + "hast-util-parse-selector": { + + "version": "3.1.1", + + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz", + + "integrity": "sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA==", + + "requires": { + + "@types/hast": "^2.0.0" + + } + + }, + + "hast-util-raw": { + + "version": "7.2.3", + + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-7.2.3.tgz", + + "integrity": "sha512-RujVQfVsOrxzPOPSzZFiwofMArbQke6DJjnFfceiEbFh7S05CbPt0cYN+A5YeD3pso0JQk6O1aHBnx9+Pm2uqg==", + + "requires": { + + "@types/hast": "^2.0.0", + + "@types/parse5": "^6.0.0", + + "hast-util-from-parse5": "^7.0.0", + + "hast-util-to-parse5": "^7.0.0", + + "html-void-elements": "^2.0.0", + + "parse5": "^6.0.0", + + "unist-util-position": "^4.0.0", + + "unist-util-visit": "^4.0.0", + + "vfile": "^5.0.0", + + "web-namespaces": "^2.0.0", + + "zwitch": "^2.0.0" + + } + + }, + + "hast-util-sanitize": { + + "version": "4.1.0", + + "resolved": "https://registry.npmjs.org/hast-util-sanitize/-/hast-util-sanitize-4.1.0.tgz", + + "integrity": "sha512-Hd9tU0ltknMGRDv+d6Ro/4XKzBqQnP/EZrpiTbpFYfXv/uOhWeKc+2uajcbEvAEH98VZd7eII2PiXm13RihnLw==", + + "requires": { + + "@types/hast": "^2.0.0" + + } + + }, + + "hast-util-to-html": { + + "version": "8.0.4", + + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-8.0.4.tgz", + + "integrity": "sha512-4tpQTUOr9BMjtYyNlt0P50mH7xj0Ks2xpo8M943Vykljf99HW6EzulIoJP1N3eKOSScEHzyzi9dm7/cn0RfGwA==", + + "requires": { + + "@types/hast": "^2.0.0", + + "@types/unist": "^2.0.0", + + "ccount": "^2.0.0", + + "comma-separated-tokens": "^2.0.0", + + "hast-util-raw": "^7.0.0", + + "hast-util-whitespace": "^2.0.0", + + "html-void-elements": "^2.0.0", + + "property-information": "^6.0.0", + + "space-separated-tokens": "^2.0.0", + + "stringify-entities": "^4.0.0", + + "zwitch": "^2.0.4" + + } + + }, + + "hast-util-to-parse5": { + + "version": "7.1.0", + + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-7.1.0.tgz", + + "integrity": "sha512-YNRgAJkH2Jky5ySkIqFXTQiaqcAtJyVE+D5lkN6CdtOqrnkLfGYYrEcKuHOJZlp+MwjSwuD3fZuawI+sic/RBw==", + + "requires": { + + "@types/hast": "^2.0.0", + + "comma-separated-tokens": "^2.0.0", + + "property-information": "^6.0.0", + + "space-separated-tokens": "^2.0.0", + + "web-namespaces": "^2.0.0", + + "zwitch": "^2.0.0" + + } + + }, + + "hast-util-whitespace": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz", + + "integrity": "sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==" + + }, + + "hastscript": { + + "version": "7.2.0", + + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-7.2.0.tgz", + + "integrity": "sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw==", + + "requires": { + + "@types/hast": "^2.0.0", + + "comma-separated-tokens": "^2.0.0", + + "hast-util-parse-selector": "^3.0.0", + + "property-information": "^6.0.0", + + "space-separated-tokens": "^2.0.0" + + } + + }, + + "html-void-elements": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz", + + "integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==" + + }, + + "is-buffer": { + + "version": "2.0.5", + + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==" + + }, + + "is-plain-obj": { + + "version": "4.1.0", + + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==" + + }, + + "kleur": { + + "version": "4.1.5", + + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==" + + }, + + "mdast-util-definitions": { + + "version": "5.1.2", + + "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz", + + "integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==", + + "requires": { + + "@types/mdast": "^3.0.0", + + "@types/unist": "^2.0.0", + + "unist-util-visit": "^4.0.0" + + } + + }, + + "mdast-util-from-markdown": { + + "version": "1.3.0", + + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz", + + "integrity": "sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==", + + "requires": { + + "@types/mdast": "^3.0.0", + + "@types/unist": "^2.0.0", + + "decode-named-character-reference": "^1.0.0", + + "mdast-util-to-string": "^3.1.0", + + "micromark": "^3.0.0", + + "micromark-util-decode-numeric-character-reference": "^1.0.0", + + "micromark-util-decode-string": "^1.0.0", + + "micromark-util-normalize-identifier": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "unist-util-stringify-position": "^3.0.0", + + "uvu": "^0.5.0" + + } + + }, + + "mdast-util-to-hast": { + + "version": "12.3.0", + + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz", + + "integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==", + + "requires": { + + "@types/hast": "^2.0.0", + + "@types/mdast": "^3.0.0", + + "mdast-util-definitions": "^5.0.0", + + "micromark-util-sanitize-uri": "^1.1.0", + + "trim-lines": "^3.0.0", + + "unist-util-generated": "^2.0.0", + + "unist-util-position": "^4.0.0", + + "unist-util-visit": "^4.0.0" + + } + + }, + + "mdast-util-to-string": { + + "version": "3.1.1", + + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.1.1.tgz", + + "integrity": "sha512-tGvhT94e+cVnQt8JWE9/b3cUQZWS732TJxXHktvP+BYo62PpYD53Ls/6cC60rW21dW+txxiM4zMdc6abASvZKA==", + + "requires": { + + "@types/mdast": "^3.0.0" + + } + + }, + + "micromark": { + + "version": "3.1.0", + + "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.1.0.tgz", + + "integrity": "sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==", + + "requires": { + + "@types/debug": "^4.0.0", + + "debug": "^4.0.0", + + "decode-named-character-reference": "^1.0.0", + + "micromark-core-commonmark": "^1.0.1", + + "micromark-factory-space": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-combine-extensions": "^1.0.0", + + "micromark-util-decode-numeric-character-reference": "^1.0.0", + + "micromark-util-encode": "^1.0.0", + + "micromark-util-normalize-identifier": "^1.0.0", + + "micromark-util-resolve-all": "^1.0.0", + + "micromark-util-sanitize-uri": "^1.0.0", + + "micromark-util-subtokenize": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.1", + + "uvu": "^0.5.0" + + } + + }, + + "micromark-core-commonmark": { + + "version": "1.0.6", + + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.0.6.tgz", + + "integrity": "sha512-K+PkJTxqjFfSNkfAhp4GB+cZPfQd6dxtTXnf+RjZOV7T4EEXnvgzOcnp+eSTmpGk9d1S9sL6/lqrgSNn/s0HZA==", + + "requires": { + + "decode-named-character-reference": "^1.0.0", + + "micromark-factory-destination": "^1.0.0", + + "micromark-factory-label": "^1.0.0", + + "micromark-factory-space": "^1.0.0", + + "micromark-factory-title": "^1.0.0", + + "micromark-factory-whitespace": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-classify-character": "^1.0.0", + + "micromark-util-html-tag-name": "^1.0.0", + + "micromark-util-normalize-identifier": "^1.0.0", + + "micromark-util-resolve-all": "^1.0.0", + + "micromark-util-subtokenize": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.1", + + "uvu": "^0.5.0" + + } + + }, + + "micromark-factory-destination": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", + + "integrity": "sha512-eUBA7Rs1/xtTVun9TmV3gjfPz2wEwgK5R5xcbIM5ZYAtvGF6JkyaDsj0agx8urXnO31tEO6Ug83iVH3tdedLnw==", + + "requires": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "micromark-factory-label": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.0.2.tgz", + + "integrity": "sha512-CTIwxlOnU7dEshXDQ+dsr2n+yxpP0+fn271pu0bwDIS8uqfFcumXpj5mLn3hSC8iw2MUr6Gx8EcKng1dD7i6hg==", + + "requires": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "uvu": "^0.5.0" + + } + + }, + + "micromark-factory-space": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz", + + "integrity": "sha512-qUmqs4kj9a5yBnk3JMLyjtWYN6Mzfcx8uJfi5XAveBniDevmZasdGBba5b4QsvRcAkmvGo5ACmSUmyGiKTLZew==", + + "requires": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "micromark-factory-title": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.0.2.tgz", + + "integrity": "sha512-zily+Nr4yFqgMGRKLpTVsNl5L4PMu485fGFDOQJQBl2NFpjGte1e86zC0da93wf97jrc4+2G2GQudFMHn3IX+A==", + + "requires": { + + "micromark-factory-space": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "uvu": "^0.5.0" + + } + + }, + + "micromark-factory-whitespace": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.0.0.tgz", + + "integrity": "sha512-Qx7uEyahU1lt1RnsECBiuEbfr9INjQTGa6Err+gF3g0Tx4YEviPbqqGKNv/NrBaE7dVHdn1bVZKM/n5I/Bak7A==", + + "requires": { + + "micromark-factory-space": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "micromark-util-character": { + + "version": "1.1.0", + + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.1.0.tgz", + + "integrity": "sha512-agJ5B3unGNJ9rJvADMJ5ZiYjBRyDpzKAOk01Kpi1TKhlT1APx3XZk6eN7RtSz1erbWHC2L8T3xLZ81wdtGRZzg==", + + "requires": { + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "micromark-util-chunked": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.0.0.tgz", + + "integrity": "sha512-5e8xTis5tEZKgesfbQMKRCyzvffRRUX+lK/y+DvsMFdabAicPkkZV6gO+FEWi9RfuKKoxxPwNL+dFF0SMImc1g==", + + "requires": { + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "micromark-util-classify-character": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.0.0.tgz", + + "integrity": "sha512-F8oW2KKrQRb3vS5ud5HIqBVkCqQi224Nm55o5wYLzY/9PwHGXC01tr3d7+TqHHz6zrKQ72Okwtvm/xQm6OVNZA==", + + "requires": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "micromark-util-combine-extensions": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.0.0.tgz", + + "integrity": "sha512-J8H058vFBdo/6+AsjHp2NF7AJ02SZtWaVUjsayNFeAiydTxUwViQPxN0Hf8dp4FmCQi0UUFovFsEyRSUmFH3MA==", + + "requires": { + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-types": "^1.0.0" + + } + + }, + + "micromark-util-decode-numeric-character-reference": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", + + "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", + + "requires": { + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "micromark-util-decode-string": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", + + "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", + + "requires": { + + "decode-named-character-reference": "^1.0.0", + + "micromark-util-character": "^1.0.0", + + "micromark-util-decode-numeric-character-reference": "^1.0.0", + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "micromark-util-encode": { + + "version": "1.0.1", + + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", + + "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==" + + }, + + "micromark-util-html-tag-name": { + + "version": "1.1.0", + + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", + + "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==" + + }, + + "micromark-util-normalize-identifier": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", + + "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", + + "requires": { + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "micromark-util-resolve-all": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", + + "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", + + "requires": { + + "micromark-util-types": "^1.0.0" + + } + + }, + + "micromark-util-sanitize-uri": { + + "version": "1.1.0", + + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", + + "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", + + "requires": { + + "micromark-util-character": "^1.0.0", + + "micromark-util-encode": "^1.0.0", + + "micromark-util-symbol": "^1.0.0" + + } + + }, + + "micromark-util-subtokenize": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", + + "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", + + "requires": { + + "micromark-util-chunked": "^1.0.0", + + "micromark-util-symbol": "^1.0.0", + + "micromark-util-types": "^1.0.0", + + "uvu": "^0.5.0" + + } + + }, + + "micromark-util-symbol": { + + "version": "1.0.1", + + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", + + "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==" + + }, + + "micromark-util-types": { + + "version": "1.0.2", + + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", + + "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==" + + }, + + "mri": { + + "version": "1.2.0", + + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==" + + }, + + "ms": { + + "version": "2.1.2", + + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + + }, + + "node-domexception": { + + "version": "1.0.0", + + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + + }, + + "node-fetch": { + + "version": "3.3.1", + + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + + "requires": { + + "data-uri-to-buffer": "^4.0.0", + + "fetch-blob": "^3.1.4", + + "formdata-polyfill": "^4.0.10" + + } + + }, + + "optimist": { + + "version": "0.3.7", + + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + + "requires": { + + "wordwrap": "~0.0.2" + + } + + }, + + "parse5": { + + "version": "6.0.1", + + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + + }, + + "property-information": { + + "version": "6.2.0", + + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz", + + "integrity": "sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==" + + }, + + "remark-html": { + + "version": "15.0.2", + + "resolved": "https://registry.npmjs.org/remark-html/-/remark-html-15.0.2.tgz", + + "integrity": "sha512-/CIOI7wzHJzsh48AiuIyIe1clxVkUtreul73zcCXLub0FmnevQE0UMFDQm7NUx8/3rl/4zCshlMfqBdWScQthw==", + + "requires": { + + "@types/mdast": "^3.0.0", + + "hast-util-sanitize": "^4.0.0", + + "hast-util-to-html": "^8.0.0", + + "mdast-util-to-hast": "^12.0.0", + + "unified": "^10.0.0" + + } + + }, + + "remark-parse": { + + "version": "10.0.1", + + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.1.tgz", + + "integrity": "sha512-1fUyHr2jLsVOkhbvPRBJ5zTKZZyD6yZzYaWCS6BPBdQ8vEMBCH+9zNCDA6tET/zHCi/jLqjCWtlJZUPk+DbnFw==", + + "requires": { + + "@types/mdast": "^3.0.0", + + "mdast-util-from-markdown": "^1.0.0", + + "unified": "^10.0.0" + + } + + }, + + "require": { + + "version": "2.4.20", + + "resolved": "https://registry.npmjs.org/require/-/require-2.4.20.tgz", + + "integrity": "sha512-7eop5rvh38qhQQQOoUyf68meVIcxT2yFySNywTbxoEECgkX4KDqqDRaEszfvFnuB3fuZVjDdJZ1TI/Esr16RRA==", + + "requires": { + + "std": "0.1.40", + + "uglify-js": "2.3.0" + + } + + }, + + "sade": { + + "version": "1.8.1", + + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + + "requires": { + + "mri": "^1.1.0" + + } + + }, + + "source-map": { + + "version": "0.1.43", + + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + + "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==", + + "requires": { + + "amdefine": ">=0.0.4" + + } + + }, + + "space-separated-tokens": { + + "version": "2.0.2", + + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==" + + }, + + "std": { + + "version": "0.1.40", + + "resolved": "https://registry.npmjs.org/std/-/std-0.1.40.tgz", + + "integrity": "sha512-wUf57hkDGCoVShrhPA8Q7lAg2Qosk+FaMlECmAsr1A4/rL2NRXFHQGBcgMUFKVkPEemJFW9gzjCQisRty14ohg==" + + }, + + "stringify-entities": { + + "version": "4.0.3", + + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", + + "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", + + "requires": { + + "character-entities-html4": "^2.0.0", + + "character-entities-legacy": "^3.0.0" + + } + + }, + + "to-vfile": { + + "version": "7.2.4", + + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-7.2.4.tgz", + + "integrity": "sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==", + + "requires": { + + "is-buffer": "^2.0.0", + + "vfile": "^5.1.0" + + } + + }, + + "trim-lines": { + + "version": "3.0.1", + + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==" + + }, + + "trough": { + + "version": "2.1.0", + + "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", + + "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==" + + }, + + "uglify-js": { + + "version": "2.3.0", + + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.0.tgz", + + "integrity": "sha512-AQvbxRKdaQeYADywQaao0k8Tj+7NGEVTne6xwgX1yQpv/G8b0CKdIw70HkCptwfvNGDsVe+0Bng3U9hfWbxxfg==", + + "requires": { + + "async": "~0.2.6", + + "optimist": "~0.3.5", + + "source-map": "~0.1.7" + + } + + }, + + "unified": { + + "version": "10.1.2", + + "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", + + "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", + + "requires": { + + "@types/unist": "^2.0.0", + + "bail": "^2.0.0", + + "extend": "^3.0.0", + + "is-buffer": "^2.0.0", + + "is-plain-obj": "^4.0.0", + + "trough": "^2.0.0", + + "vfile": "^5.0.0" + + } + + }, + + "unist-util-generated": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", + + "integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==" + + }, + + "unist-util-is": { + + "version": "5.2.1", + + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + + "requires": { + + "@types/unist": "^2.0.0" + + } + + }, + + "unist-util-position": { + + "version": "4.0.4", + + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", + + "integrity": "sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==", + + "requires": { + + "@types/unist": "^2.0.0" + + } + + }, + + "unist-util-stringify-position": { + + "version": "3.0.3", + + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + + "requires": { + + "@types/unist": "^2.0.0" + + } + + }, + + "unist-util-visit": { + + "version": "4.1.2", + + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", + + "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", + + "requires": { + + "@types/unist": "^2.0.0", + + "unist-util-is": "^5.0.0", + + "unist-util-visit-parents": "^5.1.1" + + } + + }, + + "unist-util-visit-parents": { + + "version": "5.1.3", + + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + + "requires": { + + "@types/unist": "^2.0.0", + + "unist-util-is": "^5.0.0" + + } + + }, + + "uvu": { + + "version": "0.5.6", + + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", + + "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", + + "requires": { + + "dequal": "^2.0.0", + + "diff": "^5.0.0", + + "kleur": "^4.0.3", + + "sade": "^1.7.3" + + } + + }, + + "vfile": { + + "version": "5.3.7", + + "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", + + "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", + + "requires": { + + "@types/unist": "^2.0.0", + + "is-buffer": "^2.0.0", + + "unist-util-stringify-position": "^3.0.0", + + "vfile-message": "^3.0.0" + + } + + }, + + "vfile-location": { + + "version": "4.1.0", + + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-4.1.0.tgz", + + "integrity": "sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==", + + "requires": { + + "@types/unist": "^2.0.0", + + "vfile": "^5.0.0" + + } + + }, + + "vfile-message": { + + "version": "3.1.4", + + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", + + "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", + + "requires": { + + "@types/unist": "^2.0.0", + + "unist-util-stringify-position": "^3.0.0" + + } + + }, + + "web-namespaces": { + + "version": "2.0.1", + + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==" + + }, + + "web-streams-polyfill": { + + "version": "3.2.1", + + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" + + }, + + "whatwg-fetch": { + + "version": "3.6.2", + + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + + }, + + "wordwrap": { + + "version": "0.0.3", + + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==" + + }, + + "zwitch": { + + "version": "2.0.4", + + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==" + + } + + } + +} + diff --git a/snark-document-builder/src/main/nodejs/package.json b/snark-document-builder/src/main/nodejs/package.json new file mode 100644 index 0000000..4f0b1b3 --- /dev/null +++ b/snark-document-builder/src/main/nodejs/package.json @@ -0,0 +1,30 @@ +{ + + "type": "module", + + "dependencies": { + + "fs": "^0.0.1-security", + + "hast-util-to-html": "^8.0.4", + + "mdast-util-to-hast": "^12.3.0", + + "node-fetch": "^3.3.1", + + "remark-html": "^15.0.2", + + "remark-parse": "^10.0.1", + + "require": "^2.4.20", + + "to-vfile": "^7.2.4", + + "unified": "^10.1.2", + + "whatwg-fetch": "^3.6.2" + + } + +} + From e0ef373c485570fea1195f24f96cbc18f1644866 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Fri, 5 May 2023 00:07:59 +0300 Subject: [PATCH 25/34] SNRK-71: parseMd is implemented --- snark-document-builder/src/main/kotlin/MdParser.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 0f6d90b..8186b23 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -1,7 +1,16 @@ package documentBuilder +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue + +private val MARKDOWN_PARSER = "../nodejs/MarkdownParser.js" + public suspend fun parseMd(mdFile: ByteArray): MdAstRoot { - TODO() + return jacksonObjectMapper() + .readValue(ProcessBuilder("node", MARKDOWN_PARSER, mdFile.toString()) + .redirectOutput(ProcessBuilder.Redirect.PIPE) + .redirectError(ProcessBuilder.Redirect.INHERIT) + .start().inputStream.bufferedReader().readText()) } public suspend fun buildDependencyGraphNode(mdFile: ByteArray): DependencyGraphNode { From c112a74652a304c991cdb8a99fd37fb2ed390d0e Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Fri, 5 May 2023 00:21:20 +0300 Subject: [PATCH 26/34] SNRK-71: update after adding of path property --- snark-document-builder/src/main/kotlin/DocumentBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 6f92c77..c2d76c8 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -22,7 +22,7 @@ public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { } private suspend fun buildNodes(folder: Directory, nodes: HashMap) { - val pathString = folder.getPath().toString() + val pathString = folder.path.toString() assert(!nodes.containsKey(pathString)) From ff84d2e87b1f8e515144c61aeb1544d17f430900 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Fri, 5 May 2023 21:21:46 +0300 Subject: [PATCH 27/34] SNRK-71: buildDependencyNode is implemented --- .../src/main/kotlin/MdParser.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 8186b23..20243b0 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -14,5 +14,29 @@ public suspend fun parseMd(mdFile: ByteArray): MdAstRoot { } public suspend fun buildDependencyGraphNode(mdFile: ByteArray): DependencyGraphNode { + val treeRoot = parseMd(mdFile) + val dependencies = mutableListOf() + + fillDependencies(treeRoot, dependencies) + + return DependencyGraphNode(treeRoot, dependencies) +} + +private suspend fun fillDependencies( + currentNode: MdAstElement, + dependencies: MutableList) { + // when (currentNode) { + // is MdAstParent -> { + // val iterator = currentNode.children.listIterator() + + // while (iterator.hasNext()) { + + + // iterator.next() + // } + + // } + // else -> {} + // } TODO() } \ No newline at end of file From fdcf9c9c5b9610feea2693b43d97ab53372d7edb Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Fri, 5 May 2023 21:25:43 +0300 Subject: [PATCH 28/34] SNRK-70: IncludeDependency is changed --- snark-document-builder/src/main/kotlin/DependencyGraph.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DependencyGraph.kt b/snark-document-builder/src/main/kotlin/DependencyGraph.kt index bb00d47..dc0a8bc 100644 --- a/snark-document-builder/src/main/kotlin/DependencyGraph.kt +++ b/snark-document-builder/src/main/kotlin/DependencyGraph.kt @@ -25,12 +25,12 @@ public sealed interface DependencyGraphEdge { * Include dependency edge. * * @property parentNode - node inside AST tree, that is parent for dependent node. - * @property dependentNode - iterator to a dependent node, i.e. node of part of document with include commands + * @property dependentNode - dependent node, i.e. node of part of document with include commands * @property includeList - list of files to be included. */ public data class IncludeDependency( val parentNode: MdAstParent, - val dependentNode: Iterator, + val dependentNode: MdAstElement, val includeList: List ) : DependencyGraphEdge From 225b7346a8c5076ee49e0deefebd0546af5a9d65 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Fri, 5 May 2023 23:39:51 +0300 Subject: [PATCH 29/34] fillDependencies is implemented --- .../src/main/kotlin/DocumentBuilder.kt | 8 ++-- .../src/main/kotlin/MdParser.kt | 38 ++++++++++++------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index c2d76c8..6650197 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -13,7 +13,7 @@ public suspend fun buildDocument(documentDirectory: Directory) { TODO() /*resolving of dependencies*/ } -public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { +public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { val nodes = HashMap() buildNodes(root, nodes) @@ -23,11 +23,11 @@ public suspend fun buildDependencyGraph(root: Directory): DependencyGraph { private suspend fun buildNodes(folder: Directory, nodes: HashMap) { val pathString = folder.path.toString() - + assert(!nodes.containsKey(pathString)) val rootDcoument = folder.get(DEFAULT_DOCUMENT_ROOT) - nodes.put(pathString, buildDependencyGraphNode(rootDcoument.readAll())) + nodes.put(pathString, buildDependencyGraphNode(rootDcoument.readAll(), folder.path)) val dependencies = getDependencies(nodes.getValue(pathString)) @@ -39,7 +39,7 @@ private suspend fun buildNodes(folder: Directory, nodes: HashMap { val dependencies = mutableListOf() - + for (dependency in node.dependencies) { when (dependency) { is IncludeDependency -> dependencies.addAll(dependency.includeList) diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index 20243b0..bf4bc83 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -2,6 +2,7 @@ package documentBuilder import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fasterxml.jackson.module.kotlin.readValue +import java.nio.file.Path private val MARKDOWN_PARSER = "../nodejs/MarkdownParser.js" @@ -13,30 +14,39 @@ public suspend fun parseMd(mdFile: ByteArray): MdAstRoot { .start().inputStream.bufferedReader().readText()) } -public suspend fun buildDependencyGraphNode(mdFile: ByteArray): DependencyGraphNode { +public suspend fun buildDependencyGraphNode(mdFile: ByteArray, path: Path): DependencyGraphNode { val treeRoot = parseMd(mdFile) val dependencies = mutableListOf() - fillDependencies(treeRoot, dependencies) + fillDependencies(treeRoot, dependencies, path) return DependencyGraphNode(treeRoot, dependencies) } -private suspend fun fillDependencies( +internal suspend fun fillDependencies( currentNode: MdAstElement, - dependencies: MutableList) { - // when (currentNode) { - // is MdAstParent -> { - // val iterator = currentNode.children.listIterator() + dependencies: MutableList, + path: Path) { + when (currentNode) { + is MdAstParent -> { + for (child in currentNode.children) { + if (child is MdAstText) { + val includeList = getIncludeFiles(child.value).toMutableList() - // while (iterator.hasNext()) { + if (includeList.size > 0) { + includeList.replaceAll { path.toString() + "/" + it } + dependencies += IncludeDependency(currentNode, child, includeList) + } + } else { + fillDependencies(child, dependencies, path) + } + } + } + else -> {} + } +} - // iterator.next() - // } - - // } - // else -> {} - // } +public suspend fun getIncludeFiles(string: String): List { TODO() } \ No newline at end of file From 4019cbfe6bdca62d179f29f695fb15a35c5d7876 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sat, 6 May 2023 00:17:33 +0300 Subject: [PATCH 30/34] SnarkParser.py is added --- .../src/main/python/SnarkParser.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 snark-document-builder/src/main/python/SnarkParser.py diff --git a/snark-document-builder/src/main/python/SnarkParser.py b/snark-document-builder/src/main/python/SnarkParser.py new file mode 100644 index 0000000..fb71d7f --- /dev/null +++ b/snark-document-builder/src/main/python/SnarkParser.py @@ -0,0 +1,26 @@ +import sys +import re +import json + +assert(len(sys.argv) >= 2) + +string = sys.argv[1] + +outputfile = sys.argv[2] if len(sys.argv) >= 3 else None + +pattern = r'^([\n|\t| ]*@include\([a-z|0-9|.|_]*.md\)[\n|\t| ]*)*$' + +files = [] + +if re.search("@include", string, re.IGNORECASE): + if re.match(pattern, string): + matches = re.findall(r'@include\((.*?)\)', string) + files.extend(matches) + else: + sys.exit("Illformed string") + +if outputfile is None: + print(json.dumps(files)) +else: + with open(outputfile, 'w+') as f: + json.dump(files, f) \ No newline at end of file From 778e58fc63260cdde415aa5552a57440437a50db Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sat, 6 May 2023 01:33:26 +0300 Subject: [PATCH 31/34] SNRK-71: getIncludeFiles is implemented --- snark-document-builder/src/main/kotlin/MdParser.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/snark-document-builder/src/main/kotlin/MdParser.kt b/snark-document-builder/src/main/kotlin/MdParser.kt index bf4bc83..d1ffe45 100644 --- a/snark-document-builder/src/main/kotlin/MdParser.kt +++ b/snark-document-builder/src/main/kotlin/MdParser.kt @@ -5,6 +5,7 @@ import com.fasterxml.jackson.module.kotlin.readValue import java.nio.file.Path private val MARKDOWN_PARSER = "../nodejs/MarkdownParser.js" +private val SNARK_PARSER = "../python/SnarkParse.py" public suspend fun parseMd(mdFile: ByteArray): MdAstRoot { return jacksonObjectMapper() @@ -48,5 +49,9 @@ internal suspend fun fillDependencies( } public suspend fun getIncludeFiles(string: String): List { - TODO() + return jacksonObjectMapper() + .readValue>(ProcessBuilder("python3", SNARK_PARSER, string) + .redirectOutput(ProcessBuilder.Redirect.PIPE) + .redirectError(ProcessBuilder.Redirect.INHERIT) + .start().inputStream.bufferedReader().readText()) } \ No newline at end of file From 234dd279f05cad129d981e0602c04ac4fc197e73 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sat, 6 May 2023 17:58:51 +0300 Subject: [PATCH 32/34] SNARK-71: better folder naming --- snark-document-builder/src/test/{example => resources}/main.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename snark-document-builder/src/test/{example => resources}/main.md (100%) diff --git a/snark-document-builder/src/test/example/main.md b/snark-document-builder/src/test/resources/main.md similarity index 100% rename from snark-document-builder/src/test/example/main.md rename to snark-document-builder/src/test/resources/main.md From 19a023190f5f0400c7b12ed728008a85f9f2cb9a Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sat, 6 May 2023 18:00:12 +0300 Subject: [PATCH 33/34] SNRK-71: better test document --- snark-document-builder/src/test/resources/main.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snark-document-builder/src/test/resources/main.md b/snark-document-builder/src/test/resources/main.md index e69de29..b068642 100644 --- a/snark-document-builder/src/test/resources/main.md +++ b/snark-document-builder/src/test/resources/main.md @@ -0,0 +1,3 @@ +# Hello + +I'm almost empty test document without any dependencies \ No newline at end of file From 33b4c56e4f4faa1151c90359d7e78a21a5268f64 Mon Sep 17 00:00:00 2001 From: "liubar.pa" Date: Sat, 6 May 2023 18:05:36 +0300 Subject: [PATCH 34/34] SNRK-71: subfolder for example is added --- .../src/test/resources/{ => no_dependencies_example}/main.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename snark-document-builder/src/test/resources/{ => no_dependencies_example}/main.md (100%) diff --git a/snark-document-builder/src/test/resources/main.md b/snark-document-builder/src/test/resources/no_dependencies_example/main.md similarity index 100% rename from snark-document-builder/src/test/resources/main.md rename to snark-document-builder/src/test/resources/no_dependencies_example/main.md