@tiangong-lca/pcr 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1282) hide show
  1. package/README.md +8 -4
  2. package/node_modules/@types/debug/LICENSE +21 -0
  3. package/node_modules/@types/debug/README.md +69 -0
  4. package/node_modules/@types/debug/index.d.ts +50 -0
  5. package/node_modules/@types/debug/package.json +58 -0
  6. package/node_modules/@types/mdast/LICENSE +21 -0
  7. package/node_modules/@types/mdast/README.md +15 -0
  8. package/node_modules/@types/mdast/index.d.ts +1123 -0
  9. package/node_modules/@types/mdast/package.json +47 -0
  10. package/node_modules/@types/ms/LICENSE +21 -0
  11. package/node_modules/@types/ms/README.md +82 -0
  12. package/node_modules/@types/ms/index.d.ts +63 -0
  13. package/node_modules/@types/ms/package.json +26 -0
  14. package/node_modules/@types/unist/LICENSE +21 -0
  15. package/node_modules/@types/unist/README.md +15 -0
  16. package/node_modules/@types/unist/index.d.ts +119 -0
  17. package/node_modules/@types/unist/package.json +60 -0
  18. package/node_modules/bail/index.d.ts +10 -0
  19. package/node_modules/bail/index.js +12 -0
  20. package/node_modules/bail/license +22 -0
  21. package/node_modules/bail/package.json +73 -0
  22. package/node_modules/bail/readme.md +147 -0
  23. package/node_modules/ccount/index.d.ts +11 -0
  24. package/node_modules/ccount/index.js +27 -0
  25. package/node_modules/ccount/license +22 -0
  26. package/node_modules/ccount/package.json +71 -0
  27. package/node_modules/ccount/readme.md +149 -0
  28. package/node_modules/character-entities/index.d.ts +6 -0
  29. package/node_modules/character-entities/index.js +2132 -0
  30. package/node_modules/character-entities/license +22 -0
  31. package/node_modules/character-entities/package.json +78 -0
  32. package/node_modules/character-entities/readme.md +152 -0
  33. package/node_modules/debug/LICENSE +20 -0
  34. package/node_modules/debug/README.md +481 -0
  35. package/node_modules/debug/package.json +64 -0
  36. package/node_modules/debug/src/browser.js +272 -0
  37. package/node_modules/debug/src/common.js +292 -0
  38. package/node_modules/debug/src/index.js +10 -0
  39. package/node_modules/debug/src/node.js +263 -0
  40. package/node_modules/decode-named-character-reference/index.d.ts +13 -0
  41. package/node_modules/decode-named-character-reference/index.d.ts.map +1 -0
  42. package/node_modules/decode-named-character-reference/index.dom.d.ts +6 -0
  43. package/node_modules/decode-named-character-reference/index.dom.d.ts.map +1 -0
  44. package/node_modules/decode-named-character-reference/index.dom.js +32 -0
  45. package/node_modules/decode-named-character-reference/index.js +19 -0
  46. package/node_modules/decode-named-character-reference/license +22 -0
  47. package/node_modules/decode-named-character-reference/package.json +90 -0
  48. package/node_modules/decode-named-character-reference/readme.md +136 -0
  49. package/node_modules/dequal/dist/index.js +86 -0
  50. package/node_modules/dequal/dist/index.min.js +1 -0
  51. package/node_modules/dequal/dist/index.mjs +84 -0
  52. package/node_modules/dequal/index.d.ts +1 -0
  53. package/node_modules/dequal/license +21 -0
  54. package/node_modules/dequal/lite/index.d.ts +1 -0
  55. package/node_modules/dequal/lite/index.js +31 -0
  56. package/node_modules/dequal/lite/index.min.js +1 -0
  57. package/node_modules/dequal/lite/index.mjs +29 -0
  58. package/node_modules/dequal/package.json +57 -0
  59. package/node_modules/dequal/readme.md +112 -0
  60. package/node_modules/devlop/lib/default.js +9 -0
  61. package/node_modules/devlop/lib/development.d.ts +84 -0
  62. package/node_modules/devlop/lib/development.js +238 -0
  63. package/node_modules/devlop/license +22 -0
  64. package/node_modules/devlop/package.json +80 -0
  65. package/node_modules/devlop/readme.md +360 -0
  66. package/node_modules/escape-string-regexp/index.d.ts +16 -0
  67. package/node_modules/escape-string-regexp/index.js +11 -0
  68. package/node_modules/escape-string-regexp/license +9 -0
  69. package/node_modules/escape-string-regexp/package.json +40 -0
  70. package/node_modules/escape-string-regexp/readme.md +34 -0
  71. package/node_modules/extend/.editorconfig +20 -0
  72. package/node_modules/extend/.eslintrc +17 -0
  73. package/node_modules/extend/.jscs.json +175 -0
  74. package/node_modules/extend/.travis.yml +230 -0
  75. package/node_modules/extend/CHANGELOG.md +83 -0
  76. package/node_modules/extend/LICENSE +23 -0
  77. package/node_modules/extend/README.md +81 -0
  78. package/node_modules/extend/component.json +32 -0
  79. package/node_modules/extend/index.js +117 -0
  80. package/node_modules/extend/package.json +42 -0
  81. package/node_modules/is-plain-obj/index.d.ts +35 -0
  82. package/node_modules/is-plain-obj/index.js +8 -0
  83. package/node_modules/is-plain-obj/license +9 -0
  84. package/node_modules/is-plain-obj/package.json +41 -0
  85. package/node_modules/is-plain-obj/readme.md +58 -0
  86. package/node_modules/longest-streak/index.d.ts +11 -0
  87. package/node_modules/longest-streak/index.js +36 -0
  88. package/node_modules/longest-streak/license +22 -0
  89. package/node_modules/longest-streak/package.json +73 -0
  90. package/node_modules/longest-streak/readme.md +150 -0
  91. package/node_modules/markdown-table/index.d.ts +171 -0
  92. package/node_modules/markdown-table/index.d.ts.map +1 -0
  93. package/node_modules/markdown-table/index.js +393 -0
  94. package/node_modules/markdown-table/license +22 -0
  95. package/node_modules/markdown-table/package.json +77 -0
  96. package/node_modules/markdown-table/readme.md +344 -0
  97. package/node_modules/mdast-util-find-and-replace/index.d.ts +9 -0
  98. package/node_modules/mdast-util-find-and-replace/index.d.ts.map +1 -0
  99. package/node_modules/mdast-util-find-and-replace/index.js +11 -0
  100. package/node_modules/mdast-util-find-and-replace/lib/index.d.ts +79 -0
  101. package/node_modules/mdast-util-find-and-replace/lib/index.d.ts.map +1 -0
  102. package/node_modules/mdast-util-find-and-replace/lib/index.js +261 -0
  103. package/node_modules/mdast-util-find-and-replace/license +22 -0
  104. package/node_modules/mdast-util-find-and-replace/package.json +85 -0
  105. package/node_modules/mdast-util-find-and-replace/readme.md +368 -0
  106. package/node_modules/mdast-util-from-markdown/dev/index.d.ts +23 -0
  107. package/node_modules/mdast-util-from-markdown/dev/index.js +2 -0
  108. package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts +53 -0
  109. package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts.map +1 -0
  110. package/node_modules/mdast-util-from-markdown/dev/lib/index.js +1348 -0
  111. package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +295 -0
  112. package/node_modules/mdast-util-from-markdown/dev/lib/types.js +2 -0
  113. package/node_modules/mdast-util-from-markdown/index.d.ts +23 -0
  114. package/node_modules/mdast-util-from-markdown/index.js +2 -0
  115. package/node_modules/mdast-util-from-markdown/lib/index.d.ts +53 -0
  116. package/node_modules/mdast-util-from-markdown/lib/index.d.ts.map +1 -0
  117. package/node_modules/mdast-util-from-markdown/lib/index.js +1177 -0
  118. package/node_modules/mdast-util-from-markdown/lib/types.d.ts +295 -0
  119. package/node_modules/mdast-util-from-markdown/lib/types.js +2 -0
  120. package/node_modules/mdast-util-from-markdown/license +22 -0
  121. package/node_modules/mdast-util-from-markdown/package.json +99 -0
  122. package/node_modules/mdast-util-from-markdown/readme.md +535 -0
  123. package/node_modules/mdast-util-gfm/index.d.ts +12 -0
  124. package/node_modules/mdast-util-gfm/index.js +2 -0
  125. package/node_modules/mdast-util-gfm/lib/index.d.ts +24 -0
  126. package/node_modules/mdast-util-gfm/lib/index.d.ts.map +1 -0
  127. package/node_modules/mdast-util-gfm/lib/index.js +63 -0
  128. package/node_modules/mdast-util-gfm/license +22 -0
  129. package/node_modules/mdast-util-gfm/package.json +125 -0
  130. package/node_modules/mdast-util-gfm/readme.md +497 -0
  131. package/node_modules/mdast-util-gfm-autolink-literal/index.d.ts +1 -0
  132. package/node_modules/mdast-util-gfm-autolink-literal/index.js +4 -0
  133. package/node_modules/mdast-util-gfm-autolink-literal/lib/index.d.ts +18 -0
  134. package/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +280 -0
  135. package/node_modules/mdast-util-gfm-autolink-literal/license +22 -0
  136. package/node_modules/mdast-util-gfm-autolink-literal/package.json +106 -0
  137. package/node_modules/mdast-util-gfm-autolink-literal/readme.md +334 -0
  138. package/node_modules/mdast-util-gfm-footnote/index.d.ts +34 -0
  139. package/node_modules/mdast-util-gfm-footnote/index.js +2 -0
  140. package/node_modules/mdast-util-gfm-footnote/lib/index.d.ts +22 -0
  141. package/node_modules/mdast-util-gfm-footnote/lib/index.d.ts.map +1 -0
  142. package/node_modules/mdast-util-gfm-footnote/lib/index.js +212 -0
  143. package/node_modules/mdast-util-gfm-footnote/license +22 -0
  144. package/node_modules/mdast-util-gfm-footnote/package.json +111 -0
  145. package/node_modules/mdast-util-gfm-footnote/readme.md +494 -0
  146. package/node_modules/mdast-util-gfm-strikethrough/index.d.ts +19 -0
  147. package/node_modules/mdast-util-gfm-strikethrough/index.js +5 -0
  148. package/node_modules/mdast-util-gfm-strikethrough/lib/index.d.ts +19 -0
  149. package/node_modules/mdast-util-gfm-strikethrough/lib/index.d.ts.map +1 -0
  150. package/node_modules/mdast-util-gfm-strikethrough/lib/index.js +133 -0
  151. package/node_modules/mdast-util-gfm-strikethrough/license +22 -0
  152. package/node_modules/mdast-util-gfm-strikethrough/package.json +84 -0
  153. package/node_modules/mdast-util-gfm-strikethrough/readme.md +350 -0
  154. package/node_modules/mdast-util-gfm-table/index.d.ts +54 -0
  155. package/node_modules/mdast-util-gfm-table/index.js +2 -0
  156. package/node_modules/mdast-util-gfm-table/lib/index.d.ts +51 -0
  157. package/node_modules/mdast-util-gfm-table/lib/index.js +300 -0
  158. package/node_modules/mdast-util-gfm-table/license +22 -0
  159. package/node_modules/mdast-util-gfm-table/package.json +101 -0
  160. package/node_modules/mdast-util-gfm-table/readme.md +605 -0
  161. package/node_modules/mdast-util-gfm-task-list-item/index.d.ts +4 -0
  162. package/node_modules/mdast-util-gfm-task-list-item/index.js +4 -0
  163. package/node_modules/mdast-util-gfm-task-list-item/lib/index.d.ts +23 -0
  164. package/node_modules/mdast-util-gfm-task-list-item/lib/index.js +141 -0
  165. package/node_modules/mdast-util-gfm-task-list-item/license +22 -0
  166. package/node_modules/mdast-util-gfm-task-list-item/package.json +90 -0
  167. package/node_modules/mdast-util-gfm-task-list-item/readme.md +366 -0
  168. package/node_modules/mdast-util-phrasing/index.d.ts +1 -0
  169. package/node_modules/mdast-util-phrasing/index.js +1 -0
  170. package/node_modules/mdast-util-phrasing/lib/index.d.ts +3 -0
  171. package/node_modules/mdast-util-phrasing/lib/index.js +45 -0
  172. package/node_modules/mdast-util-phrasing/license +23 -0
  173. package/node_modules/mdast-util-phrasing/package.json +78 -0
  174. package/node_modules/mdast-util-phrasing/readme.md +200 -0
  175. package/node_modules/mdast-util-to-markdown/index.d.ts +18 -0
  176. package/node_modules/mdast-util-to-markdown/index.js +3 -0
  177. package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +14 -0
  178. package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -0
  179. package/node_modules/mdast-util-to-markdown/lib/configure.js +98 -0
  180. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +24 -0
  181. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -0
  182. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +40 -0
  183. package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +20 -0
  184. package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -0
  185. package/node_modules/mdast-util-to-markdown/lib/handle/break.js +41 -0
  186. package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +20 -0
  187. package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -0
  188. package/node_modules/mdast-util-to-markdown/lib/handle/code.js +86 -0
  189. package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +20 -0
  190. package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -0
  191. package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +83 -0
  192. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +52 -0
  193. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -0
  194. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +67 -0
  195. package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +20 -0
  196. package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -0
  197. package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +84 -0
  198. package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +22 -0
  199. package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -0
  200. package/node_modules/mdast-util-to-markdown/lib/handle/html.js +27 -0
  201. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +31 -0
  202. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -0
  203. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +78 -0
  204. package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +31 -0
  205. package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -0
  206. package/node_modules/mdast-util-to-markdown/lib/handle/image.js +92 -0
  207. package/node_modules/mdast-util-to-markdown/lib/handle/index.d.ts +42 -0
  208. package/node_modules/mdast-util-to-markdown/lib/handle/index.d.ts.map +1 -0
  209. package/node_modules/mdast-util-to-markdown/lib/handle/index.js +45 -0
  210. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +28 -0
  211. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -0
  212. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +86 -0
  213. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +31 -0
  214. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -0
  215. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +78 -0
  216. package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +37 -0
  217. package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -0
  218. package/node_modules/mdast-util-to-markdown/lib/handle/link.js +129 -0
  219. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +20 -0
  220. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -0
  221. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +73 -0
  222. package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +20 -0
  223. package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -0
  224. package/node_modules/mdast-util-to-markdown/lib/handle/list.js +107 -0
  225. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +24 -0
  226. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -0
  227. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +27 -0
  228. package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +20 -0
  229. package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -0
  230. package/node_modules/mdast-util-to-markdown/lib/handle/root.js +34 -0
  231. package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +52 -0
  232. package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -0
  233. package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +67 -0
  234. package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +24 -0
  235. package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -0
  236. package/node_modules/mdast-util-to-markdown/lib/handle/text.js +22 -0
  237. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +17 -0
  238. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -0
  239. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +27 -0
  240. package/node_modules/mdast-util-to-markdown/lib/index.d.ts +14 -0
  241. package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -0
  242. package/node_modules/mdast-util-to-markdown/lib/index.js +213 -0
  243. package/node_modules/mdast-util-to-markdown/lib/join.d.ts +4 -0
  244. package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -0
  245. package/node_modules/mdast-util-to-markdown/lib/join.js +56 -0
  246. package/node_modules/mdast-util-to-markdown/lib/types.d.ts +985 -0
  247. package/node_modules/mdast-util-to-markdown/lib/types.js +2 -0
  248. package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts +4 -0
  249. package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -0
  250. package/node_modules/mdast-util-to-markdown/lib/unsafe.js +160 -0
  251. package/node_modules/mdast-util-to-markdown/lib/util/association.d.ts +2 -0
  252. package/node_modules/mdast-util-to-markdown/lib/util/association.d.ts.map +1 -0
  253. package/node_modules/mdast-util-to-markdown/lib/util/association.js +33 -0
  254. package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts +23 -0
  255. package/node_modules/mdast-util-to-markdown/lib/util/character.d.ts.map +1 -0
  256. package/node_modules/mdast-util-to-markdown/lib/util/character.js +32 -0
  257. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +15 -0
  258. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -0
  259. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +25 -0
  260. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +12 -0
  261. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -0
  262. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +42 -0
  263. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +15 -0
  264. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -0
  265. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +25 -0
  266. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +15 -0
  267. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -0
  268. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +25 -0
  269. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +15 -0
  270. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -0
  271. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +25 -0
  272. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +15 -0
  273. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -0
  274. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +25 -0
  275. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +15 -0
  276. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -0
  277. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +25 -0
  278. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +15 -0
  279. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -0
  280. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +25 -0
  281. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +15 -0
  282. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -0
  283. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +25 -0
  284. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +15 -0
  285. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -0
  286. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +25 -0
  287. package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.d.ts +2 -0
  288. package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.d.ts.map +1 -0
  289. package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +26 -0
  290. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +21 -0
  291. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -0
  292. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +93 -0
  293. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +110 -0
  294. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -0
  295. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +704 -0
  296. package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.d.ts +10 -0
  297. package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.d.ts.map +1 -0
  298. package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +11 -0
  299. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +33 -0
  300. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -0
  301. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +82 -0
  302. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +18 -0
  303. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -0
  304. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +27 -0
  305. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +14 -0
  306. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -0
  307. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +39 -0
  308. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +14 -0
  309. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -0
  310. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +39 -0
  311. package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts +31 -0
  312. package/node_modules/mdast-util-to-markdown/lib/util/html-kind.d.ts.map +1 -0
  313. package/node_modules/mdast-util-to-markdown/lib/util/html-kind.js +63 -0
  314. package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.d.ts +2 -0
  315. package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.d.ts.map +1 -0
  316. package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +40 -0
  317. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +17 -0
  318. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -0
  319. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +52 -0
  320. package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +29 -0
  321. package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -0
  322. package/node_modules/mdast-util-to-markdown/lib/util/safe.js +238 -0
  323. package/node_modules/mdast-util-to-markdown/lib/util/track.d.ts +2 -0
  324. package/node_modules/mdast-util-to-markdown/lib/util/track.d.ts.map +1 -0
  325. package/node_modules/mdast-util-to-markdown/lib/util/track.js +55 -0
  326. package/node_modules/mdast-util-to-markdown/license +22 -0
  327. package/node_modules/mdast-util-to-markdown/package.json +88 -0
  328. package/node_modules/mdast-util-to-markdown/readme.md +805 -0
  329. package/node_modules/mdast-util-to-string/index.d.ts +2 -0
  330. package/node_modules/mdast-util-to-string/index.js +5 -0
  331. package/node_modules/mdast-util-to-string/lib/index.d.ts +31 -0
  332. package/node_modules/mdast-util-to-string/lib/index.js +108 -0
  333. package/node_modules/mdast-util-to-string/license +22 -0
  334. package/node_modules/mdast-util-to-string/package.json +78 -0
  335. package/node_modules/mdast-util-to-string/readme.md +218 -0
  336. package/node_modules/micromark/dev/index.d.ts +82 -0
  337. package/node_modules/micromark/dev/index.d.ts.map +1 -0
  338. package/node_modules/micromark/dev/index.js +68 -0
  339. package/node_modules/micromark/dev/lib/compile.d.ts +16 -0
  340. package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
  341. package/node_modules/micromark/dev/lib/compile.js +1162 -0
  342. package/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
  343. package/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
  344. package/node_modules/micromark/dev/lib/constructs.js +101 -0
  345. package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
  346. package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
  347. package/node_modules/micromark/dev/lib/create-tokenizer.js +718 -0
  348. package/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
  349. package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
  350. package/node_modules/micromark/dev/lib/initialize/content.js +99 -0
  351. package/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
  352. package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
  353. package/node_modules/micromark/dev/lib/initialize/document.js +449 -0
  354. package/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
  355. package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
  356. package/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
  357. package/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
  358. package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
  359. package/node_modules/micromark/dev/lib/initialize/text.js +248 -0
  360. package/node_modules/micromark/dev/lib/parse.d.ts +10 -0
  361. package/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
  362. package/node_modules/micromark/dev/lib/parse.js +58 -0
  363. package/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
  364. package/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
  365. package/node_modules/micromark/dev/lib/postprocess.js +19 -0
  366. package/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
  367. package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
  368. package/node_modules/micromark/dev/lib/preprocess.js +139 -0
  369. package/node_modules/micromark/dev/stream.d.ts +35 -0
  370. package/node_modules/micromark/dev/stream.d.ts.map +1 -0
  371. package/node_modules/micromark/dev/stream.js +270 -0
  372. package/node_modules/micromark/index.d.ts +82 -0
  373. package/node_modules/micromark/index.d.ts.map +1 -0
  374. package/node_modules/micromark/index.js +60 -0
  375. package/node_modules/micromark/lib/compile.d.ts +16 -0
  376. package/node_modules/micromark/lib/compile.d.ts.map +1 -0
  377. package/node_modules/micromark/lib/compile.js +1068 -0
  378. package/node_modules/micromark/lib/constructs.d.ts +73 -0
  379. package/node_modules/micromark/lib/constructs.d.ts.map +1 -0
  380. package/node_modules/micromark/lib/constructs.js +85 -0
  381. package/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
  382. package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
  383. package/node_modules/micromark/lib/create-tokenizer.js +613 -0
  384. package/node_modules/micromark/lib/initialize/content.d.ts +4 -0
  385. package/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
  386. package/node_modules/micromark/lib/initialize/content.js +79 -0
  387. package/node_modules/micromark/lib/initialize/document.d.ts +10 -0
  388. package/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
  389. package/node_modules/micromark/lib/initialize/document.js +370 -0
  390. package/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
  391. package/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
  392. package/node_modules/micromark/lib/initialize/flow.js +58 -0
  393. package/node_modules/micromark/lib/initialize/text.d.ts +8 -0
  394. package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
  395. package/node_modules/micromark/lib/initialize/text.js +216 -0
  396. package/node_modules/micromark/lib/parse.d.ts +10 -0
  397. package/node_modules/micromark/lib/parse.d.ts.map +1 -0
  398. package/node_modules/micromark/lib/parse.js +56 -0
  399. package/node_modules/micromark/lib/postprocess.d.ts +9 -0
  400. package/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
  401. package/node_modules/micromark/lib/postprocess.js +18 -0
  402. package/node_modules/micromark/lib/preprocess.d.ts +13 -0
  403. package/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
  404. package/node_modules/micromark/lib/preprocess.js +112 -0
  405. package/node_modules/micromark/license +22 -0
  406. package/node_modules/micromark/package.json +87 -0
  407. package/node_modules/micromark/readme.md +488 -0
  408. package/node_modules/micromark/stream.d.ts +35 -0
  409. package/node_modules/micromark/stream.d.ts.map +1 -0
  410. package/node_modules/micromark/stream.js +256 -0
  411. package/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
  412. package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
  413. package/node_modules/micromark-core-commonmark/dev/index.js +22 -0
  414. package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
  415. package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
  416. package/node_modules/micromark-core-commonmark/dev/lib/attention.js +294 -0
  417. package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
  418. package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
  419. package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
  420. package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
  421. package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
  422. package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
  423. package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
  424. package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
  425. package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
  426. package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
  427. package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
  428. package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
  429. package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
  430. package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
  431. package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
  432. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
  433. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
  434. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +472 -0
  435. package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
  436. package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
  437. package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +178 -0
  438. package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
  439. package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
  440. package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
  441. package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
  442. package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
  443. package/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
  444. package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
  445. package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
  446. package/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
  447. package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
  448. package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
  449. package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
  450. package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
  451. package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
  452. package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +229 -0
  453. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
  454. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
  455. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +938 -0
  456. package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
  457. package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
  458. package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
  459. package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
  460. package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
  461. package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +658 -0
  462. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
  463. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
  464. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +119 -0
  465. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
  466. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
  467. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +71 -0
  468. package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
  469. package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
  470. package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
  471. package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
  472. package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
  473. package/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
  474. package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
  475. package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
  476. package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
  477. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
  478. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
  479. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +213 -0
  480. package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
  481. package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
  482. package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
  483. package/node_modules/micromark-core-commonmark/index.d.ts +23 -0
  484. package/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
  485. package/node_modules/micromark-core-commonmark/index.js +22 -0
  486. package/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
  487. package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
  488. package/node_modules/micromark-core-commonmark/lib/attention.js +231 -0
  489. package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
  490. package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
  491. package/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
  492. package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
  493. package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
  494. package/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
  495. package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
  496. package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
  497. package/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
  498. package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
  499. package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
  500. package/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
  501. package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
  502. package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
  503. package/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
  504. package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
  505. package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
  506. package/node_modules/micromark-core-commonmark/lib/code-fenced.js +422 -0
  507. package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
  508. package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
  509. package/node_modules/micromark-core-commonmark/lib/code-indented.js +159 -0
  510. package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
  511. package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
  512. package/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
  513. package/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
  514. package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
  515. package/node_modules/micromark-core-commonmark/lib/content.js +163 -0
  516. package/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
  517. package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
  518. package/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
  519. package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
  520. package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
  521. package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
  522. package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
  523. package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
  524. package/node_modules/micromark-core-commonmark/lib/heading-atx.js +191 -0
  525. package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
  526. package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
  527. package/node_modules/micromark-core-commonmark/lib/html-flow.js +827 -0
  528. package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
  529. package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
  530. package/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
  531. package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
  532. package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
  533. package/node_modules/micromark-core-commonmark/lib/label-end.js +561 -0
  534. package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
  535. package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
  536. package/node_modules/micromark-core-commonmark/lib/label-start-image.js +110 -0
  537. package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
  538. package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
  539. package/node_modules/micromark-core-commonmark/lib/label-start-link.js +63 -0
  540. package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
  541. package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
  542. package/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
  543. package/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
  544. package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
  545. package/node_modules/micromark-core-commonmark/lib/list.js +213 -0
  546. package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
  547. package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
  548. package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
  549. package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
  550. package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
  551. package/node_modules/micromark-core-commonmark/lib/setext-underline.js +187 -0
  552. package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
  553. package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
  554. package/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
  555. package/node_modules/micromark-core-commonmark/license +22 -0
  556. package/node_modules/micromark-core-commonmark/package.json +62 -0
  557. package/node_modules/micromark-core-commonmark/readme.md +171 -0
  558. package/node_modules/micromark-extension-gfm/index.d.ts +28 -0
  559. package/node_modules/micromark-extension-gfm/index.js +69 -0
  560. package/node_modules/micromark-extension-gfm/license +22 -0
  561. package/node_modules/micromark-extension-gfm/package.json +107 -0
  562. package/node_modules/micromark-extension-gfm/readme.md +433 -0
  563. package/node_modules/micromark-extension-gfm-autolink-literal/dev/index.d.ts +24 -0
  564. package/node_modules/micromark-extension-gfm-autolink-literal/dev/index.js +2 -0
  565. package/node_modules/micromark-extension-gfm-autolink-literal/dev/lib/html.d.ts +10 -0
  566. package/node_modules/micromark-extension-gfm-autolink-literal/dev/lib/html.js +56 -0
  567. package/node_modules/micromark-extension-gfm-autolink-literal/dev/lib/syntax.d.ts +10 -0
  568. package/node_modules/micromark-extension-gfm-autolink-literal/dev/lib/syntax.js +983 -0
  569. package/node_modules/micromark-extension-gfm-autolink-literal/index.d.ts +24 -0
  570. package/node_modules/micromark-extension-gfm-autolink-literal/index.js +2 -0
  571. package/node_modules/micromark-extension-gfm-autolink-literal/lib/html.d.ts +10 -0
  572. package/node_modules/micromark-extension-gfm-autolink-literal/lib/html.js +60 -0
  573. package/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.d.ts +10 -0
  574. package/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +854 -0
  575. package/node_modules/micromark-extension-gfm-autolink-literal/license +22 -0
  576. package/node_modules/micromark-extension-gfm-autolink-literal/package.json +116 -0
  577. package/node_modules/micromark-extension-gfm-autolink-literal/readme.md +422 -0
  578. package/node_modules/micromark-extension-gfm-footnote/dev/index.d.ts +164 -0
  579. package/node_modules/micromark-extension-gfm-footnote/dev/index.js +3 -0
  580. package/node_modules/micromark-extension-gfm-footnote/dev/lib/html.d.ts +25 -0
  581. package/node_modules/micromark-extension-gfm-footnote/dev/lib/html.js +226 -0
  582. package/node_modules/micromark-extension-gfm-footnote/dev/lib/syntax.d.ts +9 -0
  583. package/node_modules/micromark-extension-gfm-footnote/dev/lib/syntax.js +558 -0
  584. package/node_modules/micromark-extension-gfm-footnote/index.d.ts +164 -0
  585. package/node_modules/micromark-extension-gfm-footnote/index.js +3 -0
  586. package/node_modules/micromark-extension-gfm-footnote/lib/html.d.ts +25 -0
  587. package/node_modules/micromark-extension-gfm-footnote/lib/html.js +154 -0
  588. package/node_modules/micromark-extension-gfm-footnote/lib/syntax.d.ts +9 -0
  589. package/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +485 -0
  590. package/node_modules/micromark-extension-gfm-footnote/license +22 -0
  591. package/node_modules/micromark-extension-gfm-footnote/package.json +132 -0
  592. package/node_modules/micromark-extension-gfm-footnote/readme.md +656 -0
  593. package/node_modules/micromark-extension-gfm-strikethrough/dev/index.d.ts +30 -0
  594. package/node_modules/micromark-extension-gfm-strikethrough/dev/index.js +3 -0
  595. package/node_modules/micromark-extension-gfm-strikethrough/dev/lib/html.d.ts +13 -0
  596. package/node_modules/micromark-extension-gfm-strikethrough/dev/lib/html.js +26 -0
  597. package/node_modules/micromark-extension-gfm-strikethrough/dev/lib/syntax.d.ts +12 -0
  598. package/node_modules/micromark-extension-gfm-strikethrough/dev/lib/syntax.js +183 -0
  599. package/node_modules/micromark-extension-gfm-strikethrough/index.d.ts +24 -0
  600. package/node_modules/micromark-extension-gfm-strikethrough/index.js +3 -0
  601. package/node_modules/micromark-extension-gfm-strikethrough/lib/html.d.ts +13 -0
  602. package/node_modules/micromark-extension-gfm-strikethrough/lib/html.js +26 -0
  603. package/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.d.ts +12 -0
  604. package/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +142 -0
  605. package/node_modules/micromark-extension-gfm-strikethrough/license +22 -0
  606. package/node_modules/micromark-extension-gfm-strikethrough/package.json +129 -0
  607. package/node_modules/micromark-extension-gfm-strikethrough/readme.md +304 -0
  608. package/node_modules/micromark-extension-gfm-table/dev/index.d.ts +55 -0
  609. package/node_modules/micromark-extension-gfm-table/dev/index.js +2 -0
  610. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +51 -0
  611. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -0
  612. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +231 -0
  613. package/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts +11 -0
  614. package/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts.map +1 -0
  615. package/node_modules/micromark-extension-gfm-table/dev/lib/html.js +153 -0
  616. package/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts +14 -0
  617. package/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts.map +1 -0
  618. package/node_modules/micromark-extension-gfm-table/dev/lib/infer.js +64 -0
  619. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts +18 -0
  620. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts.map +1 -0
  621. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +964 -0
  622. package/node_modules/micromark-extension-gfm-table/index.d.ts +55 -0
  623. package/node_modules/micromark-extension-gfm-table/index.js +2 -0
  624. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +51 -0
  625. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -0
  626. package/node_modules/micromark-extension-gfm-table/lib/edit-map.js +222 -0
  627. package/node_modules/micromark-extension-gfm-table/lib/html.d.ts +11 -0
  628. package/node_modules/micromark-extension-gfm-table/lib/html.d.ts.map +1 -0
  629. package/node_modules/micromark-extension-gfm-table/lib/html.js +135 -0
  630. package/node_modules/micromark-extension-gfm-table/lib/infer.d.ts +14 -0
  631. package/node_modules/micromark-extension-gfm-table/lib/infer.d.ts.map +1 -0
  632. package/node_modules/micromark-extension-gfm-table/lib/infer.js +52 -0
  633. package/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts +18 -0
  634. package/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts.map +1 -0
  635. package/node_modules/micromark-extension-gfm-table/lib/syntax.js +846 -0
  636. package/node_modules/micromark-extension-gfm-table/license +22 -0
  637. package/node_modules/micromark-extension-gfm-table/package.json +86 -0
  638. package/node_modules/micromark-extension-gfm-table/readme.md +515 -0
  639. package/node_modules/micromark-extension-gfm-tagfilter/index.d.ts +1 -0
  640. package/node_modules/micromark-extension-gfm-tagfilter/index.js +1 -0
  641. package/node_modules/micromark-extension-gfm-tagfilter/lib/index.d.ts +12 -0
  642. package/node_modules/micromark-extension-gfm-tagfilter/lib/index.js +51 -0
  643. package/node_modules/micromark-extension-gfm-tagfilter/license +22 -0
  644. package/node_modules/micromark-extension-gfm-tagfilter/package.json +82 -0
  645. package/node_modules/micromark-extension-gfm-tagfilter/readme.md +237 -0
  646. package/node_modules/micromark-extension-gfm-task-list-item/dev/index.d.ts +17 -0
  647. package/node_modules/micromark-extension-gfm-task-list-item/dev/index.js +2 -0
  648. package/node_modules/micromark-extension-gfm-task-list-item/dev/lib/html.d.ts +13 -0
  649. package/node_modules/micromark-extension-gfm-task-list-item/dev/lib/html.js +29 -0
  650. package/node_modules/micromark-extension-gfm-task-list-item/dev/lib/syntax.d.ts +10 -0
  651. package/node_modules/micromark-extension-gfm-task-list-item/dev/lib/syntax.js +166 -0
  652. package/node_modules/micromark-extension-gfm-task-list-item/index.d.ts +17 -0
  653. package/node_modules/micromark-extension-gfm-task-list-item/index.js +2 -0
  654. package/node_modules/micromark-extension-gfm-task-list-item/lib/html.d.ts +13 -0
  655. package/node_modules/micromark-extension-gfm-task-list-item/lib/html.js +29 -0
  656. package/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.d.ts +10 -0
  657. package/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +158 -0
  658. package/node_modules/micromark-extension-gfm-task-list-item/license +22 -0
  659. package/node_modules/micromark-extension-gfm-task-list-item/package.json +131 -0
  660. package/node_modules/micromark-extension-gfm-task-list-item/readme.md +305 -0
  661. package/node_modules/micromark-factory-destination/dev/index.d.ts +42 -0
  662. package/node_modules/micromark-factory-destination/dev/index.d.ts.map +1 -0
  663. package/node_modules/micromark-factory-destination/dev/index.js +255 -0
  664. package/node_modules/micromark-factory-destination/index.d.ts +42 -0
  665. package/node_modules/micromark-factory-destination/index.d.ts.map +1 -0
  666. package/node_modules/micromark-factory-destination/index.js +206 -0
  667. package/node_modules/micromark-factory-destination/license +22 -0
  668. package/node_modules/micromark-factory-destination/package.json +57 -0
  669. package/node_modules/micromark-factory-destination/readme.md +234 -0
  670. package/node_modules/micromark-factory-label/dev/index.d.ts +37 -0
  671. package/node_modules/micromark-factory-label/dev/index.d.ts.map +1 -0
  672. package/node_modules/micromark-factory-label/dev/index.js +172 -0
  673. package/node_modules/micromark-factory-label/index.d.ts +37 -0
  674. package/node_modules/micromark-factory-label/index.d.ts.map +1 -0
  675. package/node_modules/micromark-factory-label/index.js +148 -0
  676. package/node_modules/micromark-factory-label/license +22 -0
  677. package/node_modules/micromark-factory-label/package.json +60 -0
  678. package/node_modules/micromark-factory-label/readme.md +224 -0
  679. package/node_modules/micromark-factory-space/dev/index.d.ts +60 -0
  680. package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -0
  681. package/node_modules/micromark-factory-space/dev/index.js +122 -0
  682. package/node_modules/micromark-factory-space/index.d.ts +60 -0
  683. package/node_modules/micromark-factory-space/index.d.ts.map +1 -0
  684. package/node_modules/micromark-factory-space/index.js +116 -0
  685. package/node_modules/micromark-factory-space/license +22 -0
  686. package/node_modules/micromark-factory-space/package.json +46 -0
  687. package/node_modules/micromark-factory-space/readme.md +225 -0
  688. package/node_modules/micromark-factory-title/dev/index.d.ts +36 -0
  689. package/node_modules/micromark-factory-title/dev/index.d.ts.map +1 -0
  690. package/node_modules/micromark-factory-title/dev/index.js +169 -0
  691. package/node_modules/micromark-factory-title/index.d.ts +36 -0
  692. package/node_modules/micromark-factory-title/index.d.ts.map +1 -0
  693. package/node_modules/micromark-factory-title/index.js +158 -0
  694. package/node_modules/micromark-factory-title/license +22 -0
  695. package/node_modules/micromark-factory-title/package.json +58 -0
  696. package/node_modules/micromark-factory-title/readme.md +229 -0
  697. package/node_modules/micromark-factory-whitespace/dev/index.d.ts +22 -0
  698. package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +1 -0
  699. package/node_modules/micromark-factory-whitespace/dev/index.js +53 -0
  700. package/node_modules/micromark-factory-whitespace/index.d.ts +22 -0
  701. package/node_modules/micromark-factory-whitespace/index.d.ts.map +1 -0
  702. package/node_modules/micromark-factory-whitespace/index.js +44 -0
  703. package/node_modules/micromark-factory-whitespace/license +22 -0
  704. package/node_modules/micromark-factory-whitespace/package.json +57 -0
  705. package/node_modules/micromark-factory-whitespace/readme.md +205 -0
  706. package/node_modules/micromark-util-character/dev/index.d.ts +195 -0
  707. package/node_modules/micromark-util-character/dev/index.d.ts.map +1 -0
  708. package/node_modules/micromark-util-character/dev/index.js +252 -0
  709. package/node_modules/micromark-util-character/index.d.ts +195 -0
  710. package/node_modules/micromark-util-character/index.d.ts.map +1 -0
  711. package/node_modules/micromark-util-character/index.js +246 -0
  712. package/node_modules/micromark-util-character/license +22 -0
  713. package/node_modules/micromark-util-character/package.json +57 -0
  714. package/node_modules/micromark-util-character/readme.md +446 -0
  715. package/node_modules/micromark-util-chunked/dev/index.d.ts +41 -0
  716. package/node_modules/micromark-util-chunked/dev/index.d.ts.map +1 -0
  717. package/node_modules/micromark-util-chunked/dev/index.js +89 -0
  718. package/node_modules/micromark-util-chunked/index.d.ts +41 -0
  719. package/node_modules/micromark-util-chunked/index.d.ts.map +1 -0
  720. package/node_modules/micromark-util-chunked/index.js +81 -0
  721. package/node_modules/micromark-util-chunked/license +22 -0
  722. package/node_modules/micromark-util-chunked/package.json +57 -0
  723. package/node_modules/micromark-util-chunked/readme.md +219 -0
  724. package/node_modules/micromark-util-classify-character/dev/index.d.ts +18 -0
  725. package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +1 -0
  726. package/node_modules/micromark-util-classify-character/dev/index.js +38 -0
  727. package/node_modules/micromark-util-classify-character/index.d.ts +18 -0
  728. package/node_modules/micromark-util-classify-character/index.d.ts.map +1 -0
  729. package/node_modules/micromark-util-classify-character/index.js +27 -0
  730. package/node_modules/micromark-util-classify-character/license +22 -0
  731. package/node_modules/micromark-util-classify-character/package.json +59 -0
  732. package/node_modules/micromark-util-classify-character/readme.md +205 -0
  733. package/node_modules/micromark-util-combine-extensions/index.d.ts +22 -0
  734. package/node_modules/micromark-util-combine-extensions/index.d.ts.map +1 -0
  735. package/node_modules/micromark-util-combine-extensions/index.js +143 -0
  736. package/node_modules/micromark-util-combine-extensions/license +22 -0
  737. package/node_modules/micromark-util-combine-extensions/package.json +52 -0
  738. package/node_modules/micromark-util-combine-extensions/readme.md +201 -0
  739. package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +16 -0
  740. package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +1 -0
  741. package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +42 -0
  742. package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +16 -0
  743. package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +1 -0
  744. package/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
  745. package/node_modules/micromark-util-decode-numeric-character-reference/license +22 -0
  746. package/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
  747. package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +184 -0
  748. package/node_modules/micromark-util-decode-string/dev/index.d.ts +14 -0
  749. package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +1 -0
  750. package/node_modules/micromark-util-decode-string/dev/index.js +53 -0
  751. package/node_modules/micromark-util-decode-string/index.d.ts +14 -0
  752. package/node_modules/micromark-util-decode-string/index.d.ts.map +1 -0
  753. package/node_modules/micromark-util-decode-string/index.js +45 -0
  754. package/node_modules/micromark-util-decode-string/license +22 -0
  755. package/node_modules/micromark-util-decode-string/package.json +63 -0
  756. package/node_modules/micromark-util-decode-string/readme.md +179 -0
  757. package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
  758. package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
  759. package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
  760. package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
  761. package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
  762. package/node_modules/micromark-util-edit-map/index.js +225 -0
  763. package/node_modules/micromark-util-edit-map/license +22 -0
  764. package/node_modules/micromark-util-edit-map/package.json +48 -0
  765. package/node_modules/micromark-util-edit-map/readme.md +234 -0
  766. package/node_modules/micromark-util-encode/index.d.ts +14 -0
  767. package/node_modules/micromark-util-encode/index.d.ts.map +1 -0
  768. package/node_modules/micromark-util-encode/index.js +33 -0
  769. package/node_modules/micromark-util-encode/license +22 -0
  770. package/node_modules/micromark-util-encode/package.json +47 -0
  771. package/node_modules/micromark-util-encode/readme.md +176 -0
  772. package/node_modules/micromark-util-html-tag-name/index.d.ts +30 -0
  773. package/node_modules/micromark-util-html-tag-name/index.d.ts.map +1 -0
  774. package/node_modules/micromark-util-html-tag-name/index.js +93 -0
  775. package/node_modules/micromark-util-html-tag-name/license +22 -0
  776. package/node_modules/micromark-util-html-tag-name/package.json +47 -0
  777. package/node_modules/micromark-util-html-tag-name/readme.md +193 -0
  778. package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +21 -0
  779. package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +1 -0
  780. package/node_modules/micromark-util-normalize-identifier/dev/index.js +38 -0
  781. package/node_modules/micromark-util-normalize-identifier/index.d.ts +21 -0
  782. package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +1 -0
  783. package/node_modules/micromark-util-normalize-identifier/index.js +33 -0
  784. package/node_modules/micromark-util-normalize-identifier/license +22 -0
  785. package/node_modules/micromark-util-normalize-identifier/package.json +58 -0
  786. package/node_modules/micromark-util-normalize-identifier/readme.md +187 -0
  787. package/node_modules/micromark-util-resolve-all/index.d.ts +22 -0
  788. package/node_modules/micromark-util-resolve-all/index.d.ts.map +1 -0
  789. package/node_modules/micromark-util-resolve-all/index.js +32 -0
  790. package/node_modules/micromark-util-resolve-all/license +22 -0
  791. package/node_modules/micromark-util-resolve-all/package.json +48 -0
  792. package/node_modules/micromark-util-resolve-all/readme.md +238 -0
  793. package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +36 -0
  794. package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +1 -0
  795. package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
  796. package/node_modules/micromark-util-sanitize-uri/index.d.ts +36 -0
  797. package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +1 -0
  798. package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
  799. package/node_modules/micromark-util-sanitize-uri/license +22 -0
  800. package/node_modules/micromark-util-sanitize-uri/package.json +59 -0
  801. package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
  802. package/node_modules/micromark-util-subtokenize/dev/index.d.ts +12 -0
  803. package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +1 -0
  804. package/node_modules/micromark-util-subtokenize/dev/index.js +284 -0
  805. package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +161 -0
  806. package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +1 -0
  807. package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +288 -0
  808. package/node_modules/micromark-util-subtokenize/index.d.ts +12 -0
  809. package/node_modules/micromark-util-subtokenize/index.d.ts.map +1 -0
  810. package/node_modules/micromark-util-subtokenize/index.js +228 -0
  811. package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +161 -0
  812. package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +1 -0
  813. package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
  814. package/node_modules/micromark-util-subtokenize/license +22 -0
  815. package/node_modules/micromark-util-subtokenize/package.json +60 -0
  816. package/node_modules/micromark-util-subtokenize/readme.md +181 -0
  817. package/node_modules/micromark-util-symbol/lib/codes.d.ts +139 -0
  818. package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +1 -0
  819. package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
  820. package/node_modules/micromark-util-symbol/lib/constants.d.ts +37 -0
  821. package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +1 -0
  822. package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
  823. package/node_modules/micromark-util-symbol/lib/default.d.ts +5 -0
  824. package/node_modules/micromark-util-symbol/lib/default.d.ts.map +1 -0
  825. package/node_modules/micromark-util-symbol/lib/default.js +4 -0
  826. package/node_modules/micromark-util-symbol/lib/types.d.ts +106 -0
  827. package/node_modules/micromark-util-symbol/lib/types.d.ts.map +1 -0
  828. package/node_modules/micromark-util-symbol/lib/types.js +453 -0
  829. package/node_modules/micromark-util-symbol/lib/values.d.ts +102 -0
  830. package/node_modules/micromark-util-symbol/lib/values.d.ts.map +1 -0
  831. package/node_modules/micromark-util-symbol/lib/values.js +109 -0
  832. package/node_modules/micromark-util-symbol/license +22 -0
  833. package/node_modules/micromark-util-symbol/package.json +43 -0
  834. package/node_modules/micromark-util-symbol/readme.md +168 -0
  835. package/node_modules/micromark-util-types/index.d.ts +1315 -0
  836. package/node_modules/micromark-util-types/index.js +2 -0
  837. package/node_modules/micromark-util-types/license +22 -0
  838. package/node_modules/micromark-util-types/package.json +37 -0
  839. package/node_modules/micromark-util-types/readme.md +151 -0
  840. package/node_modules/ms/index.js +162 -0
  841. package/node_modules/ms/license.md +21 -0
  842. package/node_modules/ms/package.json +38 -0
  843. package/node_modules/ms/readme.md +59 -0
  844. package/node_modules/remark-gfm/index.d.ts +13 -0
  845. package/node_modules/remark-gfm/index.js +2 -0
  846. package/node_modules/remark-gfm/lib/index.d.ts +12 -0
  847. package/node_modules/remark-gfm/lib/index.d.ts.map +1 -0
  848. package/node_modules/remark-gfm/lib/index.js +41 -0
  849. package/node_modules/remark-gfm/license +22 -0
  850. package/node_modules/remark-gfm/package.json +125 -0
  851. package/node_modules/remark-gfm/readme.md +518 -0
  852. package/node_modules/remark-parse/index.d.ts +55 -0
  853. package/node_modules/remark-parse/index.js +2 -0
  854. package/node_modules/remark-parse/lib/index.d.ts +26 -0
  855. package/node_modules/remark-parse/lib/index.js +43 -0
  856. package/node_modules/remark-parse/license +21 -0
  857. package/node_modules/remark-parse/package.json +72 -0
  858. package/node_modules/remark-parse/readme.md +428 -0
  859. package/node_modules/remark-stringify/index.d.ts +41 -0
  860. package/node_modules/remark-stringify/index.js +2 -0
  861. package/node_modules/remark-stringify/lib/index.d.ts +26 -0
  862. package/node_modules/remark-stringify/lib/index.js +42 -0
  863. package/node_modules/remark-stringify/license +21 -0
  864. package/node_modules/remark-stringify/package.json +71 -0
  865. package/node_modules/remark-stringify/readme.md +407 -0
  866. package/node_modules/trough/index.d.ts +7 -0
  867. package/node_modules/trough/index.d.ts.map +1 -0
  868. package/node_modules/trough/index.js +9 -0
  869. package/node_modules/trough/lib/index.d.ts +105 -0
  870. package/node_modules/trough/lib/index.d.ts.map +1 -0
  871. package/node_modules/trough/lib/index.js +206 -0
  872. package/node_modules/trough/license +21 -0
  873. package/node_modules/trough/package.json +77 -0
  874. package/node_modules/trough/readme.md +494 -0
  875. package/node_modules/unified/index.d.ts +106 -0
  876. package/node_modules/unified/index.js +2 -0
  877. package/node_modules/unified/lib/callable-instance.d.ts +2 -0
  878. package/node_modules/unified/lib/callable-instance.d.ts.map +1 -0
  879. package/node_modules/unified/lib/callable-instance.js +44 -0
  880. package/node_modules/unified/lib/index.d.ts +1024 -0
  881. package/node_modules/unified/lib/index.d.ts.map +1 -0
  882. package/node_modules/unified/lib/index.js +1323 -0
  883. package/node_modules/unified/license +21 -0
  884. package/node_modules/unified/package.json +120 -0
  885. package/node_modules/unified/readme.md +1835 -0
  886. package/node_modules/unist-util-is/index.d.ts +5 -0
  887. package/node_modules/unist-util-is/index.d.ts.map +1 -0
  888. package/node_modules/unist-util-is/index.js +7 -0
  889. package/node_modules/unist-util-is/lib/index.d.ts +111 -0
  890. package/node_modules/unist-util-is/lib/index.d.ts.map +1 -0
  891. package/node_modules/unist-util-is/lib/index.js +296 -0
  892. package/node_modules/unist-util-is/license +22 -0
  893. package/node_modules/unist-util-is/package.json +103 -0
  894. package/node_modules/unist-util-is/readme.md +351 -0
  895. package/node_modules/unist-util-stringify-position/index.d.ts +1 -0
  896. package/node_modules/unist-util-stringify-position/index.js +1 -0
  897. package/node_modules/unist-util-stringify-position/lib/index.d.ts +61 -0
  898. package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
  899. package/node_modules/unist-util-stringify-position/license +22 -0
  900. package/node_modules/unist-util-stringify-position/package.json +80 -0
  901. package/node_modules/unist-util-stringify-position/readme.md +206 -0
  902. package/node_modules/unist-util-visit/index.d.ts +9 -0
  903. package/node_modules/unist-util-visit/index.js +2 -0
  904. package/node_modules/unist-util-visit/lib/index.d.ts +195 -0
  905. package/node_modules/unist-util-visit/lib/index.d.ts.map +1 -0
  906. package/node_modules/unist-util-visit/lib/index.js +312 -0
  907. package/node_modules/unist-util-visit/license +22 -0
  908. package/node_modules/unist-util-visit/package.json +108 -0
  909. package/node_modules/unist-util-visit/readme.md +313 -0
  910. package/node_modules/unist-util-visit-parents/index.d.ts +14 -0
  911. package/node_modules/unist-util-visit-parents/index.js +2 -0
  912. package/node_modules/unist-util-visit-parents/lib/color.d.ts +6 -0
  913. package/node_modules/unist-util-visit-parents/lib/color.d.ts.map +1 -0
  914. package/node_modules/unist-util-visit-parents/lib/color.js +7 -0
  915. package/node_modules/unist-util-visit-parents/lib/color.node.d.ts +6 -0
  916. package/node_modules/unist-util-visit-parents/lib/color.node.d.ts.map +1 -0
  917. package/node_modules/unist-util-visit-parents/lib/color.node.js +7 -0
  918. package/node_modules/unist-util-visit-parents/lib/index.d.ts +219 -0
  919. package/node_modules/unist-util-visit-parents/lib/index.d.ts.map +1 -0
  920. package/node_modules/unist-util-visit-parents/lib/index.js +399 -0
  921. package/node_modules/unist-util-visit-parents/license +22 -0
  922. package/node_modules/unist-util-visit-parents/package.json +106 -0
  923. package/node_modules/unist-util-visit-parents/readme.md +388 -0
  924. package/node_modules/vfile/index.d.ts +153 -0
  925. package/node_modules/vfile/index.js +2 -0
  926. package/node_modules/vfile/lib/index.d.ts +1465 -0
  927. package/node_modules/vfile/lib/index.d.ts.map +1 -0
  928. package/node_modules/vfile/lib/index.js +643 -0
  929. package/node_modules/vfile/lib/minpath.browser.d.ts +47 -0
  930. package/node_modules/vfile/lib/minpath.browser.d.ts.map +1 -0
  931. package/node_modules/vfile/lib/minpath.browser.js +426 -0
  932. package/node_modules/vfile/lib/minpath.d.ts +2 -0
  933. package/node_modules/vfile/lib/minpath.d.ts.map +1 -0
  934. package/node_modules/vfile/lib/minpath.js +1 -0
  935. package/node_modules/vfile/lib/minproc.browser.d.ts +6 -0
  936. package/node_modules/vfile/lib/minproc.browser.d.ts.map +1 -0
  937. package/node_modules/vfile/lib/minproc.browser.js +8 -0
  938. package/node_modules/vfile/lib/minproc.d.ts +2 -0
  939. package/node_modules/vfile/lib/minproc.d.ts.map +1 -0
  940. package/node_modules/vfile/lib/minproc.js +1 -0
  941. package/node_modules/vfile/lib/minurl.browser.d.ts +9 -0
  942. package/node_modules/vfile/lib/minurl.browser.d.ts.map +1 -0
  943. package/node_modules/vfile/lib/minurl.browser.js +76 -0
  944. package/node_modules/vfile/lib/minurl.d.ts +3 -0
  945. package/node_modules/vfile/lib/minurl.d.ts.map +1 -0
  946. package/node_modules/vfile/lib/minurl.js +2 -0
  947. package/node_modules/vfile/lib/minurl.shared.d.ts +20 -0
  948. package/node_modules/vfile/lib/minurl.shared.d.ts.map +1 -0
  949. package/node_modules/vfile/lib/minurl.shared.js +31 -0
  950. package/node_modules/vfile/license +21 -0
  951. package/node_modules/vfile/package.json +134 -0
  952. package/node_modules/vfile/readme.md +785 -0
  953. package/node_modules/vfile-message/index.d.ts +2 -0
  954. package/node_modules/vfile-message/index.js +5 -0
  955. package/node_modules/vfile-message/lib/index.d.ts +508 -0
  956. package/node_modules/vfile-message/lib/index.js +314 -0
  957. package/node_modules/vfile-message/license +22 -0
  958. package/node_modules/vfile-message/package.json +80 -0
  959. package/node_modules/vfile-message/readme.md +252 -0
  960. package/node_modules/yaml/LICENSE +13 -0
  961. package/node_modules/yaml/README.md +172 -0
  962. package/node_modules/yaml/bin.mjs +11 -0
  963. package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
  964. package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
  965. package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
  966. package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
  967. package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
  968. package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
  969. package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
  970. package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
  971. package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
  972. package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
  973. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +226 -0
  974. package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
  975. package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
  976. package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
  977. package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
  978. package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
  979. package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
  980. package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  981. package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  982. package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  983. package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
  984. package/node_modules/yaml/browser/dist/errors.js +57 -0
  985. package/node_modules/yaml/browser/dist/index.js +17 -0
  986. package/node_modules/yaml/browser/dist/log.js +11 -0
  987. package/node_modules/yaml/browser/dist/nodes/Alias.js +118 -0
  988. package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
  989. package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
  990. package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
  991. package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
  992. package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
  993. package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
  994. package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
  995. package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
  996. package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
  997. package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
  998. package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
  999. package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
  1000. package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
  1001. package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
  1002. package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
  1003. package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
  1004. package/node_modules/yaml/browser/dist/public-api.js +102 -0
  1005. package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
  1006. package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
  1007. package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
  1008. package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
  1009. package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
  1010. package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
  1011. package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
  1012. package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
  1013. package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
  1014. package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
  1015. package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
  1016. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
  1017. package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
  1018. package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
  1019. package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
  1020. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
  1021. package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
  1022. package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
  1023. package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
  1024. package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
  1025. package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
  1026. package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
  1027. package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
  1028. package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
  1029. package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
  1030. package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
  1031. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
  1032. package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
  1033. package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
  1034. package/node_modules/yaml/browser/dist/util.js +11 -0
  1035. package/node_modules/yaml/browser/dist/visit.js +233 -0
  1036. package/node_modules/yaml/browser/index.js +5 -0
  1037. package/node_modules/yaml/browser/package.json +3 -0
  1038. package/node_modules/yaml/dist/cli.d.ts +8 -0
  1039. package/node_modules/yaml/dist/cli.mjs +201 -0
  1040. package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
  1041. package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  1042. package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
  1043. package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  1044. package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
  1045. package/node_modules/yaml/dist/compose/compose-node.js +112 -0
  1046. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
  1047. package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  1048. package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
  1049. package/node_modules/yaml/dist/compose/composer.js +224 -0
  1050. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
  1051. package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  1052. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
  1053. package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  1054. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
  1055. package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  1056. package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
  1057. package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  1058. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
  1059. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  1060. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
  1061. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +228 -0
  1062. package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
  1063. package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  1064. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
  1065. package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  1066. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
  1067. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  1068. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
  1069. package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  1070. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
  1071. package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  1072. package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
  1073. package/node_modules/yaml/dist/doc/Document.js +337 -0
  1074. package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
  1075. package/node_modules/yaml/dist/doc/anchors.js +76 -0
  1076. package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
  1077. package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  1078. package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
  1079. package/node_modules/yaml/dist/doc/createNode.js +90 -0
  1080. package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
  1081. package/node_modules/yaml/dist/doc/directives.js +178 -0
  1082. package/node_modules/yaml/dist/errors.d.ts +21 -0
  1083. package/node_modules/yaml/dist/errors.js +62 -0
  1084. package/node_modules/yaml/dist/index.d.ts +25 -0
  1085. package/node_modules/yaml/dist/index.js +50 -0
  1086. package/node_modules/yaml/dist/log.d.ts +3 -0
  1087. package/node_modules/yaml/dist/log.js +19 -0
  1088. package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
  1089. package/node_modules/yaml/dist/nodes/Alias.js +120 -0
  1090. package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
  1091. package/node_modules/yaml/dist/nodes/Collection.js +151 -0
  1092. package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
  1093. package/node_modules/yaml/dist/nodes/Node.js +40 -0
  1094. package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
  1095. package/node_modules/yaml/dist/nodes/Pair.js +39 -0
  1096. package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
  1097. package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  1098. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
  1099. package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  1100. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
  1101. package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  1102. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
  1103. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  1104. package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
  1105. package/node_modules/yaml/dist/nodes/identity.js +53 -0
  1106. package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
  1107. package/node_modules/yaml/dist/nodes/toJS.js +39 -0
  1108. package/node_modules/yaml/dist/options.d.ts +350 -0
  1109. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
  1110. package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  1111. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
  1112. package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  1113. package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
  1114. package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  1115. package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
  1116. package/node_modules/yaml/dist/parse/cst.js +112 -0
  1117. package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
  1118. package/node_modules/yaml/dist/parse/lexer.js +723 -0
  1119. package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
  1120. package/node_modules/yaml/dist/parse/line-counter.js +41 -0
  1121. package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
  1122. package/node_modules/yaml/dist/parse/parser.js +980 -0
  1123. package/node_modules/yaml/dist/public-api.d.ts +44 -0
  1124. package/node_modules/yaml/dist/public-api.js +107 -0
  1125. package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
  1126. package/node_modules/yaml/dist/schema/Schema.js +39 -0
  1127. package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
  1128. package/node_modules/yaml/dist/schema/common/map.js +19 -0
  1129. package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
  1130. package/node_modules/yaml/dist/schema/common/null.js +17 -0
  1131. package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
  1132. package/node_modules/yaml/dist/schema/common/seq.js +19 -0
  1133. package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
  1134. package/node_modules/yaml/dist/schema/common/string.js +16 -0
  1135. package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
  1136. package/node_modules/yaml/dist/schema/core/bool.js +21 -0
  1137. package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
  1138. package/node_modules/yaml/dist/schema/core/float.js +47 -0
  1139. package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
  1140. package/node_modules/yaml/dist/schema/core/int.js +42 -0
  1141. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
  1142. package/node_modules/yaml/dist/schema/core/schema.js +25 -0
  1143. package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
  1144. package/node_modules/yaml/dist/schema/json/schema.js +64 -0
  1145. package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
  1146. package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
  1147. package/node_modules/yaml/dist/schema/tags.js +99 -0
  1148. package/node_modules/yaml/dist/schema/types.d.ts +92 -0
  1149. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
  1150. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  1151. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
  1152. package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  1153. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
  1154. package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  1155. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
  1156. package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  1157. package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
  1158. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
  1159. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
  1160. package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  1161. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
  1162. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  1163. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
  1164. package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  1165. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
  1166. package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  1167. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
  1168. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  1169. package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
  1170. package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  1171. package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
  1172. package/node_modules/yaml/dist/stringify/stringify.js +132 -0
  1173. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
  1174. package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
  1175. package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
  1176. package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  1177. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
  1178. package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  1179. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
  1180. package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
  1181. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
  1182. package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  1183. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
  1184. package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  1185. package/node_modules/yaml/dist/test-events.d.ts +4 -0
  1186. package/node_modules/yaml/dist/test-events.js +134 -0
  1187. package/node_modules/yaml/dist/util.d.ts +16 -0
  1188. package/node_modules/yaml/dist/util.js +28 -0
  1189. package/node_modules/yaml/dist/visit.d.ts +102 -0
  1190. package/node_modules/yaml/dist/visit.js +236 -0
  1191. package/node_modules/yaml/package.json +97 -0
  1192. package/node_modules/yaml/util.js +2 -0
  1193. package/node_modules/zwitch/index.d.ts +67 -0
  1194. package/node_modules/zwitch/index.js +118 -0
  1195. package/node_modules/zwitch/license +22 -0
  1196. package/node_modules/zwitch/package.json +72 -0
  1197. package/node_modules/zwitch/readme.md +226 -0
  1198. package/package.json +13 -5
  1199. package/packages/pcr-core/schemas/guidance-batch-request.schema.json +12 -0
  1200. package/packages/pcr-core/schemas/guidance-output.schema.json +236 -28
  1201. package/packages/pcr-core/schemas/structured-projection.schema.json +576 -80
  1202. package/packages/pcr-core/src/classification-coverage.js +664 -0
  1203. package/packages/pcr-core/src/classification-coverage.js.map +1 -0
  1204. package/packages/pcr-core/src/compiler/guidance-context.js +135 -0
  1205. package/packages/pcr-core/src/compiler/guidance-context.js.map +1 -0
  1206. package/packages/pcr-core/src/compiler/guidance-envelope.js +78 -0
  1207. package/packages/pcr-core/src/compiler/guidance-envelope.js.map +1 -0
  1208. package/packages/pcr-core/src/compiler/normative-integrity.js +67 -0
  1209. package/packages/pcr-core/src/compiler/normative-integrity.js.map +1 -0
  1210. package/packages/pcr-core/src/compiler/normative-projection.js +276 -0
  1211. package/packages/pcr-core/src/compiler/normative-projection.js.map +1 -0
  1212. package/packages/pcr-core/src/compiler/source-context.js +231 -0
  1213. package/packages/pcr-core/src/compiler/source-context.js.map +1 -0
  1214. package/packages/pcr-core/src/consumption-calculation.js +61 -0
  1215. package/packages/pcr-core/src/consumption-calculation.js.map +1 -0
  1216. package/packages/pcr-core/src/consumption-data.js +99 -0
  1217. package/packages/pcr-core/src/consumption-data.js.map +1 -0
  1218. package/packages/pcr-core/src/consumption-guidance.js +107 -0
  1219. package/packages/pcr-core/src/consumption-guidance.js.map +1 -0
  1220. package/packages/pcr-core/src/consumption-review.js +103 -0
  1221. package/packages/pcr-core/src/consumption-review.js.map +1 -0
  1222. package/packages/pcr-core/src/contracts.js +163 -0
  1223. package/packages/pcr-core/src/contracts.js.map +1 -0
  1224. package/packages/pcr-core/src/generated/controlled-vocabulary.js +39 -0
  1225. package/packages/pcr-core/src/generated/controlled-vocabulary.js.map +1 -0
  1226. package/packages/pcr-core/src/index.js +1824 -0
  1227. package/packages/pcr-core/src/index.js.map +1 -0
  1228. package/packages/pcr-core/src/languages.js +85 -0
  1229. package/packages/pcr-core/src/languages.js.map +1 -0
  1230. package/packages/pcr-core/src/offline-library.js +302 -0
  1231. package/packages/pcr-core/src/offline-library.js.map +1 -0
  1232. package/packages/pcr-core/src/output-semantics.js +122 -0
  1233. package/packages/pcr-core/src/output-semantics.js.map +1 -0
  1234. package/packages/pcr-core/src/pcr-id-aliases.js +898 -0
  1235. package/packages/pcr-core/src/pcr-id-aliases.js.map +1 -0
  1236. package/packages/pcr-core/src/projection-completeness.js +172 -0
  1237. package/packages/pcr-core/src/projection-completeness.js.map +1 -0
  1238. package/packages/pcr-core/src/projection-integrity.js +177 -0
  1239. package/packages/pcr-core/src/projection-integrity.js.map +1 -0
  1240. package/packages/pcr-core/src/read-context.js +421 -0
  1241. package/packages/pcr-core/src/read-context.js.map +1 -0
  1242. package/packages/pcr-core/src/read-session.js +150 -0
  1243. package/packages/pcr-core/src/read-session.js.map +1 -0
  1244. package/packages/pcr-core/src/schema-validation.js +136 -0
  1245. package/packages/pcr-core/src/schema-validation.js.map +1 -0
  1246. package/packages/pcr-core/src/source-context.js +18 -0
  1247. package/packages/pcr-core/src/source-context.js.map +1 -0
  1248. package/packages/pcr-core/src/tidas-inspection.js +201 -0
  1249. package/packages/pcr-core/src/tidas-inspection.js.map +1 -0
  1250. package/packages/pcr-core/src/types.js +12 -0
  1251. package/packages/pcr-core/src/types.js.map +1 -0
  1252. package/packages/pcr-core/src/vocabulary.js +47 -0
  1253. package/packages/pcr-core/src/vocabulary.js.map +1 -0
  1254. package/packages/pcr-core/src/yaml-lite.js +267 -0
  1255. package/packages/pcr-core/src/yaml-lite.js.map +1 -0
  1256. package/packages/tiangong-pcr-cli/bin/tiangong-pcr.js +11 -0
  1257. package/packages/tiangong-pcr-cli/bin/tiangong-pcr.js.map +1 -0
  1258. package/packages/tiangong-pcr-cli/src/commands.js +1662 -0
  1259. package/packages/tiangong-pcr-cli/src/commands.js.map +1 -0
  1260. package/product-release.json +4 -4
  1261. package/skills/tiangong-pcr/SKILL.md +9 -2
  1262. package/packages/pcr-core/src/classification-coverage.mjs +0 -732
  1263. package/packages/pcr-core/src/consumption-calculation.mjs +0 -53
  1264. package/packages/pcr-core/src/consumption-data.mjs +0 -88
  1265. package/packages/pcr-core/src/consumption-guidance.mjs +0 -62
  1266. package/packages/pcr-core/src/consumption-review.mjs +0 -83
  1267. package/packages/pcr-core/src/contracts.mjs +0 -195
  1268. package/packages/pcr-core/src/generated/controlled-vocabulary.mjs +0 -41
  1269. package/packages/pcr-core/src/index.mjs +0 -2101
  1270. package/packages/pcr-core/src/languages.mjs +0 -86
  1271. package/packages/pcr-core/src/offline-library.mjs +0 -121
  1272. package/packages/pcr-core/src/output-semantics.mjs +0 -228
  1273. package/packages/pcr-core/src/pcr-id-aliases.mjs +0 -949
  1274. package/packages/pcr-core/src/projection-completeness.mjs +0 -284
  1275. package/packages/pcr-core/src/projection-integrity.mjs +0 -208
  1276. package/packages/pcr-core/src/read-context.mjs +0 -505
  1277. package/packages/pcr-core/src/schema-validation.mjs +0 -142
  1278. package/packages/pcr-core/src/source-context.mjs +0 -13
  1279. package/packages/pcr-core/src/tidas-inspection.mjs +0 -177
  1280. package/packages/pcr-core/src/yaml-lite.mjs +0 -261
  1281. package/packages/tiangong-pcr-cli/bin/tiangong-pcr.mjs +0 -12
  1282. package/packages/tiangong-pcr-cli/src/commands.mjs +0 -1691
@@ -0,0 +1,302 @@
1
+ import { createHash } from "node:crypto";
2
+ import { createRequire } from "node:module";
3
+ import { closeSync, openSync, readSync, readFileSync, statSync } from "node:fs";
4
+ import path from "node:path";
5
+ import { inflateRawSync } from "node:zlib";
6
+ import { parseYaml } from "./yaml-lite.js";
7
+ import { expectedPcrArtifactHashes } from "./languages.js";
8
+ import { PcrClassificationCoverageNotFoundError } from "./classification-coverage.js";
9
+ import { isPcrIdAlias } from "./pcr-id-aliases.js";
10
+ import { assertCoreContract } from "./contracts.js";
11
+ import { isUnknownRecord, errorCode, errorMessage } from "./types.js";
12
+ export const LIBRARY_FORMAT_VERSION = 1;
13
+ const UTF8_DECODER = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
14
+ export const sha256 = (bytes) => `sha256:${createHash("sha256").update(bytes).digest("hex")}`;
15
+ export function libraryError(code, message) {
16
+ return Object.assign(new Error(message), { code });
17
+ }
18
+ /** The provider can import this module without eagerly loading SQLite. */
19
+ export function sqliteDatabase() {
20
+ const [major = 0, minor = 0] = process.versions.node.split(".").map(Number);
21
+ if (major < 24 || (major === 24 && minor < 19)) {
22
+ throw libraryError("PCR_LIBRARY_RUNTIME_UNSUPPORTED", "Offline libraries require Node.js 24.19 or newer.");
23
+ }
24
+ const sqlite = createRequire(import.meta.url)("node:sqlite");
25
+ if (!isSqliteModule(sqlite))
26
+ throw libraryError("PCR_LIBRARY_RUNTIME_UNSUPPORTED", "Node SQLite DatabaseSync is unavailable.");
27
+ return sqlite.DatabaseSync;
28
+ }
29
+ function isSqliteModule(value) {
30
+ if (!isUnknownRecord(value) || typeof value.DatabaseSync !== "function")
31
+ return false;
32
+ const prototype = value.DatabaseSync.prototype;
33
+ return isUnknownRecord(prototype) && ["prepare", "exec", "close"].every(name => typeof prototype[name] === "function");
34
+ }
35
+ export function hashFile(filename) {
36
+ const hash = createHash("sha256");
37
+ const fd = openSync(filename, "r");
38
+ const buffer = Buffer.alloc(1024 * 1024);
39
+ try {
40
+ let count;
41
+ while ((count = readSync(fd, buffer, 0, buffer.length, null)))
42
+ hash.update(buffer.subarray(0, count));
43
+ return `sha256:${hash.digest("hex")}`;
44
+ }
45
+ finally {
46
+ closeSync(fd);
47
+ }
48
+ }
49
+ export function metadataDigest(db, table) {
50
+ if (!["records", "aliases", "coverage", "files"].includes(table))
51
+ throw new Error("Unknown snapshot table.");
52
+ const hash = createHash("sha256");
53
+ const columns = table === "files" ? "key, size, sha256" : "key, value, sha256";
54
+ for (const row of db.prepare(`SELECT ${columns} FROM ${table} ORDER BY key`).iterate()) {
55
+ // Preserve native SQLite column order: it is part of the existing digest.
56
+ hash.update(JSON.stringify(row));
57
+ hash.update("\n");
58
+ }
59
+ return `sha256:${hash.digest("hex")}`;
60
+ }
61
+ function object(value, label) {
62
+ if (!isUnknownRecord(value))
63
+ throw new Error(`Invalid ${label}.`);
64
+ return value;
65
+ }
66
+ function string(value, label) {
67
+ if (typeof value !== "string")
68
+ throw new Error(`Invalid ${label}.`);
69
+ return value;
70
+ }
71
+ function number(value, label) {
72
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0)
73
+ throw new Error(`Invalid ${label}.`);
74
+ return value;
75
+ }
76
+ function stringArray(value, label) {
77
+ if (!Array.isArray(value) || !value.every((entry) => typeof entry === "string"))
78
+ throw new Error(`Invalid ${label}.`);
79
+ return value;
80
+ }
81
+ function stringRecord(value, label) {
82
+ const fields = object(value, label);
83
+ for (const field of Object.values(fields))
84
+ string(field, label);
85
+ return fields;
86
+ }
87
+ function titleRecord(value) {
88
+ const fields = object(value, "PCR titles");
89
+ for (const field of Object.values(fields))
90
+ if (field !== null)
91
+ string(field, "PCR title");
92
+ return fields;
93
+ }
94
+ function json(text) { return JSON.parse(text); }
95
+ function pcrRecord(value) {
96
+ const record = object(value, "PCR record");
97
+ const languages = object(record.languages, "record languages");
98
+ const canonical = languages.canonical;
99
+ const available = languages.available;
100
+ if (canonical !== undefined)
101
+ string(canonical, "canonical language");
102
+ if (available !== undefined)
103
+ stringArray(available, "available languages");
104
+ const version = record.version;
105
+ const maturity = record.content_maturity;
106
+ if (version !== null)
107
+ string(version, "PCR version");
108
+ if (maturity !== null)
109
+ string(maturity, "PCR content maturity");
110
+ const kind = record.record_kind;
111
+ if (kind !== "methodology" && kind !== "legacy_scaffold_reference" && kind !== "invalid_lifecycle_state")
112
+ throw new Error("Invalid PCR record kind.");
113
+ if (!Array.isArray(record.classification_refs) || !record.classification_refs.every(isUnknownRecord))
114
+ throw new Error("Invalid PCR classification refs.");
115
+ assertCoreContract("readiness.schema.json", record.readiness);
116
+ return {
117
+ ...record,
118
+ id: string(record.id, "PCR id"), path: string(record.path, "PCR path"),
119
+ title: titleRecord(record.title), status: string(record.status, "PCR status"),
120
+ version: version === null ? null : string(version, "PCR version"),
121
+ content_maturity: maturity === null ? null : string(maturity, "PCR content maturity"),
122
+ languages: {
123
+ ...languages,
124
+ ...(canonical === undefined ? {} : { canonical: string(canonical, "canonical language") }),
125
+ ...(available === undefined ? {} : { available: stringArray(available, "available languages") }),
126
+ },
127
+ translation_status: stringRecord(record.translation_status, "translation status"),
128
+ classification_refs: record.classification_refs, record_kind: kind,
129
+ // Successful existing schema and semantic validation is the narrowing proof.
130
+ readiness: record.readiness,
131
+ };
132
+ }
133
+ function snapshot(value) {
134
+ const fields = object(value, "snapshot metadata");
135
+ return {
136
+ ...fields,
137
+ available_languages: stringArray(fields.available_languages, "snapshot languages"),
138
+ content_version: string(fields.content_version, "content version"),
139
+ source_commit: string(fields.source_commit, "source commit"),
140
+ source_sha256: string(fields.source_sha256, "source fingerprint"),
141
+ records: number(fields.records, "record count"), material_records: number(fields.material_records, "material record count"),
142
+ aliases: number(fields.aliases, "alias count"), original_bytes: number(fields.original_bytes, "original byte count"),
143
+ };
144
+ }
145
+ function manifest(value) {
146
+ if (value.kind !== "tiangong-pcr-library" || value.format_version !== 1)
147
+ throw new Error("Invalid library manifest.");
148
+ const indexes = object(value.index_sha256, "index hashes");
149
+ // Keep original key order in sidecar/snapshot objects for historical equality.
150
+ const metadata = snapshot(value.snapshot);
151
+ const hashes = {
152
+ records: string(indexes.records, "records index hash"), aliases: string(indexes.aliases, "aliases index hash"),
153
+ coverage: string(indexes.coverage, "coverage index hash"), files: string(indexes.files, "files index hash"),
154
+ };
155
+ return { ...value, kind: value.kind, format_version: 1, snapshot: metadata,
156
+ bytes: number(value.bytes, "library byte length"), sha256: string(value.sha256, "library checksum"), index_sha256: hashes };
157
+ }
158
+ function rowValue(row, name) { return row?.[name]; }
159
+ /** Read-only adapter; all original content remains compressed until selected. */
160
+ export class OfflineLibrary {
161
+ filename;
162
+ root;
163
+ onArtifactRead;
164
+ languages = ["en-US"];
165
+ manifest;
166
+ db = null;
167
+ constructor(filename, { expectedSha256 = null, verify = false, onArtifactRead = null } = {}) {
168
+ this.filename = path.resolve(filename);
169
+ this.root = path.dirname(this.filename);
170
+ this.onArtifactRead = onArtifactRead;
171
+ try {
172
+ const decoded = object(json(UTF8_DECODER.decode(readFileSync(`${this.filename}.json`))), "library manifest");
173
+ if (decoded.format_version !== LIBRARY_FORMAT_VERSION) {
174
+ throw libraryError("PCR_LIBRARY_FORMAT_UNSUPPORTED", `Unsupported library format ${String(decoded.format_version)}; supported: ${LIBRARY_FORMAT_VERSION}.`);
175
+ }
176
+ if (JSON.stringify(isUnknownRecord(decoded.snapshot) ? decoded.snapshot.available_languages : undefined) !== JSON.stringify(this.languages))
177
+ throw new Error("Unsupported library language policy; expected English only.");
178
+ if (decoded.kind !== "tiangong-pcr-library" || !/^sha256:[a-f0-9]{64}$/u.test(String(decoded.sha256 ?? "")))
179
+ throw new Error("Invalid library manifest.");
180
+ this.manifest = manifest(decoded);
181
+ if (statSync(this.filename).size !== this.manifest.bytes)
182
+ throw new Error("Library byte length differs from manifest.");
183
+ if (expectedSha256 !== null && !/^sha256:[a-f0-9]{64}$/u.test(expectedSha256))
184
+ throw new Error("Expected SHA-256 must use sha256:<64 lowercase hex digits>.");
185
+ if (verify || expectedSha256 !== null) {
186
+ const digest = hashFile(this.filename);
187
+ if (digest !== this.manifest.sha256 || (expectedSha256 !== null && digest !== expectedSha256))
188
+ throw new Error("Library SHA-256 mismatch.");
189
+ }
190
+ const DatabaseSync = sqliteDatabase();
191
+ this.db = new DatabaseSync(this.filename, { readOnly: true, allowExtension: false, defensive: true });
192
+ this.db.exec("PRAGMA query_only = ON; PRAGMA trusted_schema = OFF; BEGIN;");
193
+ if (rowValue(this.db.prepare("PRAGMA user_version").get(), "user_version") !== LIBRARY_FORMAT_VERSION)
194
+ throw libraryError("PCR_LIBRARY_FORMAT_UNSUPPORTED", "SQLite format version does not match the reader.");
195
+ const metadata = json(string(rowValue(this.db.prepare("SELECT value FROM metadata WHERE key = 'snapshot'").get(), "value") ?? "null", "snapshot JSON"));
196
+ if (JSON.stringify(metadata) !== JSON.stringify(this.manifest.snapshot))
197
+ throw new Error("Snapshot identity differs from manifest.");
198
+ for (const table of ["records", "aliases", "coverage", "files"]) {
199
+ if (metadataDigest(this.db, table) !== this.manifest.index_sha256[table])
200
+ throw new Error(`Library ${table} index checksum mismatch.`);
201
+ }
202
+ if (verify && rowValue(this.db.prepare("PRAGMA integrity_check").get(), "integrity_check") !== "ok")
203
+ throw new Error("SQLite integrity check failed.");
204
+ }
205
+ catch (error) {
206
+ this.close();
207
+ if (errorCode(error).startsWith("PCR_LIBRARY_"))
208
+ throw error;
209
+ throw libraryError("PCR_LIBRARY_INVALID", `Cannot open offline library ${this.filename}: ${errorMessage(error)}`);
210
+ }
211
+ }
212
+ close() { this.db?.close(); this.db = null; }
213
+ database() {
214
+ if (this.db === null)
215
+ throw libraryError("PCR_LIBRARY_INVALID", "Offline library is closed.");
216
+ return this.db;
217
+ }
218
+ row(table, key) {
219
+ const row = this.database().prepare(`SELECT value, sha256 FROM ${table} WHERE key = ?`).get(key);
220
+ if (!row)
221
+ return null;
222
+ const value = string(row.value, "snapshot JSON row");
223
+ if (sha256(value) !== row.sha256)
224
+ throw libraryError("PCR_LIBRARY_INVALID", `Invalid ${table} row: ${key}`);
225
+ return json(value);
226
+ }
227
+ listPcrs(scope) {
228
+ const where = scope === "all" ? "" : scope === "material" ? " WHERE kind = 'methodology'" : " WHERE kind = 'legacy_scaffold_reference'";
229
+ return this.database().prepare(`SELECT value FROM records${where} ORDER BY position`).all().map(row => pcrRecord(json(string(row.value, "PCR record JSON"))));
230
+ }
231
+ entry(id) {
232
+ const value = this.row("records", String(id));
233
+ if (value === null)
234
+ return null;
235
+ const record = object(value, "PCR record");
236
+ const relative = string(record.path, "PCR path");
237
+ return { id: string(record.id, "PCR id"), path: relative, manifestPath: path.join(this.root, relative, "manifest.yaml") };
238
+ }
239
+ findAlias(id) {
240
+ const value = this.row("aliases", String(id));
241
+ if (value === null)
242
+ return null;
243
+ if (!isPcrIdAlias(value))
244
+ throw libraryError("PCR_LIBRARY_INVALID", `Invalid aliases row: ${String(id)}`);
245
+ return value;
246
+ }
247
+ readFile(key) {
248
+ const row = this.database().prepare("SELECT data, size, sha256 FROM files WHERE key = ?").get(key);
249
+ if (!row)
250
+ throw libraryError("PCR_LIBRARY_ARTIFACT_MISSING", `Missing library artifact: ${key}`);
251
+ try {
252
+ if (!(row.data instanceof Uint8Array))
253
+ throw new Error("invalid compressed blob");
254
+ const size = number(row.size, "artifact size");
255
+ const bytes = inflateRawSync(row.data, { maxOutputLength: Math.max(1, size) });
256
+ if (bytes.length !== size || sha256(bytes) !== row.sha256)
257
+ throw new Error("checksum mismatch");
258
+ this.onArtifactRead?.(key);
259
+ return bytes;
260
+ }
261
+ catch (error) {
262
+ throw libraryError("PCR_LIBRARY_ARTIFACT_INVALID", `Invalid library artifact ${key}: ${errorMessage(error)}`);
263
+ }
264
+ }
265
+ snapshotFiles(entry) {
266
+ const manifestBytes = this.readFile(`${entry.path}/manifest.yaml`);
267
+ let manifestText;
268
+ try {
269
+ manifestText = UTF8_DECODER.decode(manifestBytes);
270
+ }
271
+ catch {
272
+ throw libraryError("PCR_LIBRARY_ARTIFACT_INVALID", `Invalid library artifact ${entry.path}/manifest.yaml: input is not valid UTF-8.`);
273
+ }
274
+ const manifest = object(parseYaml(manifestText), "PCR manifest");
275
+ if (manifest.id !== entry.id)
276
+ throw libraryError("PCR_LIBRARY_INVALID", "PCR manifest identity mismatch.");
277
+ const artifacts = Object.fromEntries(["pcr.en-US.md", "structured.yaml"].map(name => [name, { bytes: this.readFile(`${entry.path}/${name}`) }]));
278
+ for (const [name, expected] of Object.entries(manifest.release_artifacts ? expectedPcrArtifactHashes(manifest) : {})) {
279
+ if (!Object.hasOwn(artifacts, name))
280
+ continue;
281
+ if (manifest.release_artifacts && sha256(artifacts[name]?.bytes ?? Buffer.alloc(0)) !== expected)
282
+ throw libraryError("PCR_LIBRARY_ARTIFACT_INVALID", `Release artifact hash mismatch: ${entry.path}/${name}`);
283
+ }
284
+ return { manifest, manifestBytes, artifacts };
285
+ }
286
+ coverageSnapshot(system, version) {
287
+ const key = `${String(system).toLowerCase()}:${String(version)}`;
288
+ const value = this.row("coverage", key);
289
+ if (value === null)
290
+ throw new PcrClassificationCoverageNotFoundError({ system: String(system), version: String(version), relativePath: `classifications/indexes/${String(system)}-${String(version)}-coverage.json` });
291
+ if (!isCoverageSnapshot(value))
292
+ throw libraryError("PCR_LIBRARY_INVALID", "Invalid coverage snapshot.");
293
+ return value;
294
+ }
295
+ }
296
+ function isCoverageSnapshot(value) {
297
+ if (!isUnknownRecord(value) || typeof value.relative_path !== "string" || typeof value.sha256 !== "string")
298
+ return false;
299
+ assertCoreContract("classification-coverage.schema.json", value.document);
300
+ return true;
301
+ }
302
+ //# sourceMappingURL=offline-library.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offline-library.js","sourceRoot":"pcr://source/","sources":["packages/pcr-core/src/offline-library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEhF,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,sCAAsC,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAA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AAC,eAAe,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACzH,kBAAkB,CAAC,qCAAqC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1E,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { createHash, type BinaryLike } from \"node:crypto\";\nimport { createRequire } from \"node:module\";\nimport { closeSync, openSync, readSync, readFileSync, statSync } from \"node:fs\";\nimport type { DatabaseSync, SQLOutputValue } from \"node:sqlite\";\nimport path from \"node:path\";\nimport { inflateRawSync } from \"node:zlib\";\nimport { parseYaml } from \"./yaml-lite.ts\";\nimport { expectedPcrArtifactHashes } from \"./languages.ts\";\nimport { PcrClassificationCoverageNotFoundError } from \"./classification-coverage.ts\";\nimport { isPcrIdAlias } from \"./pcr-id-aliases.ts\";\nimport { assertCoreContract } from \"./contracts.ts\";\nimport { isUnknownRecord, errorCode, errorMessage } from \"./types.ts\";\nimport type { CatalogEntry, CapturedPcrSnapshot, CoverageSnapshot, OfflineManifest, OfflineSnapshot, PcrCatalogScope, PcrIdAlias, PcrRecord, PcrSource, Readiness, UnknownRecord } from \"./types.ts\";\n\nexport const LIBRARY_FORMAT_VERSION = 1;\nconst UTF8_DECODER = new TextDecoder(\"utf-8\", { fatal: true, ignoreBOM: true });\nexport const sha256 = (bytes: BinaryLike): string => `sha256:${createHash(\"sha256\").update(bytes).digest(\"hex\")}`;\nexport function libraryError(code: string, message: string): Error & { code: string } {\n return Object.assign(new Error(message), { code });\n}\n\n/** The provider can import this module without eagerly loading SQLite. */\nexport function sqliteDatabase(): typeof DatabaseSync {\n const [major = 0, minor = 0] = process.versions.node.split(\".\").map(Number);\n if (major < 24 || (major === 24 && minor < 19)) {\n throw libraryError(\"PCR_LIBRARY_RUNTIME_UNSUPPORTED\", \"Offline libraries require Node.js 24.19 or newer.\");\n }\n const sqlite: unknown = createRequire(import.meta.url)(\"node:sqlite\");\n if (!isSqliteModule(sqlite)) throw libraryError(\"PCR_LIBRARY_RUNTIME_UNSUPPORTED\", \"Node SQLite DatabaseSync is unavailable.\");\n return sqlite.DatabaseSync;\n}\nfunction isSqliteModule(value: unknown): value is { DatabaseSync: typeof DatabaseSync } {\n if (!isUnknownRecord(value) || typeof value.DatabaseSync !== \"function\") return false;\n const prototype: unknown = value.DatabaseSync.prototype;\n return isUnknownRecord(prototype) && [\"prepare\", \"exec\", \"close\"].every(name => typeof prototype[name] === \"function\");\n}\nexport function hashFile(filename: string): string {\n const hash = createHash(\"sha256\");\n const fd = openSync(filename, \"r\");\n const buffer = Buffer.alloc(1024 * 1024);\n try {\n let count: number;\n while ((count = readSync(fd, buffer, 0, buffer.length, null))) hash.update(buffer.subarray(0, count));\n return `sha256:${hash.digest(\"hex\")}`;\n } finally { closeSync(fd); }\n}\nexport type SnapshotTable = \"records\" | \"aliases\" | \"coverage\" | \"files\";\nexport function metadataDigest(db: DatabaseSync, table: SnapshotTable): string {\n if (![\"records\", \"aliases\", \"coverage\", \"files\"].includes(table)) throw new Error(\"Unknown snapshot table.\");\n const hash = createHash(\"sha256\");\n const columns = table === \"files\" ? \"key, size, sha256\" : \"key, value, sha256\";\n for (const row of db.prepare(`SELECT ${columns} FROM ${table} ORDER BY key`).iterate()) {\n // Preserve native SQLite column order: it is part of the existing digest.\n hash.update(JSON.stringify(row)); hash.update(\"\\n\");\n }\n return `sha256:${hash.digest(\"hex\")}`;\n}\nfunction object(value: unknown, label: string): UnknownRecord {\n if (!isUnknownRecord(value)) throw new Error(`Invalid ${label}.`);\n return value;\n}\nfunction string(value: unknown, label: string): string {\n if (typeof value !== \"string\") throw new Error(`Invalid ${label}.`);\n return value;\n}\nfunction number(value: unknown, label: string): number {\n if (typeof value !== \"number\" || !Number.isSafeInteger(value) || value < 0) throw new Error(`Invalid ${label}.`);\n return value;\n}\nfunction stringArray(value: unknown, label: string): string[] {\n if (!Array.isArray(value) || !value.every((entry: unknown) => typeof entry === \"string\")) throw new Error(`Invalid ${label}.`);\n return value as string[];\n}\nfunction stringRecord(value: unknown, label: string): Record<string, string> {\n const fields = object(value, label);\n for (const field of Object.values(fields)) string(field, label);\n return fields as Record<string, string>;\n}\nfunction titleRecord(value: unknown): Record<string, string | null> {\n const fields = object(value, \"PCR titles\");\n for (const field of Object.values(fields)) if (field !== null) string(field, \"PCR title\");\n return fields as Record<string, string | null>;\n}\nfunction json(text: string): unknown { return JSON.parse(text) as unknown; }\nfunction pcrRecord(value: unknown): PcrRecord {\n const record = object(value, \"PCR record\");\n const languages = object(record.languages, \"record languages\");\n const canonical = languages.canonical;\n const available = languages.available;\n if (canonical !== undefined) string(canonical, \"canonical language\");\n if (available !== undefined) stringArray(available, \"available languages\");\n const version = record.version;\n const maturity = record.content_maturity;\n if (version !== null) string(version, \"PCR version\");\n if (maturity !== null) string(maturity, \"PCR content maturity\");\n const kind = record.record_kind;\n if (kind !== \"methodology\" && kind !== \"legacy_scaffold_reference\" && kind !== \"invalid_lifecycle_state\") throw new Error(\"Invalid PCR record kind.\");\n if (!Array.isArray(record.classification_refs) || !record.classification_refs.every(isUnknownRecord)) throw new Error(\"Invalid PCR classification refs.\");\n assertCoreContract(\"readiness.schema.json\", record.readiness);\n return {\n ...record,\n id: string(record.id, \"PCR id\"), path: string(record.path, \"PCR path\"),\n title: titleRecord(record.title), status: string(record.status, \"PCR status\"),\n version: version === null ? null : string(version, \"PCR version\"),\n content_maturity: maturity === null ? null : string(maturity, \"PCR content maturity\"),\n languages: {\n ...languages,\n ...(canonical === undefined ? {} : { canonical: string(canonical, \"canonical language\") }),\n ...(available === undefined ? {} : { available: stringArray(available, \"available languages\") }),\n },\n translation_status: stringRecord(record.translation_status, \"translation status\"),\n classification_refs: record.classification_refs, record_kind: kind,\n // Successful existing schema and semantic validation is the narrowing proof.\n readiness: record.readiness as Readiness,\n };\n}\nfunction snapshot(value: unknown): OfflineSnapshot {\n const fields = object(value, \"snapshot metadata\");\n return {\n ...fields,\n available_languages: stringArray(fields.available_languages, \"snapshot languages\"),\n content_version: string(fields.content_version, \"content version\"),\n source_commit: string(fields.source_commit, \"source commit\"),\n source_sha256: string(fields.source_sha256, \"source fingerprint\"),\n records: number(fields.records, \"record count\"), material_records: number(fields.material_records, \"material record count\"),\n aliases: number(fields.aliases, \"alias count\"), original_bytes: number(fields.original_bytes, \"original byte count\"),\n };\n}\nfunction manifest(value: UnknownRecord): OfflineManifest {\n if (value.kind !== \"tiangong-pcr-library\" || value.format_version !== 1) throw new Error(\"Invalid library manifest.\");\n const indexes = object(value.index_sha256, \"index hashes\");\n // Keep original key order in sidecar/snapshot objects for historical equality.\n const metadata = snapshot(value.snapshot);\n const hashes: Record<SnapshotTable, string> = {\n records: string(indexes.records, \"records index hash\"), aliases: string(indexes.aliases, \"aliases index hash\"),\n coverage: string(indexes.coverage, \"coverage index hash\"), files: string(indexes.files, \"files index hash\"),\n };\n return { ...value, kind: value.kind, format_version: 1, snapshot: metadata,\n bytes: number(value.bytes, \"library byte length\"), sha256: string(value.sha256, \"library checksum\"), index_sha256: hashes };\n}\nfunction rowValue(row: Record<string, SQLOutputValue> | undefined, name: string): unknown { return row?.[name]; }\n\nexport interface OfflineLibraryOptions { expectedSha256?: string | null; verify?: boolean; onArtifactRead?: ((key: string) => void) | null }\n/** Read-only adapter; all original content remains compressed until selected. */\nexport class OfflineLibrary implements PcrSource {\n readonly filename: string;\n readonly root: string;\n readonly onArtifactRead: ((key: string) => void) | null;\n readonly languages = [\"en-US\"];\n readonly manifest: OfflineManifest;\n db: DatabaseSync | null = null;\n\n constructor(filename: string, { expectedSha256 = null, verify = false, onArtifactRead = null }: OfflineLibraryOptions = {}) {\n this.filename = path.resolve(filename);\n this.root = path.dirname(this.filename);\n this.onArtifactRead = onArtifactRead;\n try {\n const decoded = object(json(UTF8_DECODER.decode(readFileSync(`${this.filename}.json`))), \"library manifest\");\n if (decoded.format_version !== LIBRARY_FORMAT_VERSION) {\n throw libraryError(\"PCR_LIBRARY_FORMAT_UNSUPPORTED\", `Unsupported library format ${String(decoded.format_version)}; supported: ${LIBRARY_FORMAT_VERSION}.`);\n }\n if (JSON.stringify(isUnknownRecord(decoded.snapshot) ? decoded.snapshot.available_languages : undefined) !== JSON.stringify(this.languages)) throw new Error(\"Unsupported library language policy; expected English only.\");\n if (decoded.kind !== \"tiangong-pcr-library\" || !/^sha256:[a-f0-9]{64}$/u.test(String(decoded.sha256 ?? \"\"))) throw new Error(\"Invalid library manifest.\");\n this.manifest = manifest(decoded);\n if (statSync(this.filename).size !== this.manifest.bytes) throw new Error(\"Library byte length differs from manifest.\");\n if (expectedSha256 !== null && !/^sha256:[a-f0-9]{64}$/u.test(expectedSha256)) throw new Error(\"Expected SHA-256 must use sha256:<64 lowercase hex digits>.\");\n if (verify || expectedSha256 !== null) {\n const digest = hashFile(this.filename);\n if (digest !== this.manifest.sha256 || (expectedSha256 !== null && digest !== expectedSha256)) throw new Error(\"Library SHA-256 mismatch.\");\n }\n const DatabaseSync = sqliteDatabase();\n this.db = new DatabaseSync(this.filename, { readOnly: true, allowExtension: false, defensive: true });\n this.db.exec(\"PRAGMA query_only = ON; PRAGMA trusted_schema = OFF; BEGIN;\");\n if (rowValue(this.db.prepare(\"PRAGMA user_version\").get(), \"user_version\") !== LIBRARY_FORMAT_VERSION) throw libraryError(\"PCR_LIBRARY_FORMAT_UNSUPPORTED\", \"SQLite format version does not match the reader.\");\n const metadata = json(string(rowValue(this.db.prepare(\"SELECT value FROM metadata WHERE key = 'snapshot'\").get(), \"value\") ?? \"null\", \"snapshot JSON\"));\n if (JSON.stringify(metadata) !== JSON.stringify(this.manifest.snapshot)) throw new Error(\"Snapshot identity differs from manifest.\");\n for (const table of [\"records\", \"aliases\", \"coverage\", \"files\"] as const) {\n if (metadataDigest(this.db, table) !== this.manifest.index_sha256[table]) throw new Error(`Library ${table} index checksum mismatch.`);\n }\n if (verify && rowValue(this.db.prepare(\"PRAGMA integrity_check\").get(), \"integrity_check\") !== \"ok\") throw new Error(\"SQLite integrity check failed.\");\n } catch (error: unknown) {\n this.close();\n if (errorCode(error).startsWith(\"PCR_LIBRARY_\")) throw error;\n throw libraryError(\"PCR_LIBRARY_INVALID\", `Cannot open offline library ${this.filename}: ${errorMessage(error)}`);\n }\n }\n close(): void { this.db?.close(); this.db = null; }\n private database(): DatabaseSync {\n if (this.db === null) throw libraryError(\"PCR_LIBRARY_INVALID\", \"Offline library is closed.\");\n return this.db;\n }\n row(table: Exclude<SnapshotTable, \"files\">, key: string): unknown {\n const row = this.database().prepare(`SELECT value, sha256 FROM ${table} WHERE key = ?`).get(key);\n if (!row) return null;\n const value = string(row.value, \"snapshot JSON row\");\n if (sha256(value) !== row.sha256) throw libraryError(\"PCR_LIBRARY_INVALID\", `Invalid ${table} row: ${key}`);\n return json(value);\n }\n listPcrs(scope: PcrCatalogScope): PcrRecord[] {\n const where = scope === \"all\" ? \"\" : scope === \"material\" ? \" WHERE kind = 'methodology'\" : \" WHERE kind = 'legacy_scaffold_reference'\";\n return this.database().prepare(`SELECT value FROM records${where} ORDER BY position`).all().map(row => pcrRecord(json(string(row.value, \"PCR record JSON\"))));\n }\n entry(id: unknown): CatalogEntry | null {\n const value = this.row(\"records\", String(id));\n if (value === null) return null;\n const record = object(value, \"PCR record\");\n const relative = string(record.path, \"PCR path\");\n return { id: string(record.id, \"PCR id\"), path: relative, manifestPath: path.join(this.root, relative, \"manifest.yaml\") };\n }\n findAlias(id: unknown): PcrIdAlias | null {\n const value = this.row(\"aliases\", String(id));\n if (value === null) return null;\n if (!isPcrIdAlias(value)) throw libraryError(\"PCR_LIBRARY_INVALID\", `Invalid aliases row: ${String(id)}`);\n return value;\n }\n readFile(key: string): Buffer {\n const row = this.database().prepare(\"SELECT data, size, sha256 FROM files WHERE key = ?\").get(key);\n if (!row) throw libraryError(\"PCR_LIBRARY_ARTIFACT_MISSING\", `Missing library artifact: ${key}`);\n try {\n if (!(row.data instanceof Uint8Array)) throw new Error(\"invalid compressed blob\");\n const size = number(row.size, \"artifact size\");\n const bytes = inflateRawSync(row.data, { maxOutputLength: Math.max(1, size) });\n if (bytes.length !== size || sha256(bytes) !== row.sha256) throw new Error(\"checksum mismatch\");\n this.onArtifactRead?.(key);\n return bytes;\n } catch (error: unknown) { throw libraryError(\"PCR_LIBRARY_ARTIFACT_INVALID\", `Invalid library artifact ${key}: ${errorMessage(error)}`); }\n }\n snapshotFiles(entry: CatalogEntry): CapturedPcrSnapshot {\n const manifestBytes = this.readFile(`${entry.path}/manifest.yaml`);\n let manifestText: string;\n try { manifestText = UTF8_DECODER.decode(manifestBytes); }\n catch { throw libraryError(\"PCR_LIBRARY_ARTIFACT_INVALID\", `Invalid library artifact ${entry.path}/manifest.yaml: input is not valid UTF-8.`); }\n const manifest = object(parseYaml(manifestText), \"PCR manifest\");\n if (manifest.id !== entry.id) throw libraryError(\"PCR_LIBRARY_INVALID\", \"PCR manifest identity mismatch.\");\n const artifacts: CapturedPcrSnapshot[\"artifacts\"] = Object.fromEntries([\"pcr.en-US.md\", \"structured.yaml\"].map(name => [name, { bytes: this.readFile(`${entry.path}/${name}`) }]));\n for (const [name, expected] of Object.entries(manifest.release_artifacts ? expectedPcrArtifactHashes(manifest) : {})) {\n if (!Object.hasOwn(artifacts, name)) continue;\n if (manifest.release_artifacts && sha256(artifacts[name]?.bytes ?? Buffer.alloc(0)) !== expected) throw libraryError(\"PCR_LIBRARY_ARTIFACT_INVALID\", `Release artifact hash mismatch: ${entry.path}/${name}`);\n }\n return { manifest, manifestBytes, artifacts };\n }\n coverageSnapshot(system: unknown, version: unknown): CoverageSnapshot {\n const key = `${String(system).toLowerCase()}:${String(version)}`;\n const value = this.row(\"coverage\", key);\n if (value === null) throw new PcrClassificationCoverageNotFoundError({ system: String(system), version: String(version), relativePath: `classifications/indexes/${String(system)}-${String(version)}-coverage.json` });\n if (!isCoverageSnapshot(value)) throw libraryError(\"PCR_LIBRARY_INVALID\", \"Invalid coverage snapshot.\");\n return value;\n }\n}\n\nfunction isCoverageSnapshot(value: unknown): value is CoverageSnapshot {\n if (!isUnknownRecord(value) || typeof value.relative_path !== \"string\" || typeof value.sha256 !== \"string\") return false;\n assertCoreContract(\"classification-coverage.schema.json\", value.document);\n return true;\n}\n"]}
@@ -0,0 +1,122 @@
1
+ function semanticIssue(code, instancePath, message, params = {}) {
2
+ return {
3
+ code: `semantic.${code}`,
4
+ instance_path: instancePath,
5
+ schema_path: `#/x-semantic/${code.replaceAll(".", "/")}`,
6
+ keyword: "semantic",
7
+ message,
8
+ params,
9
+ };
10
+ }
11
+ export function readinessSemanticIssues(readiness) {
12
+ const issues = [];
13
+ const blockers = readiness.blockers;
14
+ const fingerprint = readiness.projection_fingerprint;
15
+ const usable = readiness.usable_for_guidance && readiness.usable_for_validation;
16
+ if (readiness.usable_for_guidance !== readiness.usable_for_validation) {
17
+ issues.push(semanticIssue("readiness.usability_alignment", "/usable_for_validation", "guidance and validation usability must have the same value."));
18
+ }
19
+ if (blockers.length > 0) {
20
+ if (readiness.status !== "unavailable") {
21
+ issues.push(semanticIssue("readiness.blocked_status", "/status", "readiness with blockers must be unavailable.", { blocker_count: blockers.length }));
22
+ }
23
+ if (usable || readiness.usable_for_guidance || readiness.usable_for_validation) {
24
+ issues.push(semanticIssue("readiness.blocked_usability", "/usable_for_guidance", "readiness with blockers must not be usable for guidance or validation.", { blocker_count: blockers.length }));
25
+ }
26
+ }
27
+ else {
28
+ if (readiness.status === "unavailable") {
29
+ issues.push(semanticIssue("readiness.unavailable_without_blocker", "/status", "unavailable readiness must include at least one blocker."));
30
+ }
31
+ if (!usable) {
32
+ issues.push(semanticIssue("readiness.unblocked_usability", "/usable_for_guidance", "readiness without blockers must be usable for guidance and validation."));
33
+ }
34
+ }
35
+ if (!fingerprint.required) {
36
+ if (fingerprint.status !== "not_required" ||
37
+ fingerprint.schema_valid !== null ||
38
+ fingerprint.issues.length > 0) {
39
+ issues.push(semanticIssue("readiness.fingerprint_not_required", "/projection_fingerprint/status", "a non-required projection fingerprint must be not_required with no schema result or issues."));
40
+ }
41
+ }
42
+ if (fingerprint.status === "current") {
43
+ if (fingerprint.schema_valid !== true ||
44
+ fingerprint.source_hash_valid !== true ||
45
+ fingerprint.content_hash_valid !== true ||
46
+ fingerprint.issues.length > 0) {
47
+ issues.push(semanticIssue("readiness.current_fingerprint", "/projection_fingerprint/status", "a current projection fingerprint requires valid schema, source hash, content hash, and no issues."));
48
+ }
49
+ }
50
+ if (fingerprint.required && usable && fingerprint.status !== "current") {
51
+ issues.push(semanticIssue("readiness.usable_fingerprint", "/projection_fingerprint/status", "usable material PCR readiness requires a current projection fingerprint."));
52
+ }
53
+ return issues.sort(compareIssues);
54
+ }
55
+ export function validationReportSemanticIssues(report) {
56
+ const issues = [];
57
+ const summary = countFindings(report.findings);
58
+ const performed = report.check_coverage.checks_performed;
59
+ const skipped = report.check_coverage.checks_skipped;
60
+ const checkedRequirementCount = performed.reduce((total, check) => total + check.requirement_count, 0);
61
+ const skippedRequirementCount = skipped.reduce((total, check) => total + check.requirement_count, 0);
62
+ if (report.finding_count !== report.findings.length) {
63
+ issues.push(semanticIssue("validation.finding_count", "/finding_count", "finding_count must equal findings.length.", { expected: report.findings.length, actual: report.finding_count }));
64
+ }
65
+ for (const severity of ["error", "warning", "info"]) {
66
+ if (report.finding_summary[severity] !== summary[severity]) {
67
+ issues.push(semanticIssue(`validation.finding_summary.${severity}`, `/finding_summary/${severity}`, `${severity} finding summary must equal the findings array count.`, { expected: summary[severity], actual: report.finding_summary[severity] }));
68
+ }
69
+ }
70
+ for (const [index, check] of performed.entries()) {
71
+ if (check.evaluated_requirement_count !== check.requirement_count) {
72
+ issues.push(semanticIssue("validation.performed_check_coverage", `/check_coverage/checks_performed/${index}/evaluated_requirement_count`, "a performed check must evaluate every requirement it declares.", {
73
+ requirement_count: check.requirement_count,
74
+ evaluated_requirement_count: check.evaluated_requirement_count,
75
+ }));
76
+ }
77
+ }
78
+ const coverage = report.check_coverage;
79
+ if (coverage.checked_requirement_count !== checkedRequirementCount) {
80
+ issues.push(semanticIssue("validation.checked_requirement_count", "/check_coverage/checked_requirement_count", "checked_requirement_count must equal the sum of performed requirement counts.", { expected: checkedRequirementCount, actual: coverage.checked_requirement_count }));
81
+ }
82
+ if (coverage.skipped_requirement_count !== skippedRequirementCount) {
83
+ issues.push(semanticIssue("validation.skipped_requirement_count", "/check_coverage/skipped_requirement_count", "skipped_requirement_count must equal the sum of skipped requirement counts.", { expected: skippedRequirementCount, actual: coverage.skipped_requirement_count }));
84
+ }
85
+ const totalRequirementCount = checkedRequirementCount + skippedRequirementCount;
86
+ if (coverage.total_requirement_count !== totalRequirementCount) {
87
+ issues.push(semanticIssue("validation.total_requirement_count", "/check_coverage/total_requirement_count", "total_requirement_count must equal checked plus skipped requirements.", { expected: totalRequirementCount, actual: coverage.total_requirement_count }));
88
+ }
89
+ const expectedCompleteness = performed.length === 0
90
+ ? "none"
91
+ : skipped.length > 0
92
+ ? "partial"
93
+ : "complete";
94
+ if (report.completeness !== expectedCompleteness) {
95
+ issues.push(semanticIssue("validation.completeness", "/completeness", "completeness must reflect performed and skipped checks.", { expected: expectedCompleteness, actual: report.completeness }));
96
+ }
97
+ const expectedStatus = summary.error > 0
98
+ ? "failed"
99
+ : performed.length === 0
100
+ ? "inconclusive"
101
+ : "passed";
102
+ if (report.validation_status !== expectedStatus) {
103
+ issues.push(semanticIssue("validation.status", "/validation_status", "validation_status must reflect error findings and performed coverage.", { expected: expectedStatus, actual: report.validation_status }));
104
+ }
105
+ if (!report.input.accepted && performed.length > 0) {
106
+ issues.push(semanticIssue("validation.rejected_input_coverage", "/check_coverage/checks_performed", "rejected input must not report performed checks."));
107
+ }
108
+ return issues.sort(compareIssues);
109
+ }
110
+ function countFindings(findings) {
111
+ const summary = { error: 0, warning: 0, info: 0 };
112
+ for (const finding of findings) {
113
+ summary[finding.severity] += 1;
114
+ }
115
+ return summary;
116
+ }
117
+ function compareIssues(left, right) {
118
+ return (left.instance_path.localeCompare(right.instance_path) ||
119
+ left.code.localeCompare(right.code) ||
120
+ left.message.localeCompare(right.message));
121
+ }
122
+ //# sourceMappingURL=output-semantics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-semantics.js","sourceRoot":"pcr://source/","sources":["packages/pcr-core/src/output-semantics.ts"],"names":[],"mappings":"AACA,SAAS,aAAa,CAAC,IAAY,EAAE,YAAoB,EAAE,OAAe,EAAE,MAAM,GAA4B,EAAE;IAC9G,OAAO;QACL,IAAI,EAAE,YAAY,IAAI,EAAE;QACxB,aAAa,EAAE,YAAY;QAC3B,WAAW,EAAE,gBAAgB,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;QACxD,OAAO,EAAE,UAAU;QACnB,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAAoB;IAC1D,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;IACpC,MAAM,WAAW,GAAG,SAAS,CAAC,sBAAsB,CAAC;IACrD,MAAM,MAAM,GAAG,SAAS,CAAC,mBAAmB,IAAI,SAAS,CAAC,qBAAqB,CAAC;IAEhF,IAAI,SAAS,CAAC,mBAAmB,KAAK,SAAS,CAAC,qBAAqB,EAAE,CAAC;QACtE,MAAM,CAAC,IAAI,CAAC,aAAa,CACvB,+BAA+B,EAC/B,wBAAwB,EACxB,6DAA6D,CAC9D,CAAC,CAAC;IACL,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,IAAI,SAAS,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;YACvC,MAAM,CAAC,IAAI,CAAC,aAAa,CACvB,0BAA0B,EAC1B,SAAS,EACT,8CAA8C,EAC9C,EAAE,aAAa,EAAE,QAAQ,CAAC,MAAM,EAAE,CACnC,CAAC,CAAC;QACL,CAAC;QACD,IAAI,MAAM,I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,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,aAAa,CACvB,oCAAoC,EACpC,kCAAkC,EAClC,kDAAkD,CACnD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,aAAa,CAAC,QAAsC;IAC3D,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAClD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,aAAa,CAAC,IAAiB,EAAE,KAAkB;IAC1D,OAAO,CACL,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC;QACrD,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;QACnC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAC1C,CAAC;AACJ,CAAC","sourcesContent":["import type { Readiness, ValidationReport, SchemaIssue, ValidationFinding } from \"./types.ts\";\nfunction semanticIssue(code: string, instancePath: string, message: string, params: Record<string, unknown> = {}): SchemaIssue {\n return {\n code: `semantic.${code}`,\n instance_path: instancePath,\n schema_path: `#/x-semantic/${code.replaceAll(\".\", \"/\")}`,\n keyword: \"semantic\",\n message,\n params,\n };\n}\n\nexport function readinessSemanticIssues(readiness: Readiness): SchemaIssue[] {\n const issues: SchemaIssue[] = [];\n const blockers = readiness.blockers;\n const fingerprint = readiness.projection_fingerprint;\n const usable = readiness.usable_for_guidance && readiness.usable_for_validation;\n\n if (readiness.usable_for_guidance !== readiness.usable_for_validation) {\n issues.push(semanticIssue(\n \"readiness.usability_alignment\",\n \"/usable_for_validation\",\n \"guidance and validation usability must have the same value.\",\n ));\n }\n\n if (blockers.length > 0) {\n if (readiness.status !== \"unavailable\") {\n issues.push(semanticIssue(\n \"readiness.blocked_status\",\n \"/status\",\n \"readiness with blockers must be unavailable.\",\n { blocker_count: blockers.length },\n ));\n }\n if (usable || readiness.usable_for_guidance || readiness.usable_for_validation) {\n issues.push(semanticIssue(\n \"readiness.blocked_usability\",\n \"/usable_for_guidance\",\n \"readiness with blockers must not be usable for guidance or validation.\",\n { blocker_count: blockers.length },\n ));\n }\n } else {\n if (readiness.status === \"unavailable\") {\n issues.push(semanticIssue(\n \"readiness.unavailable_without_blocker\",\n \"/status\",\n \"unavailable readiness must include at least one blocker.\",\n ));\n }\n if (!usable) {\n issues.push(semanticIssue(\n \"readiness.unblocked_usability\",\n \"/usable_for_guidance\",\n \"readiness without blockers must be usable for guidance and validation.\",\n ));\n }\n }\n\n if (!fingerprint.required) {\n if (\n fingerprint.status !== \"not_required\" ||\n fingerprint.schema_valid !== null ||\n fingerprint.issues.length > 0\n ) {\n issues.push(semanticIssue(\n \"readiness.fingerprint_not_required\",\n \"/projection_fingerprint/status\",\n \"a non-required projection fingerprint must be not_required with no schema result or issues.\",\n ));\n }\n }\n\n if (fingerprint.status === \"current\") {\n if (\n fingerprint.schema_valid !== true ||\n fingerprint.source_hash_valid !== true ||\n fingerprint.content_hash_valid !== true ||\n fingerprint.issues.length > 0\n ) {\n issues.push(semanticIssue(\n \"readiness.current_fingerprint\",\n \"/projection_fingerprint/status\",\n \"a current projection fingerprint requires valid schema, source hash, content hash, and no issues.\",\n ));\n }\n }\n\n if (fingerprint.required && usable && fingerprint.status !== \"current\") {\n issues.push(semanticIssue(\n \"readiness.usable_fingerprint\",\n \"/projection_fingerprint/status\",\n \"usable material PCR readiness requires a current projection fingerprint.\",\n ));\n }\n\n return issues.sort(compareIssues);\n}\n\nexport function validationReportSemanticIssues(report: ValidationReport): SchemaIssue[] {\n const issues: SchemaIssue[] = [];\n const summary = countFindings(report.findings);\n const performed = report.check_coverage.checks_performed;\n const skipped = report.check_coverage.checks_skipped;\n const checkedRequirementCount = performed.reduce(\n (total, check) => total + check.requirement_count,\n 0,\n );\n const skippedRequirementCount = skipped.reduce(\n (total, check) => total + check.requirement_count,\n 0,\n );\n\n if (report.finding_count !== report.findings.length) {\n issues.push(semanticIssue(\n \"validation.finding_count\",\n \"/finding_count\",\n \"finding_count must equal findings.length.\",\n { expected: report.findings.length, actual: report.finding_count },\n ));\n }\n\n for (const severity of [\"error\", \"warning\", \"info\"] as const) {\n if (report.finding_summary[severity] !== summary[severity]) {\n issues.push(semanticIssue(\n `validation.finding_summary.${severity}`,\n `/finding_summary/${severity}`,\n `${severity} finding summary must equal the findings array count.`,\n { expected: summary[severity], actual: report.finding_summary[severity] },\n ));\n }\n }\n\n for (const [index, check] of performed.entries()) {\n if (check.evaluated_requirement_count !== check.requirement_count) {\n issues.push(semanticIssue(\n \"validation.performed_check_coverage\",\n `/check_coverage/checks_performed/${index}/evaluated_requirement_count`,\n \"a performed check must evaluate every requirement it declares.\",\n {\n requirement_count: check.requirement_count,\n evaluated_requirement_count: check.evaluated_requirement_count,\n },\n ));\n }\n }\n\n const coverage = report.check_coverage;\n if (coverage.checked_requirement_count !== checkedRequirementCount) {\n issues.push(semanticIssue(\n \"validation.checked_requirement_count\",\n \"/check_coverage/checked_requirement_count\",\n \"checked_requirement_count must equal the sum of performed requirement counts.\",\n { expected: checkedRequirementCount, actual: coverage.checked_requirement_count },\n ));\n }\n if (coverage.skipped_requirement_count !== skippedRequirementCount) {\n issues.push(semanticIssue(\n \"validation.skipped_requirement_count\",\n \"/check_coverage/skipped_requirement_count\",\n \"skipped_requirement_count must equal the sum of skipped requirement counts.\",\n { expected: skippedRequirementCount, actual: coverage.skipped_requirement_count },\n ));\n }\n const totalRequirementCount = checkedRequirementCount + skippedRequirementCount;\n if (coverage.total_requirement_count !== totalRequirementCount) {\n issues.push(semanticIssue(\n \"validation.total_requirement_count\",\n \"/check_coverage/total_requirement_count\",\n \"total_requirement_count must equal checked plus skipped requirements.\",\n { expected: totalRequirementCount, actual: coverage.total_requirement_count },\n ));\n }\n\n const expectedCompleteness = performed.length === 0\n ? \"none\"\n : skipped.length > 0\n ? \"partial\"\n : \"complete\";\n if (report.completeness !== expectedCompleteness) {\n issues.push(semanticIssue(\n \"validation.completeness\",\n \"/completeness\",\n \"completeness must reflect performed and skipped checks.\",\n { expected: expectedCompleteness, actual: report.completeness },\n ));\n }\n\n const expectedStatus = summary.error > 0\n ? \"failed\"\n : performed.length === 0\n ? \"inconclusive\"\n : \"passed\";\n if (report.validation_status !== expectedStatus) {\n issues.push(semanticIssue(\n \"validation.status\",\n \"/validation_status\",\n \"validation_status must reflect error findings and performed coverage.\",\n { expected: expectedStatus, actual: report.validation_status },\n ));\n }\n\n if (!report.input.accepted && performed.length > 0) {\n issues.push(semanticIssue(\n \"validation.rejected_input_coverage\",\n \"/check_coverage/checks_performed\",\n \"rejected input must not report performed checks.\",\n ));\n }\n\n return issues.sort(compareIssues);\n}\n\nfunction countFindings(findings: readonly ValidationFinding[]): Record<ValidationFinding[\"severity\"], number> {\n const summary = { error: 0, warning: 0, info: 0 };\n for (const finding of findings) {\n summary[finding.severity] += 1;\n }\n return summary;\n}\n\nfunction compareIssues(left: SchemaIssue, right: SchemaIssue): number {\n return (\n left.instance_path.localeCompare(right.instance_path) ||\n left.code.localeCompare(right.code) ||\n left.message.localeCompare(right.message)\n );\n}\n"]}