fix(core): update

This commit is contained in:
Philipp Kunz 2022-05-20 16:03:35 +02:00
parent 23f2cc9e6d
commit 92a1b589e7
7 changed files with 542 additions and 63 deletions

504
package-lock.json generated
View File

@ -9,12 +9,16 @@
"version": "2.0.13", "version": "2.0.13",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@pushrocks/smartyaml": "^2.0.5",
"@types/turndown": "^5.0.1", "@types/turndown": "^5.0.1",
"remark": "^14.0.2",
"remark-frontmatter": "^4.0.1", "remark-frontmatter": "^4.0.1",
"remark-gfm": "^3.0.1",
"remark-html": "^15.0.1", "remark-html": "^15.0.1",
"remark-parse": "^10.0.1",
"remark-stringify": "^10.0.2",
"turndown": "^7.1.1", "turndown": "^7.1.1",
"turndown-plugin-gfm": "^1.0.2" "turndown-plugin-gfm": "^1.0.2",
"unified": "^10.1.2"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.61", "@gitzone/tsbuild": "^2.1.61",
@ -906,7 +910,6 @@
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartyaml/-/smartyaml-2.0.5.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartyaml/-/smartyaml-2.0.5.tgz",
"integrity": "sha512-nJGqvJ56vAst5evLqaPYQ4mO5uJVnXVlriyL3D6s89YMUoWGS3qj/jK+V8hDgznFCnd46pNjnc0GfQBCDpZ6eg==", "integrity": "sha512-nJGqvJ56vAst5evLqaPYQ4mO5uJVnXVlriyL3D6s89YMUoWGS3qj/jK+V8hDgznFCnd46pNjnc0GfQBCDpZ6eg==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/js-yaml": "^3.12.5", "@types/js-yaml": "^3.12.5",
@ -917,14 +920,12 @@
"version": "3.12.7", "version": "3.12.7",
"resolved": "https://verdaccio.lossless.one/@types%2fjs-yaml/-/js-yaml-3.12.7.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fjs-yaml/-/js-yaml-3.12.7.tgz",
"integrity": "sha512-S6+8JAYTE1qdsc9HMVsfY7+SgSuUU/Tp6TYTmITW0PZxiyIMvol3Gy//y69Wkhs0ti4py5qgR3uZH6uz/DNzJQ==", "integrity": "sha512-S6+8JAYTE1qdsc9HMVsfY7+SgSuUU/Tp6TYTmITW0PZxiyIMvol3Gy//y69Wkhs0ti4py5qgR3uZH6uz/DNzJQ==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@pushrocks/smartyaml/node_modules/argparse": { "node_modules/@pushrocks/smartyaml/node_modules/argparse": {
"version": "1.0.10", "version": "1.0.10",
"resolved": "https://verdaccio.lossless.one/argparse/-/argparse-1.0.10.tgz", "resolved": "https://verdaccio.lossless.one/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"sprintf-js": "~1.0.2" "sprintf-js": "~1.0.2"
@ -934,7 +935,6 @@
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"argparse": "^1.0.7", "argparse": "^1.0.7",
@ -3019,7 +3019,6 @@
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://verdaccio.lossless.one/esprima/-/esprima-4.0.1.tgz", "resolved": "https://verdaccio.lossless.one/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true,
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"bin": { "bin": {
"esparse": "bin/esparse.js", "esparse": "bin/esparse.js",
@ -4237,6 +4236,16 @@
"make-error": "^1.3.5" "make-error": "^1.3.5"
} }
}, },
"node_modules/markdown-table": {
"version": "3.0.2",
"resolved": "https://verdaccio.lossless.one/markdown-table/-/markdown-table-3.0.2.tgz",
"integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA==",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/matcher": { "node_modules/matcher": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/matcher/-/matcher-3.0.0.tgz", "resolved": "https://verdaccio.lossless.one/matcher/-/matcher-3.0.0.tgz",
@ -4301,6 +4310,33 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/mdast-util-find-and-replace": {
"version": "2.2.0",
"resolved": "https://verdaccio.lossless.one/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.0.tgz",
"integrity": "sha512-bz8hUWkMX7UcasORORcyBEsTKJ+dBiFwRPrm43hHC9NMRylIMLbfO5rwfeCN+UtY4AAi7s8WqXftb9eX6ZsqCg==",
"license": "MIT",
"dependencies": {
"escape-string-regexp": "^5.0.0",
"unist-util-is": "^5.0.0",
"unist-util-visit-parents": "^5.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mdast-util-from-markdown": { "node_modules/mdast-util-from-markdown": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://verdaccio.lossless.one/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz", "resolved": "https://verdaccio.lossless.one/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz",
@ -4338,6 +4374,99 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/mdast-util-gfm": {
"version": "2.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm/-/mdast-util-gfm-2.0.1.tgz",
"integrity": "sha512-42yHBbfWIFisaAfV1eixlabbsa6q7vHeSPY+cg+BBjX51M8xhgMacqH9g6TftB/9+YkcI0ooV4ncfrJslzm/RQ==",
"license": "MIT",
"dependencies": {
"mdast-util-from-markdown": "^1.0.0",
"mdast-util-gfm-autolink-literal": "^1.0.0",
"mdast-util-gfm-footnote": "^1.0.0",
"mdast-util-gfm-strikethrough": "^1.0.0",
"mdast-util-gfm-table": "^1.0.0",
"mdast-util-gfm-task-list-item": "^1.0.0",
"mdast-util-to-markdown": "^1.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-autolink-literal": {
"version": "1.0.2",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz",
"integrity": "sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^3.0.0",
"ccount": "^2.0.0",
"mdast-util-find-and-replace": "^2.0.0",
"micromark-util-character": "^1.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-footnote": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.1.tgz",
"integrity": "sha512-p+PrYlkw9DeCRkTVw1duWqPRHX6Ywh2BNKJQcZbCwAuP/59B0Lk9kakuAd7KbQprVO4GzdW8eS5++A9PUSqIyw==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^3.0.0",
"mdast-util-to-markdown": "^1.3.0",
"micromark-util-normalize-identifier": "^1.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-strikethrough": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.1.tgz",
"integrity": "sha512-zKJbEPe+JP6EUv0mZ0tQUyLQOC+FADt0bARldONot/nefuISkaZFlmVK4tU6JgfyZGrky02m/I6PmehgAgZgqg==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^3.0.0",
"mdast-util-to-markdown": "^1.3.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-table": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.4.tgz",
"integrity": "sha512-aEuoPwZyP4iIMkf2cLWXxx3EQ6Bmh2yKy9MVCg4i6Sd3cX80dcLEfXO/V4ul3pGH9czBK4kp+FAl+ZHmSUt9/w==",
"license": "MIT",
"dependencies": {
"markdown-table": "^3.0.0",
"mdast-util-from-markdown": "^1.0.0",
"mdast-util-to-markdown": "^1.3.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-gfm-task-list-item": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.1.tgz",
"integrity": "sha512-KZ4KLmPdABXOsfnM6JHUIjxEvcx2ulk656Z/4Balw071/5qgnhz+H1uGtf2zIGnrnvDC8xR4Fj9uKbjAFGNIeA==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^3.0.0",
"mdast-util-to-markdown": "^1.3.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-to-hast": { "node_modules/mdast-util-to-hast": {
"version": "12.1.1", "version": "12.1.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-to-hast/-/mdast-util-to-hast-12.1.1.tgz", "resolved": "https://verdaccio.lossless.one/mdast-util-to-hast/-/mdast-util-to-hast-12.1.1.tgz",
@ -4506,6 +4635,128 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/micromark-extension-gfm": {
"version": "2.0.1",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm/-/micromark-extension-gfm-2.0.1.tgz",
"integrity": "sha512-p2sGjajLa0iYiGQdT0oelahRYtMWvLjy8J9LOCxzIQsllMCGLbsLW+Nc+N4vi02jcRJvedVJ68cjelKIO6bpDA==",
"license": "MIT",
"dependencies": {
"micromark-extension-gfm-autolink-literal": "^1.0.0",
"micromark-extension-gfm-footnote": "^1.0.0",
"micromark-extension-gfm-strikethrough": "^1.0.0",
"micromark-extension-gfm-table": "^1.0.0",
"micromark-extension-gfm-tagfilter": "^1.0.0",
"micromark-extension-gfm-task-list-item": "^1.0.0",
"micromark-util-combine-extensions": "^1.0.0",
"micromark-util-types": "^1.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-autolink-literal": {
"version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.3.tgz",
"integrity": "sha512-i3dmvU0htawfWED8aHMMAzAVp/F0Z+0bPh3YrbTPPL1v4YAlCZpy5rBO5p0LPYiZo0zFVkoYh7vDU7yQSiCMjg==",
"license": "MIT",
"dependencies": {
"micromark-util-character": "^1.0.0",
"micromark-util-sanitize-uri": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0",
"uvu": "^0.5.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-footnote": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.0.4.tgz",
"integrity": "sha512-E/fmPmDqLiMUP8mLJ8NbJWJ4bTw6tS+FEQS8CcuDtZpILuOb2kjLqPEeAePF1djXROHXChM/wPJw0iS4kHCcIg==",
"license": "MIT",
"dependencies": {
"micromark-core-commonmark": "^1.0.0",
"micromark-factory-space": "^1.0.0",
"micromark-util-character": "^1.0.0",
"micromark-util-normalize-identifier": "^1.0.0",
"micromark-util-sanitize-uri": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0",
"uvu": "^0.5.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-strikethrough": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.4.tgz",
"integrity": "sha512-/vjHU/lalmjZCT5xt7CcHVJGq8sYRm80z24qAKXzaHzem/xsDYb2yLL+NNVbYvmpLx3O7SYPuGL5pzusL9CLIQ==",
"license": "MIT",
"dependencies": {
"micromark-util-chunked": "^1.0.0",
"micromark-util-classify-character": "^1.0.0",
"micromark-util-resolve-all": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0",
"uvu": "^0.5.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-table": {
"version": "1.0.5",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.5.tgz",
"integrity": "sha512-xAZ8J1X9W9K3JTJTUL7G6wSKhp2ZYHrFk5qJgY/4B33scJzE2kpfRL6oiw/veJTbt7jiM/1rngLlOKPWr1G+vg==",
"license": "MIT",
"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"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-tagfilter": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.1.tgz",
"integrity": "sha512-Ty6psLAcAjboRa/UKUbbUcwjVAv5plxmpUTy2XC/3nJFL37eHej8jrHrRzkqcpipJliuBH30DTs7+3wqNcQUVA==",
"license": "MIT",
"dependencies": {
"micromark-util-types": "^1.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-extension-gfm-task-list-item": {
"version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.3.tgz",
"integrity": "sha512-PpysK2S1Q/5VXi72IIapbi/jliaiOFzv7THH4amwXeYXLq3l1uo8/2Be0Ac1rEwK20MQEsGH2ltAZLNY2KI/0Q==",
"license": "MIT",
"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"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/micromark-factory-destination": { "node_modules/micromark-factory-destination": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", "resolved": "https://verdaccio.lossless.one/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz",
@ -5625,22 +5876,6 @@
"node": ">= 0.10" "node": ">= 0.10"
} }
}, },
"node_modules/remark": {
"version": "14.0.2",
"resolved": "https://verdaccio.lossless.one/remark/-/remark-14.0.2.tgz",
"integrity": "sha512-A3ARm2V4BgiRXaUo5K0dRvJ1lbogrbXnhkJRmD0yw092/Yl0kOCZt1k9ZeElEwkZsWGsMumz6qL5MfNJH9nOBA==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^3.0.0",
"remark-parse": "^10.0.0",
"remark-stringify": "^10.0.0",
"unified": "^10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/remark-frontmatter": { "node_modules/remark-frontmatter": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://verdaccio.lossless.one/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", "resolved": "https://verdaccio.lossless.one/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz",
@ -5657,6 +5892,22 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/remark-gfm": {
"version": "3.0.1",
"resolved": "https://verdaccio.lossless.one/remark-gfm/-/remark-gfm-3.0.1.tgz",
"integrity": "sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==",
"license": "MIT",
"dependencies": {
"@types/mdast": "^3.0.0",
"mdast-util-gfm": "^2.0.0",
"micromark-extension-gfm": "^2.0.0",
"unified": "^10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/remark-html": { "node_modules/remark-html": {
"version": "15.0.1", "version": "15.0.1",
"resolved": "https://verdaccio.lossless.one/remark-html/-/remark-html-15.0.1.tgz", "resolved": "https://verdaccio.lossless.one/remark-html/-/remark-html-15.0.1.tgz",
@ -6070,7 +6321,6 @@
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/sprintf-js/-/sprintf-js-1.0.3.tgz", "resolved": "https://verdaccio.lossless.one/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true,
"license": "BSD-3-Clause" "license": "BSD-3-Clause"
}, },
"node_modules/statuses": { "node_modules/statuses": {
@ -7984,7 +8234,6 @@
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartyaml/-/smartyaml-2.0.5.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartyaml/-/smartyaml-2.0.5.tgz",
"integrity": "sha512-nJGqvJ56vAst5evLqaPYQ4mO5uJVnXVlriyL3D6s89YMUoWGS3qj/jK+V8hDgznFCnd46pNjnc0GfQBCDpZ6eg==", "integrity": "sha512-nJGqvJ56vAst5evLqaPYQ4mO5uJVnXVlriyL3D6s89YMUoWGS3qj/jK+V8hDgznFCnd46pNjnc0GfQBCDpZ6eg==",
"dev": true,
"requires": { "requires": {
"@types/js-yaml": "^3.12.5", "@types/js-yaml": "^3.12.5",
"js-yaml": "^3.14.0" "js-yaml": "^3.14.0"
@ -7993,14 +8242,12 @@
"@types/js-yaml": { "@types/js-yaml": {
"version": "3.12.7", "version": "3.12.7",
"resolved": "https://verdaccio.lossless.one/@types%2fjs-yaml/-/js-yaml-3.12.7.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fjs-yaml/-/js-yaml-3.12.7.tgz",
"integrity": "sha512-S6+8JAYTE1qdsc9HMVsfY7+SgSuUU/Tp6TYTmITW0PZxiyIMvol3Gy//y69Wkhs0ti4py5qgR3uZH6uz/DNzJQ==", "integrity": "sha512-S6+8JAYTE1qdsc9HMVsfY7+SgSuUU/Tp6TYTmITW0PZxiyIMvol3Gy//y69Wkhs0ti4py5qgR3uZH6uz/DNzJQ=="
"dev": true
}, },
"argparse": { "argparse": {
"version": "1.0.10", "version": "1.0.10",
"resolved": "https://verdaccio.lossless.one/argparse/-/argparse-1.0.10.tgz", "resolved": "https://verdaccio.lossless.one/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"requires": { "requires": {
"sprintf-js": "~1.0.2" "sprintf-js": "~1.0.2"
} }
@ -8009,7 +8256,6 @@
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"requires": { "requires": {
"argparse": "^1.0.7", "argparse": "^1.0.7",
"esprima": "^4.0.0" "esprima": "^4.0.0"
@ -9427,8 +9673,7 @@
"esprima": { "esprima": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://verdaccio.lossless.one/esprima/-/esprima-4.0.1.tgz", "resolved": "https://verdaccio.lossless.one/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
"dev": true
}, },
"etag": { "etag": {
"version": "1.8.1", "version": "1.8.1",
@ -10296,6 +10541,11 @@
"make-error": "^1.3.5" "make-error": "^1.3.5"
} }
}, },
"markdown-table": {
"version": "3.0.2",
"resolved": "https://verdaccio.lossless.one/markdown-table/-/markdown-table-3.0.2.tgz",
"integrity": "sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA=="
},
"matcher": { "matcher": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/matcher/-/matcher-3.0.0.tgz", "resolved": "https://verdaccio.lossless.one/matcher/-/matcher-3.0.0.tgz",
@ -10342,6 +10592,23 @@
} }
} }
}, },
"mdast-util-find-and-replace": {
"version": "2.2.0",
"resolved": "https://verdaccio.lossless.one/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.0.tgz",
"integrity": "sha512-bz8hUWkMX7UcasORORcyBEsTKJ+dBiFwRPrm43hHC9NMRylIMLbfO5rwfeCN+UtY4AAi7s8WqXftb9eX6ZsqCg==",
"requires": {
"escape-string-regexp": "^5.0.0",
"unist-util-is": "^5.0.0",
"unist-util-visit-parents": "^5.0.0"
},
"dependencies": {
"escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="
}
}
},
"mdast-util-from-markdown": { "mdast-util-from-markdown": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://verdaccio.lossless.one/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz", "resolved": "https://verdaccio.lossless.one/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz",
@ -10369,6 +10636,69 @@
"micromark-extension-frontmatter": "^1.0.0" "micromark-extension-frontmatter": "^1.0.0"
} }
}, },
"mdast-util-gfm": {
"version": "2.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm/-/mdast-util-gfm-2.0.1.tgz",
"integrity": "sha512-42yHBbfWIFisaAfV1eixlabbsa6q7vHeSPY+cg+BBjX51M8xhgMacqH9g6TftB/9+YkcI0ooV4ncfrJslzm/RQ==",
"requires": {
"mdast-util-from-markdown": "^1.0.0",
"mdast-util-gfm-autolink-literal": "^1.0.0",
"mdast-util-gfm-footnote": "^1.0.0",
"mdast-util-gfm-strikethrough": "^1.0.0",
"mdast-util-gfm-table": "^1.0.0",
"mdast-util-gfm-task-list-item": "^1.0.0",
"mdast-util-to-markdown": "^1.0.0"
}
},
"mdast-util-gfm-autolink-literal": {
"version": "1.0.2",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz",
"integrity": "sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg==",
"requires": {
"@types/mdast": "^3.0.0",
"ccount": "^2.0.0",
"mdast-util-find-and-replace": "^2.0.0",
"micromark-util-character": "^1.0.0"
}
},
"mdast-util-gfm-footnote": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.1.tgz",
"integrity": "sha512-p+PrYlkw9DeCRkTVw1duWqPRHX6Ywh2BNKJQcZbCwAuP/59B0Lk9kakuAd7KbQprVO4GzdW8eS5++A9PUSqIyw==",
"requires": {
"@types/mdast": "^3.0.0",
"mdast-util-to-markdown": "^1.3.0",
"micromark-util-normalize-identifier": "^1.0.0"
}
},
"mdast-util-gfm-strikethrough": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.1.tgz",
"integrity": "sha512-zKJbEPe+JP6EUv0mZ0tQUyLQOC+FADt0bARldONot/nefuISkaZFlmVK4tU6JgfyZGrky02m/I6PmehgAgZgqg==",
"requires": {
"@types/mdast": "^3.0.0",
"mdast-util-to-markdown": "^1.3.0"
}
},
"mdast-util-gfm-table": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.4.tgz",
"integrity": "sha512-aEuoPwZyP4iIMkf2cLWXxx3EQ6Bmh2yKy9MVCg4i6Sd3cX80dcLEfXO/V4ul3pGH9czBK4kp+FAl+ZHmSUt9/w==",
"requires": {
"markdown-table": "^3.0.0",
"mdast-util-from-markdown": "^1.0.0",
"mdast-util-to-markdown": "^1.3.0"
}
},
"mdast-util-gfm-task-list-item": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.1.tgz",
"integrity": "sha512-KZ4KLmPdABXOsfnM6JHUIjxEvcx2ulk656Z/4Balw071/5qgnhz+H1uGtf2zIGnrnvDC8xR4Fj9uKbjAFGNIeA==",
"requires": {
"@types/mdast": "^3.0.0",
"mdast-util-to-markdown": "^1.3.0"
}
},
"mdast-util-to-hast": { "mdast-util-to-hast": {
"version": "12.1.1", "version": "12.1.1",
"resolved": "https://verdaccio.lossless.one/mdast-util-to-hast/-/mdast-util-to-hast-12.1.1.tgz", "resolved": "https://verdaccio.lossless.one/mdast-util-to-hast/-/mdast-util-to-hast-12.1.1.tgz",
@ -10485,6 +10815,93 @@
"micromark-util-symbol": "^1.0.0" "micromark-util-symbol": "^1.0.0"
} }
}, },
"micromark-extension-gfm": {
"version": "2.0.1",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm/-/micromark-extension-gfm-2.0.1.tgz",
"integrity": "sha512-p2sGjajLa0iYiGQdT0oelahRYtMWvLjy8J9LOCxzIQsllMCGLbsLW+Nc+N4vi02jcRJvedVJ68cjelKIO6bpDA==",
"requires": {
"micromark-extension-gfm-autolink-literal": "^1.0.0",
"micromark-extension-gfm-footnote": "^1.0.0",
"micromark-extension-gfm-strikethrough": "^1.0.0",
"micromark-extension-gfm-table": "^1.0.0",
"micromark-extension-gfm-tagfilter": "^1.0.0",
"micromark-extension-gfm-task-list-item": "^1.0.0",
"micromark-util-combine-extensions": "^1.0.0",
"micromark-util-types": "^1.0.0"
}
},
"micromark-extension-gfm-autolink-literal": {
"version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.3.tgz",
"integrity": "sha512-i3dmvU0htawfWED8aHMMAzAVp/F0Z+0bPh3YrbTPPL1v4YAlCZpy5rBO5p0LPYiZo0zFVkoYh7vDU7yQSiCMjg==",
"requires": {
"micromark-util-character": "^1.0.0",
"micromark-util-sanitize-uri": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0",
"uvu": "^0.5.0"
}
},
"micromark-extension-gfm-footnote": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.0.4.tgz",
"integrity": "sha512-E/fmPmDqLiMUP8mLJ8NbJWJ4bTw6tS+FEQS8CcuDtZpILuOb2kjLqPEeAePF1djXROHXChM/wPJw0iS4kHCcIg==",
"requires": {
"micromark-core-commonmark": "^1.0.0",
"micromark-factory-space": "^1.0.0",
"micromark-util-character": "^1.0.0",
"micromark-util-normalize-identifier": "^1.0.0",
"micromark-util-sanitize-uri": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0",
"uvu": "^0.5.0"
}
},
"micromark-extension-gfm-strikethrough": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.4.tgz",
"integrity": "sha512-/vjHU/lalmjZCT5xt7CcHVJGq8sYRm80z24qAKXzaHzem/xsDYb2yLL+NNVbYvmpLx3O7SYPuGL5pzusL9CLIQ==",
"requires": {
"micromark-util-chunked": "^1.0.0",
"micromark-util-classify-character": "^1.0.0",
"micromark-util-resolve-all": "^1.0.0",
"micromark-util-symbol": "^1.0.0",
"micromark-util-types": "^1.0.0",
"uvu": "^0.5.0"
}
},
"micromark-extension-gfm-table": {
"version": "1.0.5",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.5.tgz",
"integrity": "sha512-xAZ8J1X9W9K3JTJTUL7G6wSKhp2ZYHrFk5qJgY/4B33scJzE2kpfRL6oiw/veJTbt7jiM/1rngLlOKPWr1G+vg==",
"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-extension-gfm-tagfilter": {
"version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.1.tgz",
"integrity": "sha512-Ty6psLAcAjboRa/UKUbbUcwjVAv5plxmpUTy2XC/3nJFL37eHej8jrHrRzkqcpipJliuBH30DTs7+3wqNcQUVA==",
"requires": {
"micromark-util-types": "^1.0.0"
}
},
"micromark-extension-gfm-task-list-item": {
"version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.3.tgz",
"integrity": "sha512-PpysK2S1Q/5VXi72IIapbi/jliaiOFzv7THH4amwXeYXLq3l1uo8/2Be0Ac1rEwK20MQEsGH2ltAZLNY2KI/0Q==",
"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-destination": { "micromark-factory-destination": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", "resolved": "https://verdaccio.lossless.one/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz",
@ -11148,17 +11565,6 @@
"integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
"dev": true "dev": true
}, },
"remark": {
"version": "14.0.2",
"resolved": "https://verdaccio.lossless.one/remark/-/remark-14.0.2.tgz",
"integrity": "sha512-A3ARm2V4BgiRXaUo5K0dRvJ1lbogrbXnhkJRmD0yw092/Yl0kOCZt1k9ZeElEwkZsWGsMumz6qL5MfNJH9nOBA==",
"requires": {
"@types/mdast": "^3.0.0",
"remark-parse": "^10.0.0",
"remark-stringify": "^10.0.0",
"unified": "^10.0.0"
}
},
"remark-frontmatter": { "remark-frontmatter": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://verdaccio.lossless.one/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", "resolved": "https://verdaccio.lossless.one/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz",
@ -11170,6 +11576,17 @@
"unified": "^10.0.0" "unified": "^10.0.0"
} }
}, },
"remark-gfm": {
"version": "3.0.1",
"resolved": "https://verdaccio.lossless.one/remark-gfm/-/remark-gfm-3.0.1.tgz",
"integrity": "sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==",
"requires": {
"@types/mdast": "^3.0.0",
"mdast-util-gfm": "^2.0.0",
"micromark-extension-gfm": "^2.0.0",
"unified": "^10.0.0"
}
},
"remark-html": { "remark-html": {
"version": "15.0.1", "version": "15.0.1",
"resolved": "https://verdaccio.lossless.one/remark-html/-/remark-html-15.0.1.tgz", "resolved": "https://verdaccio.lossless.one/remark-html/-/remark-html-15.0.1.tgz",
@ -11486,8 +11903,7 @@
"sprintf-js": { "sprintf-js": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/sprintf-js/-/sprintf-js-1.0.3.tgz", "resolved": "https://verdaccio.lossless.one/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
"dev": true
}, },
"statuses": { "statuses": {
"version": "2.0.1", "version": "2.0.1",

View File

@ -22,12 +22,16 @@
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartyaml": "^2.0.5",
"@types/turndown": "^5.0.1", "@types/turndown": "^5.0.1",
"remark": "^14.0.2",
"remark-frontmatter": "^4.0.1", "remark-frontmatter": "^4.0.1",
"remark-gfm": "^3.0.1",
"remark-html": "^15.0.1", "remark-html": "^15.0.1",
"remark-parse": "^10.0.1",
"remark-stringify": "^10.0.2",
"turndown": "^7.1.1", "turndown": "^7.1.1",
"turndown-plugin-gfm": "^1.0.2" "turndown-plugin-gfm": "^1.0.2",
"unified": "^10.1.2"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

View File

@ -10,10 +10,24 @@ tap.test('should create a valid instance of SmartMarkdown', async () => {
tap.test('should convert a markdown string to html', async () => { tap.test('should convert a markdown string to html', async () => {
const markdownString = '# Hi!'; const markdownString = '# Hi!';
const htmlString = await smartMarkdownInstance.markdownToHtml(markdownString); const mdParsedResult = await smartMarkdownInstance.getMdParsedResultFromMarkdown(markdownString);
const htmlString = mdParsedResult.html;
expect(htmlString).toEqual('<h1>Hi!</h1>\n'); expect(htmlString).toEqual('<h1>Hi!</h1>\n');
}); });
tap.test('should get frontmatter', async () => {
const markdownString = `---
hello: yes
---
# hello there
`;
const mdParsedResult = await smartMarkdownInstance.getMdParsedResultFromMarkdown(markdownString);
expect(mdParsedResult.frontmatterData.hello).toEqual('yes');
});
tap.test('should convert a html string to markdown', async () => { tap.test('should convert a html string to markdown', async () => {
const htmlString = '<h1 id="hi">Hi!</h1>\n<h2>This is it!</h2>'; const htmlString = '<h1 id="hi">Hi!</h1>\n<h2>This is it!</h2>';
const markdownString = smartMarkdownInstance.htmlToMarkdown(htmlString); const markdownString = smartMarkdownInstance.htmlToMarkdown(htmlString);

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartmarkdown', name: '@pushrocks/smartmarkdown',
version: '2.0.13', version: '2.0.14',
description: 'do more with markdown files' description: 'do more with markdown files'
} }

View File

@ -1,20 +1,17 @@
import * as plugins from './smartmarkdown.plugins.js'; import * as plugins from './smartmarkdown.plugins.js';
import { MdParsedResult } from './smartmarkdown.classes.mdparsedresult.js';
export class SmartMarkdown { export class SmartMarkdown {
constructor() {} constructor() {}
/** /**
* converts markdown to html * create a MdParsedResult from markdown
* @param mdString * @param mdStringArg
*/ */
public async markdownToHtml(mdString: string): Promise<string> { public async getMdParsedResultFromMarkdown(mdStringArg: string): Promise<MdParsedResult> {
const result = await plugins const result = await MdParsedResult.createFromMarkdownString(mdStringArg);
.remark.remark() return result;
.use(plugins.remarkHtml.default) };
.use(plugins.remarkFrontmatter.default, ['yaml', 'toml'])
.process(mdString);
return result.toString();
}
public htmlToMarkdown(htmlString: string): string { public htmlToMarkdown(htmlString: string): string {
const turndownInstance = new plugins.turndown({ const turndownInstance = new plugins.turndown({

View File

@ -0,0 +1,38 @@
import * as plugins from './smartmarkdown.plugins.js';
export class MdParsedResult {
public static async createFromMarkdownString(mdStringArg: string): Promise<MdParsedResult> {
const mdParsedResult = new MdParsedResult();
await mdParsedResult.updateFromMarkdownString(mdStringArg);
return mdParsedResult;
}
public originalString: string;
public title: string;
public html: string;
public frontmatterData: {[key: string]: any};
public async updateFromMarkdownString(mdStringArg: string) {
let yamlString: string;
const result = await plugins.unified()
.use(plugins.remarkParse)
.use(plugins.remarkGfm)
.use(plugins.remarkFrontmatter, ['yaml', 'toml'])
.use(plugins.remarkStringify)
.use(plugins.remarkHtml)
.use(() => (tree) => {
console.dir(tree);
const yamlChild = tree.children.find(objectArg => objectArg.type === 'yaml');
if (yamlChild) {
yamlString = (yamlChild as any).value;
}
})
.process(mdStringArg);
this.html = result.toString();
if (yamlString) {
this.frontmatterData = await plugins.smartyaml.yamlStringToObject(yamlString);
} else {
this.frontmatterData = {};
}
}
}

View File

@ -1,9 +1,19 @@
// third party remark // pushrocks scope
import * as remark from 'remark'; import * as smartyaml from '@pushrocks/smartyaml';
import * as remarkFrontmatter from 'remark-frontmatter';
import * as remarkHtml from 'remark-html';
export { remark, remarkFrontmatter, remarkHtml }; export {
smartyaml
}
// third party remark
import { unified } from 'unified';
import remarkGfm from 'remark-gfm';
import remarkParse from 'remark-parse';
import remarkFrontmatter from 'remark-frontmatter';
import remarkHtml from 'remark-html';
import remarkStringify from 'remark-stringify';
export { unified, remarkGfm, remarkParse, remarkFrontmatter, remarkHtml, remarkStringify };
// other third party stuff // other third party stuff
import turndown from 'turndown'; import turndown from 'turndown';