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,35 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
+ var __exportAll = (all, no_symbols) => {
11
+ let target = {};
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
+ return target;
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
21
+ key = keys[i];
22
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
23
+ get: ((k) => from[k]).bind(null, key),
24
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
25
+ });
26
+ }
27
+ return to;
28
+ };
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
34
+ //#endregion
35
+ export { __commonJSMin, __exportAll, __require, __toESM };
@@ -0,0 +1,71 @@
1
+ import { BumpType, ChangelogGenerator } from "./types.mjs";
2
+
3
+ //#region src/changelog.d.ts
4
+ interface ChangelogGeneratorOptions {
5
+ /** GitHub token for using the GitHub API */
6
+ githubToken: string;
7
+ /**
8
+ * Custom markdown header format.
9
+ * Supports template variables:
10
+ * - {packageName}: The package name
11
+ * - {version}: The new version
12
+ *
13
+ * @default "# {packageName}@{version}"
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * headerFormat: "## Release {packageName} v{version}"
18
+ * ```
19
+ */
20
+ headerFormat?: string;
21
+ /**
22
+ * Custom labels for bump types.
23
+ * Replaces default labels like "Major Changes", "Minor Changes", etc.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * bumpLabels: {
28
+ * major: "Breaking Changes",
29
+ * minor: "Features",
30
+ * patch: "Bugfixes"
31
+ * }
32
+ * ```
33
+ */
34
+ bumpLabels?: Partial<Record<BumpType, string>>;
35
+ /**
36
+ * Custom repository URL format.
37
+ * Supports template variables:
38
+ * - {owner}: Repository owner
39
+ * - {name}: Repository name
40
+ * - {repoUrl}: Full repository URL
41
+ *
42
+ * @default "https://github.com/{owner}/{name}"
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * repositoryUrl: "https://gitlab.com/{owner}/{name}"
47
+ * ```
48
+ */
49
+ repositoryUrl?: string;
50
+ }
51
+ /**
52
+ * Creates a customizable changelog generator with configurable formatting options.
53
+ *
54
+ * @param options Configuration for the changelog generator
55
+ * @returns A ChangelogGenerator plugin function
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const generator = createChangelogGenerator({
60
+ * headerFormat: "# Release {packageName} v{version}",
61
+ * bumpLabels: {
62
+ * major: "Breaking Changes",
63
+ * minor: "Features",
64
+ * patch: "Bugfixes"
65
+ * }
66
+ * });
67
+ * ```
68
+ */
69
+ declare function createChangelogGenerator(options: ChangelogGeneratorOptions): ChangelogGenerator;
70
+ //#endregion
71
+ export { createChangelogGenerator };
@@ -0,0 +1,92 @@
1
+ import { Octokit } from "./node_modules/.pnpm/@octokit_rest@22.0.1/node_modules/@octokit/rest/dist-src/index.mjs";
2
+ //#region src/changelog.ts
3
+ /**
4
+ * Creates a customizable changelog generator with configurable formatting options.
5
+ *
6
+ * @param options Configuration for the changelog generator
7
+ * @returns A ChangelogGenerator plugin function
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const generator = createChangelogGenerator({
12
+ * headerFormat: "# Release {packageName} v{version}",
13
+ * bumpLabels: {
14
+ * major: "Breaking Changes",
15
+ * minor: "Features",
16
+ * patch: "Bugfixes"
17
+ * }
18
+ * });
19
+ * ```
20
+ */
21
+ function createChangelogGenerator(options) {
22
+ const { headerFormat = "# {packageName}@{version}", bumpLabels = {}, repositoryUrl = "https://github.com/{owner}/{name}" } = options;
23
+ return async (versionBump, changenotes, config) => {
24
+ const { repository } = config;
25
+ const octokit = new Octokit({ auth: options.githubToken });
26
+ const lines = [];
27
+ const header = headerFormat.replace("{packageName}", versionBump.packageName).replace("{version}", versionBump.newVersion);
28
+ lines.push(header);
29
+ lines.push("");
30
+ const groups = /* @__PURE__ */ new Map();
31
+ for (const cn of changenotes) {
32
+ const cnType = cn.meta.bump;
33
+ if (!cnType) continue;
34
+ if (!groups.has(cnType)) groups.set(cnType, []);
35
+ groups.get(cnType)?.push(cn);
36
+ }
37
+ const repoUrl = repositoryUrl.replace("{owner}", repository.owner).replace("{name}", repository.name);
38
+ for (const bump of [
39
+ "major",
40
+ "minor",
41
+ "patch"
42
+ ]) {
43
+ const changenotes = groups.get(bump);
44
+ if (!changenotes) continue;
45
+ const label = getBumpLabel(bump, bumpLabels);
46
+ lines.push(`## ${label}`);
47
+ for (const cn of changenotes) {
48
+ lines.push("");
49
+ const commit = cn.commit?.hash ? `[${cn.commit.hash.slice(0, 7)}](${repoUrl}/commit/${cn.commit.hash})` : "";
50
+ let pull = "";
51
+ if (cn.commit) {
52
+ const numberMatches = cn.commit.subject.match(/\(#(\d+)\)/);
53
+ if (numberMatches) {
54
+ const prNumber = numberMatches.at(-1);
55
+ pull = ` - [PR#${prNumber}](${repoUrl}/pull/${prNumber})`;
56
+ }
57
+ }
58
+ let thanks = "";
59
+ if (cn.commit.hash) {
60
+ const username = (await octokit.rest.repos.getCommit({
61
+ owner: repository.owner,
62
+ repo: repository.name,
63
+ ref: cn.commit.hash
64
+ })).data.author?.login;
65
+ if (username) thanks = ` - Thanks to [@${username}](https://github.com/${username}) !`;
66
+ }
67
+ if (thanks === "" && cn.authors.length > 0) thanks = ` - Thanks to ${cn.authors.map((ca) => `[${ca.name}](mailto:${ca.email})`).join(", ")} !`;
68
+ lines.push(`- ${commit}${pull}${thanks}`);
69
+ lines.push("");
70
+ lines.push(` > ${cn.title}`);
71
+ const trimmedBody = cn.body.trim();
72
+ if (trimmedBody) {
73
+ lines.push("");
74
+ lines.push(` ${trimmedBody.split("\n").join("\n ")}`);
75
+ }
76
+ }
77
+ lines.push("");
78
+ }
79
+ return lines.join("\n").trimEnd();
80
+ };
81
+ }
82
+ function getBumpLabel(bump, customLabels = {}) {
83
+ if (customLabels[bump]) return customLabels[bump];
84
+ switch (bump) {
85
+ case "major": return "Major Changes";
86
+ case "minor": return "Minor Changes";
87
+ case "patch": return "Patch Changes";
88
+ default: return "Changes";
89
+ }
90
+ }
91
+ //#endregion
92
+ export { createChangelogGenerator };
@@ -0,0 +1,41 @@
1
+ import { Changenote, ChangenoteMetadata, PrepareConfig } from "./types.mjs";
2
+
3
+ //#region src/changenote.d.ts
4
+ /**
5
+ * Extract only the YAML frontmatter from a changenote markdown string.
6
+ *
7
+ * Unlike {@link parse}, this does not require a `# Heading` title — useful
8
+ * when you only need to inspect or update frontmatter fields.
9
+ *
10
+ * @throws if frontmatter is missing
11
+ */
12
+ declare function parseFrontmatter(content: string): Record<string, unknown>;
13
+ /**
14
+ * Update frontmatter fields in an existing changenote markdown string.
15
+ *
16
+ * Uses the remark AST to locate and modify the YAML node, then
17
+ * serializes the full document back to markdown — preserving
18
+ * body content faithfully.
19
+ *
20
+ * @param content Original markdown string
21
+ * @param updates Key-value pairs to merge into frontmatter
22
+ * @returns Updated markdown string
23
+ * @throws If no frontmatter is found
24
+ */
25
+ declare function updateFrontmatter(content: string, updates: Record<string, unknown>): string;
26
+ /** Parse a single changenote markdown file */
27
+ declare function parseChangenotefile(filePath: string): Promise<Changenote>;
28
+ /** Parse changenote content from a string */
29
+ declare function parseChangenoteContent(content: string, filePath: string): Changenote;
30
+ /** Read all changenotes from the changenotes directory */
31
+ declare function readChangenotes(changenotesDir: string): Promise<Changenote[]>;
32
+ /** Write a new changenote file */
33
+ declare function writeChangenote(changenotesDir: string, id: string, frontmatter: ChangenoteMetadata, title: string, body: string): Promise<string>;
34
+ /** Write a prepare config to the .changenotes directory */
35
+ declare function writePrepareConfig(changenotesDir: string, config: PrepareConfig): Promise<string>;
36
+ /** Read the prepare config from the .changenotes directory, or null if not present */
37
+ declare function readPrepareConfig(changenotesDir: string): Promise<PrepareConfig | null>;
38
+ /** Remove the prepare config file after it has been consumed */
39
+ declare function consumePrepareConfig(changenotesDir: string): Promise<void>;
40
+ //#endregion
41
+ export { consumePrepareConfig, parseChangenoteContent, parseChangenotefile, parseFrontmatter, readChangenotes, readPrepareConfig, updateFrontmatter, writeChangenote, writePrepareConfig };
@@ -0,0 +1,184 @@
1
+ import { Ze } from "./node_modules/.pnpm/glob@13.0.6/node_modules/glob/dist/esm/index.min.mjs";
2
+ import remarkFrontmatter from "./node_modules/.pnpm/remark-frontmatter@5.0.0/node_modules/remark-frontmatter/lib/index.mjs";
3
+ import remarkParse from "./node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.mjs";
4
+ import remarkStringify from "./node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.mjs";
5
+ import { unified } from "./node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.mjs";
6
+ import { require_dist } from "./node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.mjs";
7
+ import fs from "node:fs/promises";
8
+ import { basename, join } from "node:path";
9
+ //#region src/changenote.ts
10
+ var import_dist = require_dist();
11
+ const VALID_BUMPS = new Set([
12
+ "major",
13
+ "minor",
14
+ "patch"
15
+ ]);
16
+ function isValidBump(value) {
17
+ return VALID_BUMPS.has(value);
18
+ }
19
+ /**
20
+ * Extract only the YAML frontmatter from a changenote markdown string.
21
+ *
22
+ * Unlike {@link parse}, this does not require a `# Heading` title — useful
23
+ * when you only need to inspect or update frontmatter fields.
24
+ *
25
+ * @throws if frontmatter is missing
26
+ */
27
+ function parseFrontmatter(content) {
28
+ const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
29
+ if (!frontmatterMatch) throw new Error("Changenote is missing frontmatter");
30
+ return (0, import_dist.parse)(frontmatterMatch[1]) ?? {};
31
+ }
32
+ /**
33
+ * Parse changenote markdown content into structured data.
34
+ *
35
+ * Expects a markdown string with YAML frontmatter delimited by `---` and
36
+ * a first-level heading (`# Title`).
37
+ *
38
+ * @throws if frontmatter is missing or there is no `# Heading`
39
+ */
40
+ function parse(content) {
41
+ const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
42
+ if (!frontmatterMatch) throw new Error("Changenote is missing frontmatter");
43
+ const frontmatter = (0, import_dist.parse)(frontmatterMatch[1]) ?? {};
44
+ const markdownContent = content.slice(frontmatterMatch[0].length).trim();
45
+ const tree = unified().use(remarkParse).use(remarkFrontmatter).parse(markdownContent);
46
+ let title;
47
+ let titleNodeIdx = -1;
48
+ for (let i = 0; i < tree.children.length; i++) {
49
+ const node = tree.children[i];
50
+ if (node.type === "heading") {
51
+ const heading = node;
52
+ if (heading.depth === 1) {
53
+ title = heading.children.filter((c) => c.type === "text").map((c) => c.value).join("");
54
+ titleNodeIdx = i;
55
+ break;
56
+ }
57
+ }
58
+ }
59
+ if (!title) throw new Error("Changenote must have a title (# Heading)");
60
+ const bodyTree = {
61
+ type: "root",
62
+ children: tree.children.filter((_, i) => i !== titleNodeIdx)
63
+ };
64
+ const body = unified().use(remarkStringify).stringify(bodyTree).trim();
65
+ return {
66
+ frontmatter,
67
+ title,
68
+ body
69
+ };
70
+ }
71
+ /**
72
+ * Serialize a {@link ChangenoteMarkdown} back to a markdown string.
73
+ */
74
+ function stringifyChangenote(changenote) {
75
+ const yaml = (0, import_dist.stringify)(changenote.frontmatter).trim();
76
+ const lines = [];
77
+ lines.push("---");
78
+ lines.push(yaml);
79
+ lines.push("---");
80
+ lines.push(`# ${changenote.title}`);
81
+ lines.push("");
82
+ lines.push(changenote.body.trim());
83
+ return lines.join("\n");
84
+ }
85
+ /**
86
+ * Update frontmatter fields in an existing changenote markdown string.
87
+ *
88
+ * Uses the remark AST to locate and modify the YAML node, then
89
+ * serializes the full document back to markdown — preserving
90
+ * body content faithfully.
91
+ *
92
+ * @param content Original markdown string
93
+ * @param updates Key-value pairs to merge into frontmatter
94
+ * @returns Updated markdown string
95
+ * @throws If no frontmatter is found
96
+ */
97
+ function updateFrontmatter(content, updates) {
98
+ const processor = unified().use(remarkParse).use(remarkFrontmatter).use(remarkStringify);
99
+ const ast = processor.parse(content);
100
+ let yamlNode;
101
+ for (const node of ast.children) if (node.type === "yaml") {
102
+ yamlNode = node;
103
+ break;
104
+ }
105
+ if (!yamlNode) throw new Error("Changenote is missing frontmatter");
106
+ const data = (0, import_dist.parse)(yamlNode.value) ?? {};
107
+ Object.assign(data, updates);
108
+ yamlNode.value = (0, import_dist.stringify)(data).trim();
109
+ return processor.stringify(ast);
110
+ }
111
+ /** Parse a single changenote markdown file */
112
+ async function parseChangenotefile(filePath) {
113
+ return parseChangenoteContent(await fs.readFile(filePath, "utf-8"), filePath);
114
+ }
115
+ /** Parse changenote content from a string */
116
+ function parseChangenoteContent(content, filePath) {
117
+ const id = basename(filePath, ".md");
118
+ let parsed;
119
+ try {
120
+ parsed = parse(content);
121
+ } catch (err) {
122
+ if ((err instanceof Error ? err.message : String(err)).includes("title")) throw new Error(`Changenote ${filePath} must have a title (# Heading)`);
123
+ throw new Error(`Changenote ${filePath} is missing frontmatter`);
124
+ }
125
+ const { frontmatter, title, body } = parsed;
126
+ const bump = frontmatter.bump;
127
+ if (typeof bump !== "string" || !isValidBump(bump)) throw new Error(`Invalid bump type "${bump}" in ${filePath}. Must be major, minor, or patch.`);
128
+ return {
129
+ id,
130
+ meta: {
131
+ ...frontmatter,
132
+ bump
133
+ },
134
+ title,
135
+ body,
136
+ filePath
137
+ };
138
+ }
139
+ /** Read all changenotes from the changenotes directory */
140
+ async function readChangenotes(changenotesDir) {
141
+ const files = await Ze(join(changenotesDir, "*.md"));
142
+ const changenotes = [];
143
+ for (const file of files) changenotes.push(await parseChangenotefile(file));
144
+ return changenotes;
145
+ }
146
+ /** Write a new changenote file */
147
+ async function writeChangenote(changenotesDir, id, frontmatter, title, body) {
148
+ await fs.mkdir(changenotesDir, { recursive: true });
149
+ const content = stringifyChangenote({
150
+ frontmatter,
151
+ title,
152
+ body
153
+ });
154
+ const filePath = join(changenotesDir, `${id}.md`);
155
+ await fs.writeFile(filePath, content, "utf-8");
156
+ return filePath;
157
+ }
158
+ const PREPARE_FILE = "prepare.json";
159
+ /** Write a prepare config to the .changenotes directory */
160
+ async function writePrepareConfig(changenotesDir, config) {
161
+ await fs.mkdir(changenotesDir, { recursive: true });
162
+ const filePath = join(changenotesDir, PREPARE_FILE);
163
+ await fs.writeFile(filePath, JSON.stringify(config, null, 2), "utf-8");
164
+ return filePath;
165
+ }
166
+ /** Read the prepare config from the .changenotes directory, or null if not present */
167
+ async function readPrepareConfig(changenotesDir) {
168
+ const filePath = join(changenotesDir, PREPARE_FILE);
169
+ try {
170
+ const content = await fs.readFile(filePath, "utf-8");
171
+ return JSON.parse(content);
172
+ } catch {
173
+ return null;
174
+ }
175
+ }
176
+ /** Remove the prepare config file after it has been consumed */
177
+ async function consumePrepareConfig(changenotesDir) {
178
+ const filePath = join(changenotesDir, PREPARE_FILE);
179
+ try {
180
+ await fs.unlink(filePath);
181
+ } catch {}
182
+ }
183
+ //#endregion
184
+ export { consumePrepareConfig, parseChangenoteContent, parseChangenotefile, parseFrontmatter, readChangenotes, readPrepareConfig, updateFrontmatter, writeChangenote, writePrepareConfig };
@@ -0,0 +1,4 @@
1
+ //#region src/cli/commands/change.d.ts
2
+ declare function defaultGenerateNoteName(): string;
3
+ //#endregion
4
+ export { defaultGenerateNoteName };
@@ -0,0 +1,75 @@
1
+ import "../../node_modules/.pnpm/@clack_prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs";
2
+ import "../../index.mjs";
3
+ import "node:path";
4
+ //#region src/cli/commands/change.ts
5
+ function defaultGenerateNoteName() {
6
+ const adjectives = [
7
+ "brave",
8
+ "calm",
9
+ "dark",
10
+ "eager",
11
+ "fair",
12
+ "gentle",
13
+ "happy",
14
+ "icy",
15
+ "jolly",
16
+ "keen",
17
+ "lively",
18
+ "merry",
19
+ "noble",
20
+ "odd",
21
+ "proud",
22
+ "quick",
23
+ "rare",
24
+ "shy",
25
+ "tall",
26
+ "warm"
27
+ ];
28
+ const colors = [
29
+ "amber",
30
+ "azure",
31
+ "coral",
32
+ "crimson",
33
+ "ember",
34
+ "fern",
35
+ "frost",
36
+ "gold",
37
+ "jade",
38
+ "lemon",
39
+ "lilac",
40
+ "maple",
41
+ "ocean",
42
+ "onyx",
43
+ "pearl",
44
+ "rose",
45
+ "ruby",
46
+ "sage",
47
+ "slate",
48
+ "teal"
49
+ ];
50
+ const nouns = [
51
+ "fox",
52
+ "bear",
53
+ "deer",
54
+ "wolf",
55
+ "hawk",
56
+ "lynx",
57
+ "owl",
58
+ "pike",
59
+ "crow",
60
+ "dove",
61
+ "frog",
62
+ "goat",
63
+ "hare",
64
+ "ibis",
65
+ "jay",
66
+ "kite",
67
+ "lark",
68
+ "mole",
69
+ "newt",
70
+ "orca"
71
+ ];
72
+ return `${adjectives[Math.floor(Math.random() * adjectives.length)]}-${colors[Math.floor(Math.random() * colors.length)]}-${nouns[Math.floor(Math.random() * nouns.length)]}`;
73
+ }
74
+ //#endregion
75
+ export { defaultGenerateNoteName };
@@ -0,0 +1,31 @@
1
+ import { CngpacConfig, FormatterPlugin } from "./types.mjs";
2
+
3
+ //#region src/formatter.d.ts
4
+ interface FormatterOptions {
5
+ /** File extensions to handle (without leading dot, e.g. ["json", "md"]) */
6
+ extensions: string[];
7
+ /** The command to run (file paths are appended, e.g. "biome format --write") */
8
+ command: string;
9
+ }
10
+ /**
11
+ * Creates a formatter plugin that spawns an external command.
12
+ *
13
+ * Augments `PATH` with `node_modules/.bin` so the binary resolves
14
+ * regardless of which package manager installed it.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * createFormatter({ extensions: ["json", "ts"], command: "biome format --write" })
19
+ * createFormatter({ extensions: ["md", "yml"], command: "oxfmt" })
20
+ * ```
21
+ */
22
+ declare function createFormatter(options: FormatterOptions): FormatterPlugin;
23
+ /**
24
+ * Dispatch dirty files to matching formatters by extension.
25
+ *
26
+ * Filters out deleted files and routes each surviving file to
27
+ * every formatter whose `extensions` list includes that file's extension.
28
+ */
29
+ declare function formatFiles(filePaths: string[], config: CngpacConfig, rootDir: string): Promise<void>;
30
+ //#endregion
31
+ export { FormatterOptions, createFormatter, formatFiles };
@@ -0,0 +1,50 @@
1
+ import { delimiter, extname, join } from "node:path";
2
+ import { existsSync } from "node:fs";
3
+ import { execSync } from "node:child_process";
4
+ //#region src/formatter.ts
5
+ /**
6
+ * Creates a formatter plugin that spawns an external command.
7
+ *
8
+ * Augments `PATH` with `node_modules/.bin` so the binary resolves
9
+ * regardless of which package manager installed it.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * createFormatter({ extensions: ["json", "ts"], command: "biome format --write" })
14
+ * createFormatter({ extensions: ["md", "yml"], command: "oxfmt" })
15
+ * ```
16
+ */
17
+ function createFormatter(options) {
18
+ return {
19
+ extensions: options.extensions,
20
+ format: (filePaths, rootDir) => {
21
+ if (filePaths.length === 0) return;
22
+ const binDir = join(rootDir, "node_modules", ".bin");
23
+ execSync(`${options.command} ${filePaths.join(" ")}`, {
24
+ stdio: "inherit",
25
+ env: {
26
+ ...process.env,
27
+ PATH: `${binDir}${delimiter}${process.env.PATH}`
28
+ }
29
+ });
30
+ }
31
+ };
32
+ }
33
+ /**
34
+ * Dispatch dirty files to matching formatters by extension.
35
+ *
36
+ * Filters out deleted files and routes each surviving file to
37
+ * every formatter whose `extensions` list includes that file's extension.
38
+ */
39
+ async function formatFiles(filePaths, config, rootDir) {
40
+ if (!config.formatters?.length || filePaths.length === 0) return;
41
+ const existing = filePaths.filter((p) => existsSync(p));
42
+ if (existing.length === 0) return;
43
+ for (const formatter of config.formatters) {
44
+ const extSet = new Set(formatter.extensions.map((e) => `.${e}`));
45
+ const matched = existing.filter((f) => extSet.has(extname(f)));
46
+ if (matched.length > 0) await formatter.format(matched, rootDir);
47
+ }
48
+ }
49
+ //#endregion
50
+ export { createFormatter, formatFiles };
@@ -0,0 +1,20 @@
1
+ import { ChangenoteCommit, CommitAuthor } from "./types.mjs";
2
+
3
+ //#region src/git.d.ts
4
+ /** Create a git operations instance for a repository */
5
+ declare function createGitOps(repoDir?: string): {
6
+ currentBranch(): Promise<string>;
7
+ getFileAuthors(file: string): Promise<CommitAuthor[]>;
8
+ getFileAddCommit(filePath: string): Promise<ChangenoteCommit>;
9
+ getStagedFiles(pattern?: RegExp): Promise<string[]>;
10
+ getUnstagedFiles(pattern?: RegExp): Promise<string[]>;
11
+ add(file: string[]): Promise<void>;
12
+ commit(message: string): Promise<void>;
13
+ tag(name: string, message?: string): Promise<void>;
14
+ push(branch?: string): Promise<void>;
15
+ pushSetUpstream(branch: string): Promise<void>;
16
+ pushTags(branch?: string): Promise<void>;
17
+ ensureGitIdentity(): Promise<void>;
18
+ };
19
+ //#endregion
20
+ export { createGitOps };