cngpac 0.0.1

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 (278) hide show
  1. package/LICENSE +201 -0
  2. package/dist/bin.mjs +24025 -0
  3. package/dist/src/_virtual/_rolldown/runtime.mjs +35 -0
  4. package/dist/src/changelog.d.mts +71 -0
  5. package/dist/src/changelog.mjs +92 -0
  6. package/dist/src/changenote.d.mts +41 -0
  7. package/dist/src/changenote.mjs +184 -0
  8. package/dist/src/cli/commands/change.d.mts +4 -0
  9. package/dist/src/cli/commands/change.mjs +75 -0
  10. package/dist/src/formatter.d.mts +31 -0
  11. package/dist/src/formatter.mjs +50 -0
  12. package/dist/src/git.d.mts +20 -0
  13. package/dist/src/git.mjs +121 -0
  14. package/dist/src/index.d.mts +19 -0
  15. package/dist/src/index.mjs +20 -0
  16. package/dist/src/node_modules/.pnpm/@clack_core@1.2.0/node_modules/@clack/core/dist/index.mjs +530 -0
  17. package/dist/src/node_modules/.pnpm/@clack_prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs +110 -0
  18. package/dist/src/node_modules/.pnpm/@kwsites_file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.mjs +13 -0
  19. package/dist/src/node_modules/.pnpm/@kwsites_file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.mjs +59 -0
  20. package/dist/src/node_modules/.pnpm/@kwsites_promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.mjs +55 -0
  21. package/dist/src/node_modules/.pnpm/@octokit_auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.mjs +32 -0
  22. package/dist/src/node_modules/.pnpm/@octokit_core@7.0.6/node_modules/@octokit/core/dist-src/index.mjs +94 -0
  23. package/dist/src/node_modules/.pnpm/@octokit_core@7.0.6/node_modules/@octokit/core/dist-src/version.mjs +4 -0
  24. package/dist/src/node_modules/.pnpm/@octokit_endpoint@11.0.3/node_modules/@octokit/endpoint/dist-bundle/index.mjs +223 -0
  25. package/dist/src/node_modules/.pnpm/@octokit_graphql@9.0.3/node_modules/@octokit/graphql/dist-bundle/index.mjs +90 -0
  26. package/dist/src/node_modules/.pnpm/@octokit_plugin-paginate-rest@14.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.mjs +86 -0
  27. package/dist/src/node_modules/.pnpm/@octokit_plugin-request-log@6.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-request-log/dist-src/index.mjs +22 -0
  28. package/dist/src/node_modules/.pnpm/@octokit_plugin-request-log@6.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-request-log/dist-src/version.mjs +4 -0
  29. package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.mjs +94 -0
  30. package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.mjs +1295 -0
  31. package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.mjs +17 -0
  32. package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.mjs +4 -0
  33. package/dist/src/node_modules/.pnpm/@octokit_request-error@7.1.0/node_modules/@octokit/request-error/dist-src/index.mjs +30 -0
  34. package/dist/src/node_modules/.pnpm/@octokit_request@10.0.8/node_modules/@octokit/request/dist-bundle/index.mjs +146 -0
  35. package/dist/src/node_modules/.pnpm/@octokit_rest@22.0.1/node_modules/@octokit/rest/dist-src/index.mjs +9 -0
  36. package/dist/src/node_modules/.pnpm/@octokit_rest@22.0.1/node_modules/@octokit/rest/dist-src/version.mjs +4 -0
  37. package/dist/src/node_modules/.pnpm/@simple-git_args-pathspec@1.0.2/node_modules/@simple-git/args-pathspec/dist/index.mjs +14 -0
  38. package/dist/src/node_modules/.pnpm/@simple-git_argv-parser@1.0.3/node_modules/@simple-git/argv-parser/dist/index.mjs +369 -0
  39. package/dist/src/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.mjs +13 -0
  40. package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.mjs +43 -0
  41. package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.mjs +28 -0
  42. package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.mjs +16 -0
  43. package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.mjs +11 -0
  44. package/dist/src/node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.mjs +2135 -0
  45. package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.mjs +200 -0
  46. package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.mjs +206 -0
  47. package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.mjs +15 -0
  48. package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.mjs +212 -0
  49. package/dist/src/node_modules/.pnpm/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.mjs +19 -0
  50. package/dist/src/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.mjs +4 -0
  51. package/dist/src/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.mjs +7 -0
  52. package/dist/src/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.mjs +76 -0
  53. package/dist/src/node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.mjs +115 -0
  54. package/dist/src/node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.mjs +138 -0
  55. package/dist/src/node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.mjs +12 -0
  56. package/dist/src/node_modules/.pnpm/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.mjs +12 -0
  57. package/dist/src/node_modules/.pnpm/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.mjs +165 -0
  58. package/dist/src/node_modules/.pnpm/fault@2.0.1/node_modules/fault/index.mjs +38 -0
  59. package/dist/src/node_modules/.pnpm/format@0.2.2/node_modules/format/format.mjs +87 -0
  60. package/dist/src/node_modules/.pnpm/glob@13.0.6/node_modules/glob/dist/esm/index.min.mjs +3125 -0
  61. package/dist/src/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.mjs +13 -0
  62. package/dist/src/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.mjs +8 -0
  63. package/dist/src/node_modules/.pnpm/json-with-bigint@3.5.8/node_modules/json-with-bigint/json-with-bigint.mjs +137 -0
  64. package/dist/src/node_modules/.pnpm/localstorage-polyfill@1.0.1/node_modules/localstorage-polyfill/localStorage.mjs +39 -0
  65. package/dist/src/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.mjs +29 -0
  66. package/dist/src/node_modules/.pnpm/mdast-util-from-markdown@2.0.3/node_modules/mdast-util-from-markdown/lib/index.mjs +976 -0
  67. package/dist/src/node_modules/.pnpm/mdast-util-frontmatter@2.0.1/node_modules/mdast-util-frontmatter/lib/index.mjs +162 -0
  68. package/dist/src/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.mjs +36 -0
  69. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/configure.mjs +48 -0
  70. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.mjs +27 -0
  71. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.mjs +20 -0
  72. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.mjs +62 -0
  73. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.mjs +61 -0
  74. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.mjs +51 -0
  75. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.mjs +47 -0
  76. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.mjs +20 -0
  77. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.mjs +50 -0
  78. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.mjs +69 -0
  79. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.mjs +47 -0
  80. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.mjs +40 -0
  81. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.mjs +50 -0
  82. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.mjs +93 -0
  83. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.mjs +35 -0
  84. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.mjs +48 -0
  85. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.mjs +22 -0
  86. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.mjs +20 -0
  87. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.mjs +51 -0
  88. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.mjs +17 -0
  89. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.mjs +19 -0
  90. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/index.mjs +161 -0
  91. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/join.mjs +18 -0
  92. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/unsafe.mjs +223 -0
  93. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/association.mjs +31 -0
  94. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.mjs +15 -0
  95. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.mjs +19 -0
  96. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.mjs +15 -0
  97. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.mjs +15 -0
  98. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.mjs +15 -0
  99. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.mjs +15 -0
  100. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.mjs +15 -0
  101. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.mjs +15 -0
  102. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.mjs +15 -0
  103. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.mjs +15 -0
  104. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.mjs +16 -0
  105. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/container-flow.mjs +56 -0
  106. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.mjs +75 -0
  107. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.mjs +14 -0
  108. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.mjs +74 -0
  109. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.mjs +15 -0
  110. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.mjs +24 -0
  111. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.mjs +17 -0
  112. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/indent-lines.mjs +32 -0
  113. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.mjs +27 -0
  114. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/safe.mjs +116 -0
  115. package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/track.mjs +59 -0
  116. package/dist/src/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.mjs +83 -0
  117. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.mjs +224 -0
  118. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.mjs +213 -0
  119. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.mjs +60 -0
  120. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.mjs +130 -0
  121. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.mjs +62 -0
  122. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.mjs +141 -0
  123. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.mjs +418 -0
  124. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.mjs +147 -0
  125. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.mjs +187 -0
  126. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.mjs +137 -0
  127. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.mjs +223 -0
  128. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.mjs +59 -0
  129. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.mjs +189 -0
  130. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.mjs +777 -0
  131. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.mjs +617 -0
  132. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.mjs +479 -0
  133. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.mjs +95 -0
  134. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.mjs +50 -0
  135. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.mjs +32 -0
  136. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.mjs +177 -0
  137. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.mjs +155 -0
  138. package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.mjs +98 -0
  139. package/dist/src/node_modules/.pnpm/micromark-extension-frontmatter@2.0.0/node_modules/micromark-extension-frontmatter/lib/syntax.mjs +352 -0
  140. package/dist/src/node_modules/.pnpm/micromark-extension-frontmatter@2.0.0/node_modules/micromark-extension-frontmatter/lib/to-matters.mjs +109 -0
  141. package/dist/src/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.mjs +186 -0
  142. package/dist/src/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.mjs +134 -0
  143. package/dist/src/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.mjs +61 -0
  144. package/dist/src/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.mjs +148 -0
  145. package/dist/src/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.mjs +43 -0
  146. package/dist/src/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.mjs +229 -0
  147. package/dist/src/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.mjs +71 -0
  148. package/dist/src/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.mjs +25 -0
  149. package/dist/src/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.mjs +73 -0
  150. package/dist/src/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.mjs +22 -0
  151. package/dist/src/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.mjs +40 -0
  152. package/dist/src/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.mjs +100 -0
  153. package/dist/src/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.mjs +25 -0
  154. package/dist/src/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.mjs +31 -0
  155. package/dist/src/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.mjs +158 -0
  156. package/dist/src/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.mjs +231 -0
  157. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.mjs +101 -0
  158. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.mjs +473 -0
  159. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.mjs +70 -0
  160. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.mjs +220 -0
  161. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.mjs +51 -0
  162. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.mjs +178 -0
  163. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.mjs +52 -0
  164. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.mjs +17 -0
  165. package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.mjs +102 -0
  166. package/dist/src/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.mjs +121 -0
  167. package/dist/src/node_modules/.pnpm/remark-frontmatter@5.0.0/node_modules/remark-frontmatter/lib/index.mjs +35 -0
  168. package/dist/src/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.mjs +37 -0
  169. package/dist/src/node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.mjs +36 -0
  170. package/dist/src/node_modules/.pnpm/simple-git@3.35.2/node_modules/simple-git/dist/esm/index.mjs +3563 -0
  171. package/dist/src/node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.mjs +57 -0
  172. package/dist/src/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.mjs +72 -0
  173. package/dist/src/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.mjs +157 -0
  174. package/dist/src/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.mjs +13 -0
  175. package/dist/src/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.mjs +1088 -0
  176. package/dist/src/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.mjs +110 -0
  177. package/dist/src/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.mjs +65 -0
  178. package/dist/src/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.mjs +10 -0
  179. package/dist/src/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.mjs +328 -0
  180. package/dist/src/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.mjs +287 -0
  181. package/dist/src/node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.mjs +8 -0
  182. package/dist/src/node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.mjs +247 -0
  183. package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.mjs +525 -0
  184. package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.mjs +2 -0
  185. package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.mjs +2 -0
  186. package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.mjs +3 -0
  187. package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.mjs +24 -0
  188. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.mjs +62 -0
  189. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.mjs +49 -0
  190. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.mjs +98 -0
  191. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.mjs +66 -0
  192. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.mjs +207 -0
  193. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.mjs +93 -0
  194. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.mjs +179 -0
  195. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.mjs +48 -0
  196. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.mjs +41 -0
  197. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.mjs +166 -0
  198. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.mjs +211 -0
  199. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.mjs +110 -0
  200. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.mjs +32 -0
  201. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.mjs +30 -0
  202. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.mjs +16 -0
  203. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.mjs +16 -0
  204. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.mjs +295 -0
  205. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.mjs +67 -0
  206. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.mjs +43 -0
  207. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.mjs +69 -0
  208. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.mjs +170 -0
  209. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.mjs +56 -0
  210. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.mjs +67 -0
  211. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.mjs +17 -0
  212. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.mjs +101 -0
  213. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.mjs +127 -0
  214. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.mjs +40 -0
  215. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.mjs +40 -0
  216. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.mjs +33 -0
  217. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.mjs +118 -0
  218. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.mjs +115 -0
  219. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.mjs +59 -0
  220. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.mjs +53 -0
  221. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.mjs +41 -0
  222. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.mjs +274 -0
  223. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.mjs +54 -0
  224. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.mjs +94 -0
  225. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.mjs +85 -0
  226. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.mjs +523 -0
  227. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.mjs +50 -0
  228. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.mjs +861 -0
  229. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.mjs +97 -0
  230. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.mjs +36 -0
  231. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.mjs +22 -0
  232. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.mjs +19 -0
  233. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.mjs +22 -0
  234. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.mjs +19 -0
  235. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.mjs +23 -0
  236. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.mjs +46 -0
  237. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.mjs +45 -0
  238. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.mjs +34 -0
  239. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.mjs +68 -0
  240. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.mjs +103 -0
  241. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.mjs +53 -0
  242. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.mjs +31 -0
  243. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.mjs +49 -0
  244. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.mjs +79 -0
  245. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.mjs +45 -0
  246. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.mjs +71 -0
  247. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.mjs +67 -0
  248. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.mjs +56 -0
  249. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.mjs +74 -0
  250. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.mjs +87 -0
  251. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.mjs +119 -0
  252. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.mjs +115 -0
  253. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.mjs +124 -0
  254. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.mjs +23 -0
  255. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.mjs +67 -0
  256. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.mjs +24 -0
  257. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.mjs +104 -0
  258. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.mjs +229 -0
  259. package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.mjs +194 -0
  260. package/dist/src/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.mjs +106 -0
  261. package/dist/src/pkg.d.mts +24 -0
  262. package/dist/src/pkg.mjs +39 -0
  263. package/dist/src/prepare.d.mts +14 -0
  264. package/dist/src/prepare.mjs +41 -0
  265. package/dist/src/publishers/npm.d.mts +21 -0
  266. package/dist/src/publishers/npm.mjs +42 -0
  267. package/dist/src/releasers/github.d.mts +10 -0
  268. package/dist/src/releasers/github.mjs +20 -0
  269. package/dist/src/saver.d.mts +42 -0
  270. package/dist/src/saver.mjs +39 -0
  271. package/dist/src/types.d.mts +150 -0
  272. package/dist/src/utils.d.mts +7 -0
  273. package/dist/src/utils.mjs +47 -0
  274. package/dist/src/version.d.mts +9 -0
  275. package/dist/src/version.mjs +18 -0
  276. package/package.json +156 -0
  277. package/templates/cngpac.config.ts +33 -0
  278. package/templates/version.yml +30 -0
@@ -0,0 +1,101 @@
1
+ import { __exportAll } from "../../../../../../_virtual/_rolldown/runtime.mjs";
2
+ import { attention } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.mjs";
3
+ import { autolink } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.mjs";
4
+ import { blockQuote } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.mjs";
5
+ import { characterEscape } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.mjs";
6
+ import { characterReference } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.mjs";
7
+ import { codeFenced } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.mjs";
8
+ import { codeIndented } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.mjs";
9
+ import { codeText } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.mjs";
10
+ import { definition } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.mjs";
11
+ import { hardBreakEscape } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.mjs";
12
+ import { headingAtx } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.mjs";
13
+ import { htmlFlow } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.mjs";
14
+ import { htmlText } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.mjs";
15
+ import { labelEnd } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.mjs";
16
+ import { labelStartImage } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.mjs";
17
+ import { labelStartLink } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.mjs";
18
+ import { lineEnding } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.mjs";
19
+ import { thematicBreak } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.mjs";
20
+ import { list } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.mjs";
21
+ import { setextUnderline } from "../../../../micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.mjs";
22
+ import { resolver } from "./initialize/text.mjs";
23
+ //#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.js
24
+ /**
25
+ * @import {Extension} from 'micromark-util-types'
26
+ */
27
+ var constructs_exports = /* @__PURE__ */ __exportAll({
28
+ attentionMarkers: () => attentionMarkers,
29
+ contentInitial: () => contentInitial,
30
+ disable: () => disable,
31
+ document: () => document,
32
+ flow: () => flow,
33
+ flowInitial: () => flowInitial,
34
+ insideSpan: () => insideSpan,
35
+ string: () => string,
36
+ text: () => text
37
+ });
38
+ /** @satisfies {Extension['document']} */
39
+ const document = {
40
+ [42]: list,
41
+ [43]: list,
42
+ [45]: list,
43
+ [48]: list,
44
+ [49]: list,
45
+ [50]: list,
46
+ [51]: list,
47
+ [52]: list,
48
+ [53]: list,
49
+ [54]: list,
50
+ [55]: list,
51
+ [56]: list,
52
+ [57]: list,
53
+ [62]: blockQuote
54
+ };
55
+ /** @satisfies {Extension['contentInitial']} */
56
+ const contentInitial = { [91]: definition };
57
+ /** @satisfies {Extension['flowInitial']} */
58
+ const flowInitial = {
59
+ [-2]: codeIndented,
60
+ [-1]: codeIndented,
61
+ [32]: codeIndented
62
+ };
63
+ /** @satisfies {Extension['flow']} */
64
+ const flow = {
65
+ [35]: headingAtx,
66
+ [42]: thematicBreak,
67
+ [45]: [setextUnderline, thematicBreak],
68
+ [60]: htmlFlow,
69
+ [61]: setextUnderline,
70
+ [95]: thematicBreak,
71
+ [96]: codeFenced,
72
+ [126]: codeFenced
73
+ };
74
+ /** @satisfies {Extension['string']} */
75
+ const string = {
76
+ [38]: characterReference,
77
+ [92]: characterEscape
78
+ };
79
+ /** @satisfies {Extension['text']} */
80
+ const text = {
81
+ [-5]: lineEnding,
82
+ [-4]: lineEnding,
83
+ [-3]: lineEnding,
84
+ [33]: labelStartImage,
85
+ [38]: characterReference,
86
+ [42]: attention,
87
+ [60]: [autolink, htmlText],
88
+ [91]: labelStartLink,
89
+ [92]: [hardBreakEscape, characterEscape],
90
+ [93]: labelEnd,
91
+ [95]: attention,
92
+ [96]: codeText
93
+ };
94
+ /** @satisfies {Extension['insideSpan']} */
95
+ const insideSpan = { null: [attention, resolver] };
96
+ /** @satisfies {Extension['attentionMarkers']} */
97
+ const attentionMarkers = { null: [42, 95] };
98
+ /** @satisfies {Extension['disable']} */
99
+ const disable = { null: [] };
100
+ //#endregion
101
+ export { constructs_exports };
@@ -0,0 +1,473 @@
1
+ import { markdownLineEnding } from "../../../../micromark-util-character@2.1.1/node_modules/micromark-util-character/index.mjs";
2
+ import { push, splice } from "../../../../micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.mjs";
3
+ import { resolveAll } from "../../../../micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.mjs";
4
+ //#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.js
5
+ /**
6
+ * @import {
7
+ * Chunk,
8
+ * Code,
9
+ * ConstructRecord,
10
+ * Construct,
11
+ * Effects,
12
+ * InitialConstruct,
13
+ * ParseContext,
14
+ * Point,
15
+ * State,
16
+ * TokenizeContext,
17
+ * Token
18
+ * } from 'micromark-util-types'
19
+ */
20
+ /**
21
+ * @callback Restore
22
+ * Restore the state.
23
+ * @returns {undefined}
24
+ * Nothing.
25
+ *
26
+ * @typedef Info
27
+ * Info.
28
+ * @property {Restore} restore
29
+ * Restore.
30
+ * @property {number} from
31
+ * From.
32
+ *
33
+ * @callback ReturnHandle
34
+ * Handle a successful run.
35
+ * @param {Construct} construct
36
+ * Construct.
37
+ * @param {Info} info
38
+ * Info.
39
+ * @returns {undefined}
40
+ * Nothing.
41
+ */
42
+ /**
43
+ * Create a tokenizer.
44
+ * Tokenizers deal with one type of data (e.g., containers, flow, text).
45
+ * The parser is the object dealing with it all.
46
+ * `initialize` works like other constructs, except that only its `tokenize`
47
+ * function is used, in which case it doesn’t receive an `ok` or `nok`.
48
+ * `from` can be given to set the point before the first character, although
49
+ * when further lines are indented, they must be set with `defineSkip`.
50
+ *
51
+ * @param {ParseContext} parser
52
+ * Parser.
53
+ * @param {InitialConstruct} initialize
54
+ * Construct.
55
+ * @param {Omit<Point, '_bufferIndex' | '_index'> | undefined} [from]
56
+ * Point (optional).
57
+ * @returns {TokenizeContext}
58
+ * Context.
59
+ */
60
+ function createTokenizer(parser, initialize, from) {
61
+ /** @type {Point} */
62
+ let point = {
63
+ _bufferIndex: -1,
64
+ _index: 0,
65
+ line: from && from.line || 1,
66
+ column: from && from.column || 1,
67
+ offset: from && from.offset || 0
68
+ };
69
+ /** @type {Record<string, number>} */
70
+ const columnStart = {};
71
+ /** @type {Array<Construct>} */
72
+ const resolveAllConstructs = [];
73
+ /** @type {Array<Chunk>} */
74
+ let chunks = [];
75
+ /** @type {Array<Token>} */
76
+ let stack = [];
77
+ /**
78
+ * Tools used for tokenizing.
79
+ *
80
+ * @type {Effects}
81
+ */
82
+ const effects = {
83
+ attempt: constructFactory(onsuccessfulconstruct),
84
+ check: constructFactory(onsuccessfulcheck),
85
+ consume,
86
+ enter,
87
+ exit,
88
+ interrupt: constructFactory(onsuccessfulcheck, { interrupt: true })
89
+ };
90
+ /**
91
+ * State and tools for resolving and serializing.
92
+ *
93
+ * @type {TokenizeContext}
94
+ */
95
+ const context = {
96
+ code: null,
97
+ containerState: {},
98
+ defineSkip,
99
+ events: [],
100
+ now,
101
+ parser,
102
+ previous: null,
103
+ sliceSerialize,
104
+ sliceStream,
105
+ write
106
+ };
107
+ /**
108
+ * The state function.
109
+ *
110
+ * @type {State | undefined}
111
+ */
112
+ let state = initialize.tokenize.call(context, effects);
113
+ if (initialize.resolveAll) resolveAllConstructs.push(initialize);
114
+ return context;
115
+ /** @type {TokenizeContext['write']} */
116
+ function write(slice) {
117
+ chunks = push(chunks, slice);
118
+ main();
119
+ if (chunks[chunks.length - 1] !== null) return [];
120
+ addResult(initialize, 0);
121
+ context.events = resolveAll(resolveAllConstructs, context.events, context);
122
+ return context.events;
123
+ }
124
+ /** @type {TokenizeContext['sliceSerialize']} */
125
+ function sliceSerialize(token, expandTabs) {
126
+ return serializeChunks(sliceStream(token), expandTabs);
127
+ }
128
+ /** @type {TokenizeContext['sliceStream']} */
129
+ function sliceStream(token) {
130
+ return sliceChunks(chunks, token);
131
+ }
132
+ /** @type {TokenizeContext['now']} */
133
+ function now() {
134
+ const { _bufferIndex, _index, line, column, offset } = point;
135
+ return {
136
+ _bufferIndex,
137
+ _index,
138
+ line,
139
+ column,
140
+ offset
141
+ };
142
+ }
143
+ /** @type {TokenizeContext['defineSkip']} */
144
+ function defineSkip(value) {
145
+ columnStart[value.line] = value.column;
146
+ accountForPotentialSkip();
147
+ }
148
+ /**
149
+ * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by
150
+ * `consume`).
151
+ * Here is where we walk through the chunks, which either include strings of
152
+ * several characters, or numerical character codes.
153
+ * The reason to do this in a loop instead of a call is so the stack can
154
+ * drain.
155
+ *
156
+ * @returns {undefined}
157
+ * Nothing.
158
+ */
159
+ function main() {
160
+ /** @type {number} */
161
+ let chunkIndex;
162
+ while (point._index < chunks.length) {
163
+ const chunk = chunks[point._index];
164
+ if (typeof chunk === "string") {
165
+ chunkIndex = point._index;
166
+ if (point._bufferIndex < 0) point._bufferIndex = 0;
167
+ while (point._index === chunkIndex && point._bufferIndex < chunk.length) go(chunk.charCodeAt(point._bufferIndex));
168
+ } else go(chunk);
169
+ }
170
+ }
171
+ /**
172
+ * Deal with one code.
173
+ *
174
+ * @param {Code} code
175
+ * Code.
176
+ * @returns {undefined}
177
+ * Nothing.
178
+ */
179
+ function go(code) {
180
+ state = state(code);
181
+ }
182
+ /** @type {Effects['consume']} */
183
+ function consume(code) {
184
+ if (markdownLineEnding(code)) {
185
+ point.line++;
186
+ point.column = 1;
187
+ point.offset += code === -3 ? 2 : 1;
188
+ accountForPotentialSkip();
189
+ } else if (code !== -1) {
190
+ point.column++;
191
+ point.offset++;
192
+ }
193
+ if (point._bufferIndex < 0) point._index++;
194
+ else {
195
+ point._bufferIndex++;
196
+ if (point._bufferIndex === chunks[point._index].length) {
197
+ point._bufferIndex = -1;
198
+ point._index++;
199
+ }
200
+ }
201
+ context.previous = code;
202
+ }
203
+ /** @type {Effects['enter']} */
204
+ function enter(type, fields) {
205
+ /** @type {Token} */
206
+ const token = fields || {};
207
+ token.type = type;
208
+ token.start = now();
209
+ context.events.push([
210
+ "enter",
211
+ token,
212
+ context
213
+ ]);
214
+ stack.push(token);
215
+ return token;
216
+ }
217
+ /** @type {Effects['exit']} */
218
+ function exit(type) {
219
+ const token = stack.pop();
220
+ token.end = now();
221
+ context.events.push([
222
+ "exit",
223
+ token,
224
+ context
225
+ ]);
226
+ return token;
227
+ }
228
+ /**
229
+ * Use results.
230
+ *
231
+ * @type {ReturnHandle}
232
+ */
233
+ function onsuccessfulconstruct(construct, info) {
234
+ addResult(construct, info.from);
235
+ }
236
+ /**
237
+ * Discard results.
238
+ *
239
+ * @type {ReturnHandle}
240
+ */
241
+ function onsuccessfulcheck(_, info) {
242
+ info.restore();
243
+ }
244
+ /**
245
+ * Factory to attempt/check/interrupt.
246
+ *
247
+ * @param {ReturnHandle} onreturn
248
+ * Callback.
249
+ * @param {{interrupt?: boolean | undefined} | undefined} [fields]
250
+ * Fields.
251
+ */
252
+ function constructFactory(onreturn, fields) {
253
+ return hook;
254
+ /**
255
+ * Handle either an object mapping codes to constructs, a list of
256
+ * constructs, or a single construct.
257
+ *
258
+ * @param {Array<Construct> | ConstructRecord | Construct} constructs
259
+ * Constructs.
260
+ * @param {State} returnState
261
+ * State.
262
+ * @param {State | undefined} [bogusState]
263
+ * State.
264
+ * @returns {State}
265
+ * State.
266
+ */
267
+ function hook(constructs, returnState, bogusState) {
268
+ /** @type {ReadonlyArray<Construct>} */
269
+ let listOfConstructs;
270
+ /** @type {number} */
271
+ let constructIndex;
272
+ /** @type {Construct} */
273
+ let currentConstruct;
274
+ /** @type {Info} */
275
+ let info;
276
+ return Array.isArray(constructs) ? handleListOfConstructs(constructs) : "tokenize" in constructs ? handleListOfConstructs([constructs]) : handleMapOfConstructs(constructs);
277
+ /**
278
+ * Handle a list of construct.
279
+ *
280
+ * @param {ConstructRecord} map
281
+ * Constructs.
282
+ * @returns {State}
283
+ * State.
284
+ */
285
+ function handleMapOfConstructs(map) {
286
+ return start;
287
+ /** @type {State} */
288
+ function start(code) {
289
+ const left = code !== null && map[code];
290
+ const all = code !== null && map.null;
291
+ return handleListOfConstructs([...Array.isArray(left) ? left : left ? [left] : [], ...Array.isArray(all) ? all : all ? [all] : []])(code);
292
+ }
293
+ }
294
+ /**
295
+ * Handle a list of construct.
296
+ *
297
+ * @param {ReadonlyArray<Construct>} list
298
+ * Constructs.
299
+ * @returns {State}
300
+ * State.
301
+ */
302
+ function handleListOfConstructs(list) {
303
+ listOfConstructs = list;
304
+ constructIndex = 0;
305
+ if (list.length === 0) return bogusState;
306
+ return handleConstruct(list[constructIndex]);
307
+ }
308
+ /**
309
+ * Handle a single construct.
310
+ *
311
+ * @param {Construct} construct
312
+ * Construct.
313
+ * @returns {State}
314
+ * State.
315
+ */
316
+ function handleConstruct(construct) {
317
+ return start;
318
+ /** @type {State} */
319
+ function start(code) {
320
+ info = store();
321
+ currentConstruct = construct;
322
+ if (!construct.partial) context.currentConstruct = construct;
323
+ if (construct.name && context.parser.constructs.disable.null.includes(construct.name)) return nok(code);
324
+ return construct.tokenize.call(fields ? Object.assign(Object.create(context), fields) : context, effects, ok, nok)(code);
325
+ }
326
+ }
327
+ /** @type {State} */
328
+ function ok(code) {
329
+ onreturn(currentConstruct, info);
330
+ return returnState;
331
+ }
332
+ /** @type {State} */
333
+ function nok(code) {
334
+ info.restore();
335
+ if (++constructIndex < listOfConstructs.length) return handleConstruct(listOfConstructs[constructIndex]);
336
+ return bogusState;
337
+ }
338
+ }
339
+ }
340
+ /**
341
+ * @param {Construct} construct
342
+ * Construct.
343
+ * @param {number} from
344
+ * From.
345
+ * @returns {undefined}
346
+ * Nothing.
347
+ */
348
+ function addResult(construct, from) {
349
+ if (construct.resolveAll && !resolveAllConstructs.includes(construct)) resolveAllConstructs.push(construct);
350
+ if (construct.resolve) splice(context.events, from, context.events.length - from, construct.resolve(context.events.slice(from), context));
351
+ if (construct.resolveTo) context.events = construct.resolveTo(context.events, context);
352
+ }
353
+ /**
354
+ * Store state.
355
+ *
356
+ * @returns {Info}
357
+ * Info.
358
+ */
359
+ function store() {
360
+ const startPoint = now();
361
+ const startPrevious = context.previous;
362
+ const startCurrentConstruct = context.currentConstruct;
363
+ const startEventsIndex = context.events.length;
364
+ const startStack = Array.from(stack);
365
+ return {
366
+ from: startEventsIndex,
367
+ restore
368
+ };
369
+ /**
370
+ * Restore state.
371
+ *
372
+ * @returns {undefined}
373
+ * Nothing.
374
+ */
375
+ function restore() {
376
+ point = startPoint;
377
+ context.previous = startPrevious;
378
+ context.currentConstruct = startCurrentConstruct;
379
+ context.events.length = startEventsIndex;
380
+ stack = startStack;
381
+ accountForPotentialSkip();
382
+ }
383
+ }
384
+ /**
385
+ * Move the current point a bit forward in the line when it’s on a column
386
+ * skip.
387
+ *
388
+ * @returns {undefined}
389
+ * Nothing.
390
+ */
391
+ function accountForPotentialSkip() {
392
+ if (point.line in columnStart && point.column < 2) {
393
+ point.column = columnStart[point.line];
394
+ point.offset += columnStart[point.line] - 1;
395
+ }
396
+ }
397
+ }
398
+ /**
399
+ * Get the chunks from a slice of chunks in the range of a token.
400
+ *
401
+ * @param {ReadonlyArray<Chunk>} chunks
402
+ * Chunks.
403
+ * @param {Pick<Token, 'end' | 'start'>} token
404
+ * Token.
405
+ * @returns {Array<Chunk>}
406
+ * Chunks.
407
+ */
408
+ function sliceChunks(chunks, token) {
409
+ const startIndex = token.start._index;
410
+ const startBufferIndex = token.start._bufferIndex;
411
+ const endIndex = token.end._index;
412
+ const endBufferIndex = token.end._bufferIndex;
413
+ /** @type {Array<Chunk>} */
414
+ let view;
415
+ if (startIndex === endIndex) view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)];
416
+ else {
417
+ view = chunks.slice(startIndex, endIndex);
418
+ if (startBufferIndex > -1) {
419
+ const head = view[0];
420
+ if (typeof head === "string") view[0] = head.slice(startBufferIndex);
421
+ else view.shift();
422
+ }
423
+ if (endBufferIndex > 0) view.push(chunks[endIndex].slice(0, endBufferIndex));
424
+ }
425
+ return view;
426
+ }
427
+ /**
428
+ * Get the string value of a slice of chunks.
429
+ *
430
+ * @param {ReadonlyArray<Chunk>} chunks
431
+ * Chunks.
432
+ * @param {boolean | undefined} [expandTabs=false]
433
+ * Whether to expand tabs (default: `false`).
434
+ * @returns {string}
435
+ * Result.
436
+ */
437
+ function serializeChunks(chunks, expandTabs) {
438
+ let index = -1;
439
+ /** @type {Array<string>} */
440
+ const result = [];
441
+ /** @type {boolean | undefined} */
442
+ let atTab;
443
+ while (++index < chunks.length) {
444
+ const chunk = chunks[index];
445
+ /** @type {string} */
446
+ let value;
447
+ if (typeof chunk === "string") value = chunk;
448
+ else switch (chunk) {
449
+ case -5:
450
+ value = "\r";
451
+ break;
452
+ case -4:
453
+ value = "\n";
454
+ break;
455
+ case -3:
456
+ value = "\r\n";
457
+ break;
458
+ case -2:
459
+ value = expandTabs ? " " : " ";
460
+ break;
461
+ case -1:
462
+ if (!expandTabs && atTab) continue;
463
+ value = " ";
464
+ break;
465
+ default: value = String.fromCharCode(chunk);
466
+ }
467
+ atTab = chunk === -2;
468
+ result.push(value);
469
+ }
470
+ return result.join("");
471
+ }
472
+ //#endregion
473
+ export { createTokenizer };
@@ -0,0 +1,70 @@
1
+ import { markdownLineEnding } from "../../../../../micromark-util-character@2.1.1/node_modules/micromark-util-character/index.mjs";
2
+ import { factorySpace } from "../../../../../micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.mjs";
3
+ //#region node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.js
4
+ /**
5
+ * @import {
6
+ * InitialConstruct,
7
+ * Initializer,
8
+ * State,
9
+ * TokenizeContext,
10
+ * Token
11
+ * } from 'micromark-util-types'
12
+ */
13
+ /** @type {InitialConstruct} */
14
+ const content = { tokenize: initializeContent };
15
+ /**
16
+ * @this {TokenizeContext}
17
+ * Context.
18
+ * @type {Initializer}
19
+ * Content.
20
+ */
21
+ function initializeContent(effects) {
22
+ const contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial);
23
+ /** @type {Token} */
24
+ let previous;
25
+ return contentStart;
26
+ /** @type {State} */
27
+ function afterContentStartConstruct(code) {
28
+ if (code === null) {
29
+ effects.consume(code);
30
+ return;
31
+ }
32
+ effects.enter("lineEnding");
33
+ effects.consume(code);
34
+ effects.exit("lineEnding");
35
+ return factorySpace(effects, contentStart, "linePrefix");
36
+ }
37
+ /** @type {State} */
38
+ function paragraphInitial(code) {
39
+ effects.enter("paragraph");
40
+ return lineStart(code);
41
+ }
42
+ /** @type {State} */
43
+ function lineStart(code) {
44
+ const token = effects.enter("chunkText", {
45
+ contentType: "text",
46
+ previous
47
+ });
48
+ if (previous) previous.next = token;
49
+ previous = token;
50
+ return data(code);
51
+ }
52
+ /** @type {State} */
53
+ function data(code) {
54
+ if (code === null) {
55
+ effects.exit("chunkText");
56
+ effects.exit("paragraph");
57
+ effects.consume(code);
58
+ return;
59
+ }
60
+ if (markdownLineEnding(code)) {
61
+ effects.consume(code);
62
+ effects.exit("chunkText");
63
+ return lineStart;
64
+ }
65
+ effects.consume(code);
66
+ return data;
67
+ }
68
+ }
69
+ //#endregion
70
+ export { content };