pr-checkmate 3.0.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/dist/{cli.js → cjs/cli.js} +30 -30
  2. package/dist/{config → cjs/config}/index.d.ts +2 -2
  3. package/dist/{config → cjs/config}/index.js +8 -7
  4. package/dist/{config → cjs/config}/loader.d.ts +1 -1
  5. package/dist/{config → cjs/config}/loader.js +8 -8
  6. package/dist/{core → cjs/core}/checks/dependencies/banned-imports.d.ts +1 -1
  7. package/dist/{core → cjs/core}/checks/dependencies/banned-imports.js +10 -10
  8. package/dist/{core → cjs/core}/checks/dependencies/circular-deps.d.ts +1 -1
  9. package/dist/{core → cjs/core}/checks/dependencies/circular-deps.js +27 -27
  10. package/dist/{core → cjs/core}/checks/dependencies/dependency-check.d.ts +1 -1
  11. package/dist/{core → cjs/core}/checks/dependencies/dependency-check.js +17 -17
  12. package/dist/{core → cjs/core}/checks/dependencies/grype-scan.d.ts +1 -1
  13. package/dist/{core → cjs/core}/checks/dependencies/grype-scan.js +18 -18
  14. package/dist/{core → cjs/core}/checks/dependencies/license-check.d.ts +1 -1
  15. package/dist/{core → cjs/core}/checks/dependencies/license-check.js +12 -12
  16. package/dist/{core → cjs/core}/checks/dependencies/npm-audit.d.ts +1 -1
  17. package/dist/{core → cjs/core}/checks/dependencies/npm-audit.js +14 -14
  18. package/dist/{core → cjs/core}/checks/dependencies/outdated-deps.d.ts +1 -1
  19. package/dist/{core → cjs/core}/checks/dependencies/outdated-deps.js +14 -14
  20. package/dist/{core → cjs/core}/checks/dependencies/vuln-scan.d.ts +1 -1
  21. package/dist/{core → cjs/core}/checks/dependencies/vuln-scan.js +14 -14
  22. package/dist/{core → cjs/core}/checks/findings.d.ts +1 -1
  23. package/dist/{core → cjs/core}/checks/findings.js +16 -16
  24. package/dist/{core → cjs/core}/checks/git/custom-rules.d.ts +1 -1
  25. package/dist/{core → cjs/core}/checks/git/custom-rules.js +19 -19
  26. package/dist/{core → cjs/core}/checks/git/diff-smell.d.ts +2 -2
  27. package/dist/{core → cjs/core}/checks/git/diff-smell.js +13 -13
  28. package/dist/{core → cjs/core}/checks/git/large-files.d.ts +1 -1
  29. package/dist/{core → cjs/core}/checks/git/large-files.js +15 -15
  30. package/dist/{core → cjs/core}/checks/git/leftover-debug.d.ts +1 -1
  31. package/dist/{core → cjs/core}/checks/git/leftover-debug.js +13 -13
  32. package/dist/{core → cjs/core}/checks/git/lockfile-drift.d.ts +1 -1
  33. package/dist/{core → cjs/core}/checks/git/lockfile-drift.js +12 -12
  34. package/dist/{core → cjs/core}/checks/git/merge-conflict.d.ts +1 -1
  35. package/dist/{core → cjs/core}/checks/git/merge-conflict.js +15 -15
  36. package/dist/{core → cjs/core}/checks/git/missing-tests.d.ts +1 -1
  37. package/dist/{core → cjs/core}/checks/git/missing-tests.js +15 -15
  38. package/dist/{core → cjs/core}/checks/git/todo-fixme.d.ts +1 -1
  39. package/dist/{core → cjs/core}/checks/git/todo-fixme.js +11 -11
  40. package/dist/{core → cjs/core}/checks/languages/cpp-format.d.ts +1 -1
  41. package/dist/{core → cjs/core}/checks/languages/cpp-format.js +18 -18
  42. package/dist/{core → cjs/core}/checks/languages/external-checks.d.ts +9 -9
  43. package/dist/{core → cjs/core}/checks/languages/external-checks.js +10 -10
  44. package/dist/{core → cjs/core}/checks/languages/external-runner.d.ts +2 -2
  45. package/dist/{core → cjs/core}/checks/languages/external-runner.js +21 -21
  46. package/dist/{core → cjs/core}/checks/languages/go-format.d.ts +1 -1
  47. package/dist/cjs/core/checks/languages/go-format.js +202 -0
  48. package/dist/cjs/core/checks/languages/lint.d.ts +2 -0
  49. package/dist/{core → cjs/core}/checks/languages/lint.js +21 -21
  50. package/dist/{core → cjs/core}/checks/languages/prettier.d.ts +1 -1
  51. package/dist/{core → cjs/core}/checks/languages/prettier.js +18 -18
  52. package/dist/{core → cjs/core}/checks/languages/python-format.d.ts +1 -1
  53. package/dist/{core → cjs/core}/checks/languages/python-format.js +14 -14
  54. package/dist/{core → cjs/core}/checks/languages/python-lint.d.ts +1 -1
  55. package/dist/{core → cjs/core}/checks/languages/python-lint.js +13 -13
  56. package/dist/{core → cjs/core}/checks/languages/python-typecheck.d.ts +1 -1
  57. package/dist/{core → cjs/core}/checks/languages/python-typecheck.js +29 -29
  58. package/dist/{core → cjs/core}/checks/languages/typecheck.d.ts +1 -1
  59. package/dist/{core → cjs/core}/checks/languages/typecheck.js +13 -13
  60. package/dist/{core → cjs/core}/checks/pr/commitlint.d.ts +1 -1
  61. package/dist/{core → cjs/core}/checks/pr/commitlint.js +12 -12
  62. package/dist/{core → cjs/core}/checks/pr/pr-body.d.ts +1 -1
  63. package/dist/{core → cjs/core}/checks/pr/pr-body.js +8 -8
  64. package/dist/{core → cjs/core}/checks/pr/pr-size-check.d.ts +1 -1
  65. package/dist/{core → cjs/core}/checks/pr/pr-size-check.js +10 -10
  66. package/dist/{core → cjs/core}/checks/pr/pr-title-lint.d.ts +1 -1
  67. package/dist/{core → cjs/core}/checks/pr/pr-title-lint.js +8 -8
  68. package/dist/{core → cjs/core}/checks/quality/case-collision.d.ts +1 -1
  69. package/dist/{core → cjs/core}/checks/quality/case-collision.js +7 -7
  70. package/dist/{core → cjs/core}/checks/quality/config-validation.d.ts +1 -1
  71. package/dist/{core → cjs/core}/checks/quality/config-validation.js +9 -9
  72. package/dist/{core → cjs/core}/checks/quality/coverage.d.ts +1 -1
  73. package/dist/{core → cjs/core}/checks/quality/coverage.js +4 -4
  74. package/dist/{core → cjs/core}/checks/quality/dead-code.d.ts +1 -1
  75. package/dist/{core → cjs/core}/checks/quality/dead-code.js +23 -23
  76. package/dist/{core → cjs/core}/checks/quality/duplicate-check.d.ts +1 -1
  77. package/dist/{core → cjs/core}/checks/quality/duplicate-check.js +22 -22
  78. package/dist/{core → cjs/core}/checks/quality/license-header.d.ts +1 -1
  79. package/dist/{core → cjs/core}/checks/quality/license-header.js +16 -16
  80. package/dist/{core → cjs/core}/checks/quality/markdown-lint.d.ts +1 -1
  81. package/dist/{core → cjs/core}/checks/quality/markdown-lint.js +17 -17
  82. package/dist/{core → cjs/core}/checks/quality/package-size.d.ts +1 -1
  83. package/dist/{core → cjs/core}/checks/quality/package-size.js +12 -12
  84. package/dist/{core → cjs/core}/checks/quality/spellcheck.d.ts +2 -2
  85. package/dist/{core → cjs/core}/checks/quality/spellcheck.js +18 -18
  86. package/dist/{core → cjs/core}/checks/quality/symlinks.d.ts +1 -1
  87. package/dist/{core → cjs/core}/checks/quality/symlinks.js +8 -8
  88. package/dist/{core → cjs/core}/checks/quality/yaml-lint.d.ts +1 -1
  89. package/dist/{core → cjs/core}/checks/quality/yaml-lint.js +12 -12
  90. package/dist/{core → cjs/core}/checks/security/diff-security.d.ts +1 -1
  91. package/dist/{core → cjs/core}/checks/security/diff-security.js +15 -15
  92. package/dist/{core → cjs/core}/checks/security/dockerfile-security.d.ts +1 -1
  93. package/dist/{core → cjs/core}/checks/security/dockerfile-security.js +16 -16
  94. package/dist/{core → cjs/core}/checks/security/migration-safety.d.ts +1 -1
  95. package/dist/{core → cjs/core}/checks/security/migration-safety.js +17 -17
  96. package/dist/{core → cjs/core}/checks/security/security.d.ts +1 -1
  97. package/dist/{core → cjs/core}/checks/security/security.js +21 -21
  98. package/dist/{core → cjs/core}/checks/security/sensitive-file-guard.d.ts +1 -1
  99. package/dist/{core → cjs/core}/checks/security/sensitive-file-guard.js +14 -14
  100. package/dist/{core → cjs/core}/checks/security/workflow-security.d.ts +2 -2
  101. package/dist/{core → cjs/core}/checks/security/workflow-security.js +14 -14
  102. package/dist/{core → cjs/core}/checks/tool-install.d.ts +1 -1
  103. package/dist/{core → cjs/core}/checks/tool-install.js +2 -2
  104. package/dist/{core → cjs/core}/context.d.ts +1 -1
  105. package/dist/{core → cjs/core}/context.js +16 -16
  106. package/dist/cjs/core/index.d.ts +4 -0
  107. package/dist/{core → cjs/core}/index.js +7 -7
  108. package/dist/{core → cjs/core}/install/cache.js +2 -2
  109. package/dist/{core → cjs/core}/install/doctor.d.ts +4 -4
  110. package/dist/{core → cjs/core}/install/doctor.js +34 -34
  111. package/dist/{core → cjs/core}/install/ensure.d.ts +2 -2
  112. package/dist/{core → cjs/core}/install/ensure.js +15 -14
  113. package/dist/{core → cjs/core}/install/lock.js +4 -4
  114. package/dist/{core → cjs/core}/install/prepare.d.ts +4 -4
  115. package/dist/{core → cjs/core}/install/prepare.js +13 -13
  116. package/dist/{core → cjs/core}/install/profiles.d.ts +2 -2
  117. package/dist/{core → cjs/core}/install/reuse.d.ts +1 -1
  118. package/dist/{core → cjs/core}/install/reuse.js +4 -4
  119. package/dist/{core → cjs/core}/registry.d.ts +1 -1
  120. package/dist/cjs/core/registry.js +112 -0
  121. package/dist/{core → cjs/core}/reporters.d.ts +1 -1
  122. package/dist/{core → cjs/core}/reporters.js +28 -28
  123. package/dist/{core → cjs/core}/run-checks.d.ts +2 -2
  124. package/dist/{core → cjs/core}/run-checks.js +31 -31
  125. package/dist/{core → cjs/core}/targets.d.ts +1 -1
  126. package/dist/{core → cjs/core}/targets.js +20 -20
  127. package/dist/{core → cjs/core}/types.d.ts +3 -3
  128. package/dist/cjs/index.d.ts +12 -0
  129. package/dist/{index.js → cjs/index.js} +18 -18
  130. package/dist/{init.js → cjs/init.js} +68 -56
  131. package/dist/{interfaces → cjs/interfaces}/index.d.ts +3 -3
  132. package/dist/cjs/package.json +1 -0
  133. package/dist/{scripts → cjs/scripts}/copy-configs.js +22 -7
  134. package/dist/{scripts → cjs/scripts}/generate-install-manifests.js +2 -2
  135. package/dist/{scripts → cjs/scripts}/publish-github.js +4 -4
  136. package/dist/{utils → cjs/utils}/detect-language.js +12 -12
  137. package/dist/cjs/utils/execa.js +46 -0
  138. package/dist/{utils → cjs/utils}/git.js +2 -2
  139. package/dist/{utils → cjs/utils}/http.js +2 -2
  140. package/dist/cjs/utils/index.d.ts +15 -0
  141. package/dist/{utils → cjs/utils}/index.js +13 -13
  142. package/dist/{utils → cjs/utils}/own-deps.d.ts +2 -0
  143. package/dist/{utils → cjs/utils}/own-deps.js +1 -0
  144. package/dist/{utils → cjs/utils}/package-version.js +2 -1
  145. package/dist/{utils → cjs/utils}/resolve-bin.js +2 -1
  146. package/dist/{utils → cjs/utils}/update-notifier.js +4 -4
  147. package/dist/esm/cli.d.ts +2 -0
  148. package/dist/esm/cli.js +137 -0
  149. package/dist/esm/config/constants.d.ts +153 -0
  150. package/dist/esm/config/constants.js +360 -0
  151. package/dist/esm/config/index.d.ts +40 -0
  152. package/dist/esm/config/index.js +60 -0
  153. package/dist/esm/config/loader.d.ts +6 -0
  154. package/dist/esm/config/loader.js +191 -0
  155. package/dist/esm/config/pr-checkmate-workflow-docker.yml +79 -0
  156. package/dist/esm/config/pr-checkmate-workflow.yml +92 -0
  157. package/dist/esm/core/checks/dependencies/banned-imports.d.ts +2 -0
  158. package/dist/esm/core/checks/dependencies/banned-imports.js +70 -0
  159. package/dist/esm/core/checks/dependencies/circular-deps.d.ts +2 -0
  160. package/dist/esm/core/checks/dependencies/circular-deps.js +155 -0
  161. package/dist/esm/core/checks/dependencies/dependency-check.d.ts +43 -0
  162. package/dist/esm/core/checks/dependencies/dependency-check.js +174 -0
  163. package/dist/esm/core/checks/dependencies/grype-scan.d.ts +22 -0
  164. package/dist/esm/core/checks/dependencies/grype-scan.js +112 -0
  165. package/dist/esm/core/checks/dependencies/license-check.d.ts +2 -0
  166. package/dist/esm/core/checks/dependencies/license-check.js +61 -0
  167. package/dist/esm/core/checks/dependencies/npm-audit.d.ts +6 -0
  168. package/dist/esm/core/checks/dependencies/npm-audit.js +80 -0
  169. package/dist/esm/core/checks/dependencies/outdated-deps.d.ts +2 -0
  170. package/dist/esm/core/checks/dependencies/outdated-deps.js +66 -0
  171. package/dist/esm/core/checks/dependencies/vuln-scan.d.ts +2 -0
  172. package/dist/esm/core/checks/dependencies/vuln-scan.js +54 -0
  173. package/dist/esm/core/checks/findings.d.ts +299 -0
  174. package/dist/esm/core/checks/findings.js +701 -0
  175. package/dist/esm/core/checks/git/custom-rules.d.ts +2 -0
  176. package/dist/esm/core/checks/git/custom-rules.js +106 -0
  177. package/dist/esm/core/checks/git/diff-smell.d.ts +19 -0
  178. package/dist/esm/core/checks/git/diff-smell.js +69 -0
  179. package/dist/esm/core/checks/git/large-files.d.ts +2 -0
  180. package/dist/esm/core/checks/git/large-files.js +112 -0
  181. package/dist/esm/core/checks/git/leftover-debug.d.ts +2 -0
  182. package/dist/esm/core/checks/git/leftover-debug.js +89 -0
  183. package/dist/esm/core/checks/git/lockfile-drift.d.ts +2 -0
  184. package/dist/esm/core/checks/git/lockfile-drift.js +114 -0
  185. package/dist/esm/core/checks/git/merge-conflict.d.ts +2 -0
  186. package/dist/esm/core/checks/git/merge-conflict.js +117 -0
  187. package/dist/esm/core/checks/git/missing-tests.d.ts +2 -0
  188. package/dist/esm/core/checks/git/missing-tests.js +105 -0
  189. package/dist/esm/core/checks/git/todo-fixme.d.ts +7 -0
  190. package/dist/esm/core/checks/git/todo-fixme.js +80 -0
  191. package/dist/esm/core/checks/languages/cpp-format.d.ts +7 -0
  192. package/dist/esm/core/checks/languages/cpp-format.js +91 -0
  193. package/dist/esm/core/checks/languages/external-checks.d.ts +77 -0
  194. package/dist/esm/core/checks/languages/external-checks.js +197 -0
  195. package/dist/esm/core/checks/languages/external-runner.d.ts +119 -0
  196. package/dist/esm/core/checks/languages/external-runner.js +138 -0
  197. package/dist/esm/core/checks/languages/go-format.d.ts +8 -0
  198. package/dist/{core → esm/core}/checks/languages/go-format.js +29 -35
  199. package/dist/esm/core/checks/languages/lint.d.ts +2 -0
  200. package/dist/esm/core/checks/languages/lint.js +92 -0
  201. package/dist/esm/core/checks/languages/prettier.d.ts +2 -0
  202. package/dist/esm/core/checks/languages/prettier.js +85 -0
  203. package/dist/esm/core/checks/languages/python-format.d.ts +7 -0
  204. package/dist/esm/core/checks/languages/python-format.js +61 -0
  205. package/dist/esm/core/checks/languages/python-lint.d.ts +9 -0
  206. package/dist/esm/core/checks/languages/python-lint.js +55 -0
  207. package/dist/esm/core/checks/languages/python-typecheck.d.ts +14 -0
  208. package/dist/esm/core/checks/languages/python-typecheck.js +184 -0
  209. package/dist/esm/core/checks/languages/ruff-shared.d.ts +10 -0
  210. package/dist/esm/core/checks/languages/ruff-shared.js +35 -0
  211. package/dist/esm/core/checks/languages/typecheck.d.ts +2 -0
  212. package/dist/esm/core/checks/languages/typecheck.js +61 -0
  213. package/dist/esm/core/checks/pr/commitlint.d.ts +2 -0
  214. package/dist/esm/core/checks/pr/commitlint.js +102 -0
  215. package/dist/esm/core/checks/pr/pr-body.d.ts +2 -0
  216. package/dist/esm/core/checks/pr/pr-body.js +43 -0
  217. package/dist/esm/core/checks/pr/pr-size-check.d.ts +2 -0
  218. package/dist/esm/core/checks/pr/pr-size-check.js +42 -0
  219. package/dist/esm/core/checks/pr/pr-title-lint.d.ts +2 -0
  220. package/dist/esm/core/checks/pr/pr-title-lint.js +31 -0
  221. package/dist/esm/core/checks/quality/case-collision.d.ts +8 -0
  222. package/dist/esm/core/checks/quality/case-collision.js +39 -0
  223. package/dist/esm/core/checks/quality/config-validation.d.ts +11 -0
  224. package/dist/esm/core/checks/quality/config-validation.js +188 -0
  225. package/dist/esm/core/checks/quality/coverage.d.ts +2 -0
  226. package/dist/esm/core/checks/quality/coverage.js +62 -0
  227. package/dist/esm/core/checks/quality/dead-code.d.ts +2 -0
  228. package/dist/esm/core/checks/quality/dead-code.js +124 -0
  229. package/dist/esm/core/checks/quality/duplicate-check.d.ts +2 -0
  230. package/dist/esm/core/checks/quality/duplicate-check.js +141 -0
  231. package/dist/esm/core/checks/quality/license-header.d.ts +7 -0
  232. package/dist/esm/core/checks/quality/license-header.js +81 -0
  233. package/dist/esm/core/checks/quality/markdown-lint.d.ts +2 -0
  234. package/dist/esm/core/checks/quality/markdown-lint.js +104 -0
  235. package/dist/esm/core/checks/quality/package-size.d.ts +36 -0
  236. package/dist/esm/core/checks/quality/package-size.js +196 -0
  237. package/dist/esm/core/checks/quality/spellcheck.d.ts +77 -0
  238. package/dist/esm/core/checks/quality/spellcheck.js +296 -0
  239. package/dist/esm/core/checks/quality/symlinks.d.ts +16 -0
  240. package/dist/esm/core/checks/quality/symlinks.js +57 -0
  241. package/dist/esm/core/checks/quality/yaml-lint.d.ts +20 -0
  242. package/dist/esm/core/checks/quality/yaml-lint.js +116 -0
  243. package/dist/esm/core/checks/security/diff-security.d.ts +2 -0
  244. package/dist/esm/core/checks/security/diff-security.js +354 -0
  245. package/dist/esm/core/checks/security/dockerfile-security.d.ts +2 -0
  246. package/dist/esm/core/checks/security/dockerfile-security.js +98 -0
  247. package/dist/esm/core/checks/security/migration-safety.d.ts +2 -0
  248. package/dist/esm/core/checks/security/migration-safety.js +137 -0
  249. package/dist/esm/core/checks/security/security.d.ts +63 -0
  250. package/dist/esm/core/checks/security/security.js +201 -0
  251. package/dist/esm/core/checks/security/sensitive-file-guard.d.ts +2 -0
  252. package/dist/esm/core/checks/security/sensitive-file-guard.js +160 -0
  253. package/dist/esm/core/checks/security/workflow-security.d.ts +12 -0
  254. package/dist/esm/core/checks/security/workflow-security.js +100 -0
  255. package/dist/esm/core/checks/tool-install.d.ts +102 -0
  256. package/dist/esm/core/checks/tool-install.js +66 -0
  257. package/dist/esm/core/commands.d.ts +27 -0
  258. package/dist/esm/core/commands.js +89 -0
  259. package/dist/esm/core/context.d.ts +62 -0
  260. package/dist/esm/core/context.js +241 -0
  261. package/dist/esm/core/index.d.ts +4 -0
  262. package/dist/esm/core/index.js +4 -0
  263. package/dist/esm/core/install/cache.d.ts +58 -0
  264. package/dist/esm/core/install/cache.js +142 -0
  265. package/dist/esm/core/install/doctor.d.ts +35 -0
  266. package/dist/esm/core/install/doctor.js +164 -0
  267. package/dist/esm/core/install/ensure.d.ts +77 -0
  268. package/dist/esm/core/install/ensure.js +269 -0
  269. package/dist/esm/core/install/lock.d.ts +34 -0
  270. package/dist/esm/core/install/lock.js +92 -0
  271. package/dist/esm/core/install/merge.d.ts +47 -0
  272. package/dist/esm/core/install/merge.js +85 -0
  273. package/dist/esm/core/install/prepare.d.ts +76 -0
  274. package/dist/esm/core/install/prepare.js +142 -0
  275. package/dist/esm/core/install/profiles.d.ts +78 -0
  276. package/dist/esm/core/install/profiles.js +192 -0
  277. package/dist/esm/core/install/reuse.d.ts +41 -0
  278. package/dist/esm/core/install/reuse.js +100 -0
  279. package/dist/esm/core/registry.d.ts +6 -0
  280. package/dist/esm/core/registry.js +109 -0
  281. package/dist/esm/core/reporters.d.ts +18 -0
  282. package/dist/esm/core/reporters.js +266 -0
  283. package/dist/esm/core/run-checks.d.ts +33 -0
  284. package/dist/esm/core/run-checks.js +293 -0
  285. package/dist/esm/core/targets.d.ts +140 -0
  286. package/dist/esm/core/targets.js +213 -0
  287. package/dist/esm/core/types.d.ts +195 -0
  288. package/dist/esm/core/types.js +38 -0
  289. package/dist/esm/index.d.ts +12 -0
  290. package/dist/esm/index.js +15 -0
  291. package/dist/esm/init.d.ts +38 -0
  292. package/dist/esm/init.js +421 -0
  293. package/dist/esm/interfaces/index.d.ts +432 -0
  294. package/dist/esm/interfaces/index.js +2 -0
  295. package/dist/esm/package.json +1 -0
  296. package/dist/esm/scripts/copy-configs.d.ts +1 -0
  297. package/dist/esm/scripts/copy-configs.js +64 -0
  298. package/dist/esm/scripts/generate-install-manifests.d.ts +39 -0
  299. package/dist/esm/scripts/generate-install-manifests.js +115 -0
  300. package/dist/esm/scripts/publish-github.d.ts +1 -0
  301. package/dist/esm/scripts/publish-github.js +45 -0
  302. package/dist/esm/utils/ci.d.ts +11 -0
  303. package/dist/esm/utils/ci.js +40 -0
  304. package/dist/esm/utils/detect-language.d.ts +48 -0
  305. package/dist/esm/utils/detect-language.js +234 -0
  306. package/dist/esm/utils/direct-deps.d.ts +21 -0
  307. package/dist/esm/utils/direct-deps.js +220 -0
  308. package/dist/esm/utils/execa.d.ts +22 -0
  309. package/dist/{utils → esm/utils}/execa.js +1 -4
  310. package/dist/esm/utils/git.d.ts +14 -0
  311. package/dist/esm/utils/git.js +21 -0
  312. package/dist/esm/utils/glob.d.ts +24 -0
  313. package/dist/esm/utils/glob.js +40 -0
  314. package/dist/esm/utils/http.d.ts +59 -0
  315. package/dist/esm/utils/http.js +115 -0
  316. package/dist/esm/utils/index.d.ts +15 -0
  317. package/dist/esm/utils/index.js +26 -0
  318. package/dist/esm/utils/logger.d.ts +65 -0
  319. package/dist/esm/utils/logger.js +157 -0
  320. package/dist/esm/utils/own-deps.d.ts +16 -0
  321. package/dist/esm/utils/own-deps.js +107 -0
  322. package/dist/esm/utils/package-version.d.ts +4 -0
  323. package/dist/esm/utils/package-version.js +38 -0
  324. package/dist/esm/utils/pool.d.ts +49 -0
  325. package/dist/esm/utils/pool.js +113 -0
  326. package/dist/esm/utils/resolve-bin.d.ts +67 -0
  327. package/dist/esm/utils/resolve-bin.js +156 -0
  328. package/dist/esm/utils/result-collector.d.ts +33 -0
  329. package/dist/esm/utils/result-collector.js +44 -0
  330. package/dist/esm/utils/update-notifier.d.ts +19 -0
  331. package/dist/esm/utils/update-notifier.js +108 -0
  332. package/install-manifests/core/package-lock.json +4 -4
  333. package/install-manifests/core/package.json +1 -1
  334. package/install-manifests/cpp/package-lock.json +4 -4
  335. package/install-manifests/cpp/package.json +1 -1
  336. package/package.json +16 -14
  337. package/dist/core/checks/languages/lint.d.ts +0 -2
  338. package/dist/core/index.d.ts +0 -4
  339. package/dist/core/registry.js +0 -112
  340. package/dist/index.d.ts +0 -12
  341. package/dist/utils/index.d.ts +0 -15
  342. /package/dist/{cli.d.ts → cjs/cli.d.ts} +0 -0
  343. /package/dist/{config → cjs/config}/constants.d.ts +0 -0
  344. /package/dist/{config → cjs/config}/constants.js +0 -0
  345. /package/dist/{config → cjs/config}/pr-checkmate-workflow-docker.yml +0 -0
  346. /package/dist/{config → cjs/config}/pr-checkmate-workflow.yml +0 -0
  347. /package/dist/{core → cjs/core}/checks/languages/ruff-shared.d.ts +0 -0
  348. /package/dist/{core → cjs/core}/checks/languages/ruff-shared.js +0 -0
  349. /package/dist/{core → cjs/core}/commands.d.ts +0 -0
  350. /package/dist/{core → cjs/core}/commands.js +0 -0
  351. /package/dist/{core → cjs/core}/install/cache.d.ts +0 -0
  352. /package/dist/{core → cjs/core}/install/lock.d.ts +0 -0
  353. /package/dist/{core → cjs/core}/install/merge.d.ts +0 -0
  354. /package/dist/{core → cjs/core}/install/merge.js +0 -0
  355. /package/dist/{core → cjs/core}/install/profiles.js +0 -0
  356. /package/dist/{core → cjs/core}/types.js +0 -0
  357. /package/dist/{init.d.ts → cjs/init.d.ts} +0 -0
  358. /package/dist/{interfaces → cjs/interfaces}/index.js +0 -0
  359. /package/dist/{scripts → cjs/scripts}/copy-configs.d.ts +0 -0
  360. /package/dist/{scripts → cjs/scripts}/generate-install-manifests.d.ts +0 -0
  361. /package/dist/{scripts → cjs/scripts}/publish-github.d.ts +0 -0
  362. /package/dist/{utils → cjs/utils}/ci.d.ts +0 -0
  363. /package/dist/{utils → cjs/utils}/ci.js +0 -0
  364. /package/dist/{utils → cjs/utils}/detect-language.d.ts +0 -0
  365. /package/dist/{utils → cjs/utils}/direct-deps.d.ts +0 -0
  366. /package/dist/{utils → cjs/utils}/direct-deps.js +0 -0
  367. /package/dist/{utils → cjs/utils}/execa.d.ts +0 -0
  368. /package/dist/{utils → cjs/utils}/git.d.ts +0 -0
  369. /package/dist/{utils → cjs/utils}/glob.d.ts +0 -0
  370. /package/dist/{utils → cjs/utils}/glob.js +0 -0
  371. /package/dist/{utils → cjs/utils}/http.d.ts +0 -0
  372. /package/dist/{utils → cjs/utils}/logger.d.ts +0 -0
  373. /package/dist/{utils → cjs/utils}/logger.js +0 -0
  374. /package/dist/{utils → cjs/utils}/package-version.d.ts +0 -0
  375. /package/dist/{utils → cjs/utils}/pool.d.ts +0 -0
  376. /package/dist/{utils → cjs/utils}/pool.js +0 -0
  377. /package/dist/{utils → cjs/utils}/resolve-bin.d.ts +0 -0
  378. /package/dist/{utils → cjs/utils}/result-collector.d.ts +0 -0
  379. /package/dist/{utils → cjs/utils}/result-collector.js +0 -0
  380. /package/dist/{utils → cjs/utils}/update-notifier.d.ts +0 -0
@@ -1,7 +1,7 @@
1
- import type { PRCheckMateConfig } from '../../interfaces';
2
- import type { LanguageUsage } from '../../utils/detect-language';
3
- import { type EnsureOptions } from './ensure';
4
- import { type Profile } from './profiles';
1
+ import type { PRCheckMateConfig } from '../../interfaces/index.js';
2
+ import type { LanguageUsage } from '../../utils/detect-language.js';
3
+ import { type EnsureOptions } from './ensure.js';
4
+ import { type Profile } from './profiles.js';
5
5
  /**
6
6
  * Whether a profile needs fetching at all, or already ships inside the package.
7
7
  *
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.profileSatisfiedLocally = profileSatisfiedLocally;
4
4
  exports.prepareTooling = prepareTooling;
5
5
  exports.noTooling = noTooling;
6
- const logger_1 = require("../../utils/logger");
7
- const resolve_bin_1 = require("../../utils/resolve-bin");
8
- const ensure_1 = require("./ensure");
9
- const profiles_1 = require("./profiles");
6
+ const logger_js_1 = require("../../utils/logger.js");
7
+ const resolve_bin_js_1 = require("../../utils/resolve-bin.js");
8
+ const ensure_js_1 = require("./ensure.js");
9
+ const profiles_js_1 = require("./profiles.js");
10
10
  /**
11
11
  * Whether a profile needs fetching at all, or already ships inside the package.
12
12
  *
@@ -23,7 +23,7 @@ const profiles_1 = require("./profiles");
23
23
  * rather than another change to this logic.
24
24
  */
25
25
  function profileSatisfiedLocally(profile) {
26
- return profile.packages.every(pkg => (0, resolve_bin_1.packagePresent)(pkg));
26
+ return profile.packages.every(pkg => (0, resolve_bin_js_1.packagePresent)(pkg));
27
27
  }
28
28
  /** Profiles blocked outright by `install.deny`, with a line saying so. */
29
29
  function denied(profile, deny) {
@@ -50,7 +50,7 @@ async function prepareTooling(opts) {
50
50
  // than once in one process, and a directory registered by a previous run — for
51
51
  // a different repository, with a different profile set — must not still be on
52
52
  // the search path for this one.
53
- (0, resolve_bin_1.clearToolPaths)();
53
+ (0, resolve_bin_js_1.clearToolPaths)();
54
54
  const install = opts.config.install ?? {};
55
55
  const strategy = process.env.PR_CHECKMATE_INSTALL_STRATEGY ?? install.strategy ?? 'adaptive';
56
56
  const onMissing = install.onMissingTool ?? 'auto';
@@ -58,14 +58,14 @@ async function prepareTooling(opts) {
58
58
  // Which profiles this repository needs: languages by file count, universal
59
59
  // profiles by whether their check survived config. `install.profiles` and
60
60
  // `excludeProfiles` have already had their say inside `planProfiles`.
61
- const required = new Set((0, profiles_1.planProfiles)(opts.usage, opts.config)
61
+ const required = new Set((0, profiles_js_1.planProfiles)(opts.usage, opts.config)
62
62
  .filter(decision => decision.required)
63
63
  .map(decision => decision.profile));
64
64
  // A profile nobody in this run would use is not worth a thought, let alone a
65
65
  // download. `eager` opts out of that reasoning by definition: it exists so a
66
66
  // container build or an air-gapped mirror can hold everything up front.
67
67
  const chosen = opts.selected.length > 0 ? new Set(opts.selected) : null;
68
- const wanted = (opts.profiles ?? profiles_1.PROFILES).filter(profile => {
68
+ const wanted = (opts.profiles ?? profiles_js_1.PROFILES).filter(profile => {
69
69
  if (strategy === 'eager')
70
70
  return true;
71
71
  if (!required.has(profile.name))
@@ -108,7 +108,7 @@ async function prepareTooling(opts) {
108
108
  // creates the directory and warns when the configured path is unwritable, and a
109
109
  // container with a read-only home would print that on every single run.
110
110
  if (toFetch.length > 0) {
111
- const result = await (0, ensure_1.ensureTooling)(toFetch.map(profile => profile.name), {
111
+ const result = await (0, ensure_js_1.ensureTooling)(toFetch.map(profile => profile.name), {
112
112
  cwd: opts.cwd,
113
113
  version: opts.version,
114
114
  install,
@@ -126,15 +126,15 @@ async function prepareTooling(opts) {
126
126
  // Always logged, never behind --debug. A check that did not run is the
127
127
  // failure mode this whole layer exists to make loud.
128
128
  const names = [...new Set(unavailable.keys())].join(', ');
129
- logger_1.logger.warn(`[install]: ⚠️ tooling unavailable — these checks cannot run: ${names}`);
129
+ logger_js_1.logger.warn(`[install]: ⚠️ tooling unavailable — these checks cannot run: ${names}`);
130
130
  if (onMissing === 'error') {
131
- logger_1.logger.error('[install]: ❌ install.onMissingTool is "error" — the affected checks fail');
131
+ logger_js_1.logger.error('[install]: ❌ install.onMissingTool is "error" — the affected checks fail');
132
132
  }
133
133
  else {
134
- logger_1.logger.info('[install]: Pre-warm the cache with: npx pr-checkmate install --all');
134
+ logger_js_1.logger.info('[install]: Pre-warm the cache with: npx pr-checkmate install --all');
135
135
  }
136
136
  }
137
- (0, resolve_bin_1.registerToolPaths)(dirs);
137
+ (0, resolve_bin_js_1.registerToolPaths)(dirs);
138
138
  return { unavailable, dirs, fatal: onMissing === 'error' && unavailable.size > 0 };
139
139
  }
140
140
  /**
@@ -1,5 +1,5 @@
1
- import type { PRCheckMateConfig } from '../../interfaces';
2
- import type { Language, LanguageUsage } from '../../utils/detect-language';
1
+ import type { PRCheckMateConfig } from '../../interfaces/index.js';
2
+ import type { Language, LanguageUsage } from '../../utils/detect-language.js';
3
3
  /**
4
4
  * A named bundle of tooling, and the checks that stop working without it.
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { CheckContext } from '../types';
1
+ import type { CheckContext } from '../types.js';
2
2
  /** One reuse decision, with the sentence that explains it. */
3
3
  interface ReuseDecision {
4
4
  /** Search roots to prefer, or `undefined` to use our own copy. */
@@ -7,8 +7,8 @@ exports.reuseDecision = reuseDecision;
7
7
  exports.clientToolPaths = clientToolPaths;
8
8
  const node_fs_1 = __importDefault(require("node:fs"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
- const logger_1 = require("../../utils/logger");
11
- const resolve_bin_1 = require("../../utils/resolve-bin");
10
+ const logger_js_1 = require("../../utils/logger.js");
11
+ const resolve_bin_js_1 = require("../../utils/resolve-bin.js");
12
12
  /**
13
13
  * The major version we declare for a tool, from our own manifest.
14
14
  *
@@ -18,7 +18,7 @@ const resolve_bin_1 = require("../../utils/resolve-bin");
18
18
  */
19
19
  function ownMajor(pkgName) {
20
20
  try {
21
- const manifest = node_path_1.default.join((0, resolve_bin_1.ownPackageRoot)(), 'package.json');
21
+ const manifest = node_path_1.default.join((0, resolve_bin_js_1.ownPackageRoot)(), 'package.json');
22
22
  const deps = JSON.parse(node_fs_1.default.readFileSync(manifest, 'utf-8')).dependencies;
23
23
  const range = deps?.[pkgName];
24
24
  if (!range)
@@ -102,6 +102,6 @@ function reuseDecision(pkgName, ctx, opts = {}) {
102
102
  */
103
103
  function clientToolPaths(pkgName, ctx, opts = {}) {
104
104
  const decision = reuseDecision(pkgName, ctx, opts);
105
- logger_1.logger.debug(`[reuseLocal]: ${decision.reason}`);
105
+ logger_js_1.logger.debug(`[reuseLocal]: ${decision.reason}`);
106
106
  return decision.paths;
107
107
  }
@@ -1,4 +1,4 @@
1
- import { Check } from './types';
1
+ import { Check } from './types.js';
2
2
  /**
3
3
  * Every check, in declaration order. The orchestrator groups them by `phase`
4
4
  * (blocking → informational → format) and runs each phase's checks in parallel.
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REGISTRY = void 0;
4
+ const banned_imports_js_1 = require("./checks/dependencies/banned-imports.js");
5
+ const circular_deps_js_1 = require("./checks/dependencies/circular-deps.js");
6
+ const dependency_check_js_1 = require("./checks/dependencies/dependency-check.js");
7
+ const grype_scan_js_1 = require("./checks/dependencies/grype-scan.js");
8
+ const license_check_js_1 = require("./checks/dependencies/license-check.js");
9
+ const npm_audit_js_1 = require("./checks/dependencies/npm-audit.js");
10
+ const outdated_deps_js_1 = require("./checks/dependencies/outdated-deps.js");
11
+ const vuln_scan_js_1 = require("./checks/dependencies/vuln-scan.js");
12
+ const custom_rules_js_1 = require("./checks/git/custom-rules.js");
13
+ const diff_smell_js_1 = require("./checks/git/diff-smell.js");
14
+ const large_files_js_1 = require("./checks/git/large-files.js");
15
+ const leftover_debug_js_1 = require("./checks/git/leftover-debug.js");
16
+ const lockfile_drift_js_1 = require("./checks/git/lockfile-drift.js");
17
+ const merge_conflict_js_1 = require("./checks/git/merge-conflict.js");
18
+ const missing_tests_js_1 = require("./checks/git/missing-tests.js");
19
+ const todo_fixme_js_1 = require("./checks/git/todo-fixme.js");
20
+ const cpp_format_js_1 = require("./checks/languages/cpp-format.js");
21
+ const external_checks_js_1 = require("./checks/languages/external-checks.js");
22
+ const go_format_js_1 = require("./checks/languages/go-format.js");
23
+ const lint_js_1 = require("./checks/languages/lint.js");
24
+ const prettier_js_1 = require("./checks/languages/prettier.js");
25
+ const python_format_js_1 = require("./checks/languages/python-format.js");
26
+ const python_lint_js_1 = require("./checks/languages/python-lint.js");
27
+ const python_typecheck_js_1 = require("./checks/languages/python-typecheck.js");
28
+ const typecheck_js_1 = require("./checks/languages/typecheck.js");
29
+ const commitlint_js_1 = require("./checks/pr/commitlint.js");
30
+ const pr_body_js_1 = require("./checks/pr/pr-body.js");
31
+ const pr_size_check_js_1 = require("./checks/pr/pr-size-check.js");
32
+ const pr_title_lint_js_1 = require("./checks/pr/pr-title-lint.js");
33
+ const case_collision_js_1 = require("./checks/quality/case-collision.js");
34
+ const config_validation_js_1 = require("./checks/quality/config-validation.js");
35
+ const coverage_js_1 = require("./checks/quality/coverage.js");
36
+ const dead_code_js_1 = require("./checks/quality/dead-code.js");
37
+ const duplicate_check_js_1 = require("./checks/quality/duplicate-check.js");
38
+ const license_header_js_1 = require("./checks/quality/license-header.js");
39
+ const markdown_lint_js_1 = require("./checks/quality/markdown-lint.js");
40
+ const package_size_js_1 = require("./checks/quality/package-size.js");
41
+ const spellcheck_js_1 = require("./checks/quality/spellcheck.js");
42
+ const symlinks_js_1 = require("./checks/quality/symlinks.js");
43
+ const yaml_lint_js_1 = require("./checks/quality/yaml-lint.js");
44
+ const diff_security_js_1 = require("./checks/security/diff-security.js");
45
+ const dockerfile_security_js_1 = require("./checks/security/dockerfile-security.js");
46
+ const migration_safety_js_1 = require("./checks/security/migration-safety.js");
47
+ const security_js_1 = require("./checks/security/security.js");
48
+ const sensitive_file_guard_js_1 = require("./checks/security/sensitive-file-guard.js");
49
+ const workflow_security_js_1 = require("./checks/security/workflow-security.js");
50
+ /**
51
+ * Every check, in declaration order. The orchestrator groups them by `phase`
52
+ * (blocking → informational → format) and runs each phase's checks in parallel.
53
+ */
54
+ exports.REGISTRY = [
55
+ // blocking
56
+ merge_conflict_js_1.mergeConflictCheck,
57
+ security_js_1.securityCheck,
58
+ typecheck_js_1.typecheckCheck,
59
+ lint_js_1.lintCheck,
60
+ dependency_check_js_1.dependencyCheck,
61
+ npm_audit_js_1.npmAuditCheck,
62
+ circular_deps_js_1.circularDepsCheck,
63
+ license_check_js_1.licenseCheck,
64
+ // informational
65
+ diff_smell_js_1.diffSmellCheck,
66
+ diff_security_js_1.diffSecurityCheck,
67
+ workflow_security_js_1.workflowSecurityCheck,
68
+ dockerfile_security_js_1.dockerfileSecurityCheck,
69
+ case_collision_js_1.caseCollisionCheck,
70
+ vuln_scan_js_1.vulnScanCheck,
71
+ grype_scan_js_1.grypeScanCheck,
72
+ custom_rules_js_1.customRulesCheck,
73
+ banned_imports_js_1.bannedImportsCheck,
74
+ license_header_js_1.licenseHeaderCheck,
75
+ config_validation_js_1.configValidationCheck,
76
+ leftover_debug_js_1.leftoverDebugCheck,
77
+ lockfile_drift_js_1.lockfileDriftCheck,
78
+ large_files_js_1.largeFilesCheck,
79
+ todo_fixme_js_1.todoFixmeCheck,
80
+ missing_tests_js_1.missingTestsCheck,
81
+ coverage_js_1.coverageCheck,
82
+ migration_safety_js_1.migrationSafetyCheck,
83
+ sensitive_file_guard_js_1.sensitiveFileGuardCheck,
84
+ pr_body_js_1.prBodyCheck,
85
+ duplicate_check_js_1.duplicateCheck,
86
+ commitlint_js_1.commitlintCheck,
87
+ pr_size_check_js_1.prSizeCheck,
88
+ pr_title_lint_js_1.prTitleLintCheck,
89
+ outdated_deps_js_1.outdatedDepsCheck,
90
+ markdown_lint_js_1.markdownLintCheck,
91
+ spellcheck_js_1.spellcheckCheck,
92
+ yaml_lint_js_1.yamlLintCheck,
93
+ symlinks_js_1.symlinksCheck,
94
+ package_size_js_1.packageSizeCheck,
95
+ python_lint_js_1.pythonLintCheck,
96
+ python_typecheck_js_1.pythonTypecheckCheck,
97
+ dead_code_js_1.deadCodeCheck,
98
+ external_checks_js_1.swiftLintCheck,
99
+ external_checks_js_1.kotlinLintCheck,
100
+ external_checks_js_1.goLintCheck,
101
+ external_checks_js_1.rustLintCheck,
102
+ external_checks_js_1.rubyLintCheck,
103
+ external_checks_js_1.shellcheckCheck,
104
+ // format
105
+ prettier_js_1.prettierCheck,
106
+ cpp_format_js_1.cppFormatCheck,
107
+ python_format_js_1.pythonFormatCheck,
108
+ go_format_js_1.goFormatCheck,
109
+ external_checks_js_1.rustFormatCheck,
110
+ external_checks_js_1.csharpFormatCheck,
111
+ external_checks_js_1.phpFormatCheck,
112
+ ];
@@ -1,4 +1,4 @@
1
- import type { CheckReport, ReporterConfig, ReporterKind } from './types';
1
+ import type { CheckReport, ReporterConfig, ReporterKind } from './types.js';
2
2
  /** Whether the comment reached the PR, so the caller can act on a failure. */
3
3
  export interface PostOutcome {
4
4
  attempted: boolean;
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.buildMarkdownReport = buildMarkdownReport;
7
7
  exports.report = report;
8
8
  const node_fs_1 = __importDefault(require("node:fs"));
9
- const utils_1 = require("../utils");
10
- const http_1 = require("../utils/http");
11
- const package_version_1 = require("../utils/package-version");
9
+ const http_js_1 = require("../utils/http.js");
10
+ const index_js_1 = require("../utils/index.js");
11
+ const package_version_js_1 = require("../utils/package-version.js");
12
12
  const STATUS_ICON = {
13
13
  pass: '✅',
14
14
  warn: '⚠️',
@@ -75,7 +75,7 @@ function buildMarkdownReport(report, cfg = {}) {
75
75
  // Say so rather than letting the table quietly disagree with the counts above.
76
76
  ...(hidden > 0 ? ['', `_${hidden} row(s) hidden by \`reporter.include\`._`] : []),
77
77
  '',
78
- `_Generated by [PR CheckMate](https://www.npmjs.com/package/pr-checkmate) v${(0, package_version_1.packageVersion)()}_`,
78
+ `_Generated by [PR CheckMate](https://www.npmjs.com/package/pr-checkmate) v${(0, package_version_js_1.packageVersion)()}_`,
79
79
  ].join('\n');
80
80
  }
81
81
  /**
@@ -88,25 +88,25 @@ function buildMarkdownReport(report, cfg = {}) {
88
88
  */
89
89
  function printStdout(report, cfg) {
90
90
  const { passed, warned, failed, skipped } = report.summary;
91
- utils_1.logger.print('');
92
- utils_1.logger.print(SUMMARY_BORDER);
91
+ index_js_1.logger.print('');
92
+ index_js_1.logger.print(SUMMARY_BORDER);
93
93
  // The version belongs in the headline, not in a footnote. Which copy of
94
94
  // pr-checkmate produced a report is the first thing to establish when the
95
95
  // report disagrees with what someone expects, and it is not otherwise
96
96
  // recoverable from the log: a stale global install answers `pr-checkmate` on
97
97
  // `PATH` ahead of the project's own, and reads the same config while doing it.
98
- utils_1.logger.print(` PR CheckMate Summary · v${(0, package_version_1.packageVersion)()}`);
99
- utils_1.logger.print(SUMMARY_BORDER);
98
+ index_js_1.logger.print(` PR CheckMate Summary · v${(0, package_version_js_1.packageVersion)()}`);
99
+ index_js_1.logger.print(SUMMARY_BORDER);
100
100
  for (const r of report.results) {
101
101
  const details = r.details ? `: ${r.details}` : '';
102
- utils_1.logger.print(` ${STATUS_ICON[r.status]} ${r.name}${details}`);
102
+ index_js_1.logger.print(` ${STATUS_ICON[r.status]} ${r.name}${details}`);
103
103
  }
104
- utils_1.logger.print(SUMMARY_RULE);
105
- utils_1.logger.print(` ✅ ${passed} passed ⚠️ ${warned} warnings ❌ ${failed} failed ⏭️ ${skipped} skipped`);
106
- utils_1.logger.print(SUMMARY_BORDER);
104
+ index_js_1.logger.print(SUMMARY_RULE);
105
+ index_js_1.logger.print(` ✅ ${passed} passed ⚠️ ${warned} warnings ❌ ${failed} failed ⏭️ ${skipped} skipped`);
106
+ index_js_1.logger.print(SUMMARY_BORDER);
107
107
  if (cfg.include?.docsLink !== false) {
108
108
  // The docs cover every check and config key.
109
- utils_1.logger.print(' DOCUMENTATION: https://pr-checkmate-docs.pages.dev/');
109
+ index_js_1.logger.print(' DOCUMENTATION: https://pr-checkmate-docs.pages.dev/');
110
110
  }
111
111
  }
112
112
  /** Network settings shared by every platform call. */
@@ -121,10 +121,10 @@ function httpOptions(cfg, label) {
121
121
  /** Log and shape the result of a write. */
122
122
  function finish(platform, res, verb) {
123
123
  if (res.ok) {
124
- utils_1.logger.info(`[reporter]: ✅ ${verb} PR CheckMate summary on ${platform}`);
124
+ index_js_1.logger.info(`[reporter]: ✅ ${verb} PR CheckMate summary on ${platform}`);
125
125
  return { attempted: true, ok: true };
126
126
  }
127
- utils_1.logger.warn(`[reporter]: ⚠️ Could not ${verb.toLowerCase()} ${platform} comment: ${res.error}`);
127
+ index_js_1.logger.warn(`[reporter]: ⚠️ Could not ${verb.toLowerCase()} ${platform} comment: ${res.error}`);
128
128
  return { attempted: true, ok: false, error: res.error };
129
129
  }
130
130
  /** Page-number pagination: stop as soon as a page comes back short. */
@@ -134,7 +134,7 @@ function pageAfter(base, count, page) {
134
134
  async function upsertGithubComment(body, cfg) {
135
135
  const ctx = getPrContext();
136
136
  if (!ctx) {
137
- utils_1.logger.info('[reporter]: Skipping GitHub comment (not in PR context or GITHUB_TOKEN missing)');
137
+ index_js_1.logger.info('[reporter]: Skipping GitHub comment (not in PR context or GITHUB_TOKEN missing)');
138
138
  return SKIPPED;
139
139
  }
140
140
  const { token, owner, repo, prNumber } = ctx;
@@ -149,10 +149,10 @@ async function upsertGithubComment(body, cfg) {
149
149
  const opts = httpOptions(cfg, 'GitHub');
150
150
  const existing = await findExisting(listBase, { headers }, b => (Array.isArray(b) ? b : []), c => typeof c.body === 'string' && c.body.includes(COMMENT_MARKER), opts);
151
151
  if (existing.reuse && cfg.mode !== 'append') {
152
- const res = await (0, http_1.request)(`${apiBase}/issues/comments/${existing.reuse.id}`, { method: 'PATCH', headers, body: JSON.stringify({ body }) }, opts);
152
+ const res = await (0, http_js_1.request)(`${apiBase}/issues/comments/${existing.reuse.id}`, { method: 'PATCH', headers, body: JSON.stringify({ body }) }, opts);
153
153
  return finish('GitHub', res, 'Updated');
154
154
  }
155
- const res = await (0, http_1.request)(`${apiBase}/issues/${prNumber}/comments`, { method: 'POST', headers, body: JSON.stringify({ body }) }, opts);
155
+ const res = await (0, http_js_1.request)(`${apiBase}/issues/${prNumber}/comments`, { method: 'POST', headers, body: JSON.stringify({ body }) }, opts);
156
156
  return finish('GitHub', res, 'Posted');
157
157
  }
158
158
  /**
@@ -166,7 +166,7 @@ async function upsertGitlabNote(body, cfg) {
166
166
  const iid = process.env.CI_MERGE_REQUEST_IID;
167
167
  const token = process.env.GITLAB_TOKEN;
168
168
  if (!base || !project || !iid || !token) {
169
- utils_1.logger.info('[reporter]: Skipping GitLab note (not an MR pipeline or GITLAB_TOKEN missing)');
169
+ index_js_1.logger.info('[reporter]: Skipping GitLab note (not an MR pipeline or GITLAB_TOKEN missing)');
170
170
  return SKIPPED;
171
171
  }
172
172
  const notes = `${base}/projects/${project}/merge_requests/${iid}/notes`;
@@ -174,10 +174,10 @@ async function upsertGitlabNote(body, cfg) {
174
174
  const opts = httpOptions(cfg, 'GitLab');
175
175
  const existing = await findExisting(`${notes}?per_page=${PER_PAGE}`, { headers }, b => (Array.isArray(b) ? b : []), n => typeof n.body === 'string' && n.body.includes(COMMENT_MARKER), opts);
176
176
  if (existing.reuse && cfg.mode !== 'append') {
177
- const res = await (0, http_1.request)(`${notes}/${existing.reuse.id}`, { method: 'PUT', headers, body: JSON.stringify({ body }) }, opts);
177
+ const res = await (0, http_js_1.request)(`${notes}/${existing.reuse.id}`, { method: 'PUT', headers, body: JSON.stringify({ body }) }, opts);
178
178
  return finish('GitLab', res, 'Updated');
179
179
  }
180
- const res = await (0, http_1.request)(notes, { method: 'POST', headers, body: JSON.stringify({ body }) }, opts);
180
+ const res = await (0, http_js_1.request)(notes, { method: 'POST', headers, body: JSON.stringify({ body }) }, opts);
181
181
  return finish('GitLab', res, 'Posted');
182
182
  }
183
183
  /**
@@ -190,7 +190,7 @@ async function upsertBitbucketComment(body, cfg) {
190
190
  const prId = process.env.BITBUCKET_PR_ID;
191
191
  const token = process.env.BITBUCKET_TOKEN;
192
192
  if (!fullName || !prId || !token) {
193
- utils_1.logger.info('[reporter]: Skipping Bitbucket comment (not a PR pipeline or BITBUCKET_TOKEN missing)');
193
+ index_js_1.logger.info('[reporter]: Skipping Bitbucket comment (not a PR pipeline or BITBUCKET_TOKEN missing)');
194
194
  return SKIPPED;
195
195
  }
196
196
  const commentsUrl = `https://api.bitbucket.org/2.0/repositories/${fullName}/pullrequests/${prId}/comments`;
@@ -200,10 +200,10 @@ async function upsertBitbucketComment(body, cfg) {
200
200
  // Bitbucket is cursor-paginated: the next page is a URL in the body.
201
201
  b => b?.next ?? null);
202
202
  if (existing.reuse && cfg.mode !== 'append') {
203
- const res = await (0, http_1.request)(`${commentsUrl}/${existing.reuse.id}`, { method: 'PUT', headers, body: JSON.stringify({ content: { raw: body } }) }, opts);
203
+ const res = await (0, http_js_1.request)(`${commentsUrl}/${existing.reuse.id}`, { method: 'PUT', headers, body: JSON.stringify({ content: { raw: body } }) }, opts);
204
204
  return finish('Bitbucket', res, 'Updated');
205
205
  }
206
- const res = await (0, http_1.request)(commentsUrl, { method: 'POST', headers, body: JSON.stringify({ content: { raw: body } }) }, opts);
206
+ const res = await (0, http_js_1.request)(commentsUrl, { method: 'POST', headers, body: JSON.stringify({ content: { raw: body } }) }, opts);
207
207
  return finish('Bitbucket', res, 'Posted');
208
208
  }
209
209
  /**
@@ -215,14 +215,14 @@ async function upsertBitbucketComment(body, cfg) {
215
215
  */
216
216
  async function findExisting(listUrl, init, extract, matches, opts, cursorNext) {
217
217
  const base = listUrl;
218
- const result = await (0, http_1.paginate)(listUrl, init, extract, (body, page, count) => (cursorNext ? cursorNext(body) : pageAfter(base, count, page)), opts);
218
+ const result = await (0, http_js_1.paginate)(listUrl, init, extract, (body, page, count) => (cursorNext ? cursorNext(body) : pageAfter(base, count, page)), opts);
219
219
  if (!result.ok) {
220
220
  // A failed search is not a failed post: fall through and create a comment.
221
221
  // A duplicate is a far smaller problem than no report at all.
222
- utils_1.logger.warn(`[reporter]: ⚠️ Could not read existing comments (${result.error}) — will create`);
222
+ index_js_1.logger.warn(`[reporter]: ⚠️ Could not read existing comments (${result.error}) — will create`);
223
223
  }
224
224
  if (result.truncated) {
225
- utils_1.logger.warn('[reporter]: ⚠️ Stopped searching comments at the page limit — a duplicate summary is ' +
225
+ index_js_1.logger.warn('[reporter]: ⚠️ Stopped searching comments at the page limit — a duplicate summary is ' +
226
226
  'possible (raise reporter.maxPages)');
227
227
  }
228
228
  return { reuse: result.items.find(matches) ?? null };
@@ -263,7 +263,7 @@ async function report(kind, result, cfg = {}) {
263
263
  return SKIPPED;
264
264
  // Nothing to say and nothing wrong: don't notify every PR subscriber.
265
265
  if (cfg.skipWhenClean && result.summary.failed === 0 && result.summary.warned === 0) {
266
- utils_1.logger.info('[reporter]: Nothing to report (skipWhenClean)');
266
+ index_js_1.logger.info('[reporter]: Nothing to report (skipWhenClean)');
267
267
  return SKIPPED;
268
268
  }
269
269
  const platform = kind === 'auto' ? detectPlatform() : kind === 'stdout' ? null : kind;
@@ -1,5 +1,5 @@
1
- import type { RunScope } from './types';
2
- import { CheckContext, CheckReport, CheckStatus, RunOptions } from './types';
1
+ import type { RunScope } from './types.js';
2
+ import { CheckContext, CheckReport, CheckStatus, RunOptions } from './types.js';
3
3
  /**
4
4
  * Apply the universal `config.severity` override for a check. Only remaps
5
5
  * between warn↔fail (pass/skip are never changed); `off` is handled earlier by
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applySeverity = applySeverity;
4
4
  exports.shouldReportDiffSkip = shouldReportDiffSkip;
5
5
  exports.runChecks = runChecks;
6
- const utils_1 = require("../utils");
7
- const package_version_1 = require("../utils/package-version");
8
- const pool_1 = require("../utils/pool");
9
- const resolve_bin_1 = require("../utils/resolve-bin");
10
- const result_collector_1 = require("../utils/result-collector");
11
- const context_1 = require("./context");
12
- const prepare_1 = require("./install/prepare");
13
- const registry_1 = require("./registry");
14
- const reporters_1 = require("./reporters");
15
- const types_1 = require("./types");
6
+ const index_js_1 = require("../utils/index.js");
7
+ const package_version_js_1 = require("../utils/package-version.js");
8
+ const pool_js_1 = require("../utils/pool.js");
9
+ const resolve_bin_js_1 = require("../utils/resolve-bin.js");
10
+ const result_collector_js_1 = require("../utils/result-collector.js");
11
+ const context_js_1 = require("./context.js");
12
+ const prepare_js_1 = require("./install/prepare.js");
13
+ const registry_js_1 = require("./registry.js");
14
+ const reporters_js_1 = require("./reporters.js");
15
+ const types_js_1 = require("./types.js");
16
16
  /**
17
17
  * Resolve which checks to run: the built-in registry, custom `opts.checks`, or a mix.
18
18
  * - no custom checks → the built-in registry
@@ -25,9 +25,9 @@ function resolveChecks(opts) {
25
25
  if (opts.extendRegistry === false)
26
26
  return custom;
27
27
  if (custom.length === 0)
28
- return registry_1.REGISTRY;
28
+ return registry_js_1.REGISTRY;
29
29
  const byName = new Map();
30
- for (const c of registry_1.REGISTRY)
30
+ for (const c of registry_js_1.REGISTRY)
31
31
  byName.set(c.name, c);
32
32
  for (const c of custom)
33
33
  byName.set(c.name, c); // custom wins on name clash
@@ -45,7 +45,7 @@ async function emitReport(reporter, result, cfg) {
45
45
  await reporter(result);
46
46
  return { attempted: false, ok: true };
47
47
  }
48
- return (0, reporters_1.report)(reporter ?? 'stdout', result, cfg);
48
+ return (0, reporters_js_1.report)(reporter ?? 'stdout', result, cfg);
49
49
  }
50
50
  /** Apply only/skip filters to the resolved check set. */
51
51
  function selectChecks(checks, opts) {
@@ -168,19 +168,19 @@ async function runOne(check, ctx, collector, heavy, tooling) {
168
168
  // client who made this check advisory does not get a hard failure out of
169
169
  // `onMissingTool: "error"`, and one who promoted it does.
170
170
  const status = applySeverity(check.name, tooling.fatal ? 'fail' : 'skip', ctx);
171
- utils_1.logger.warn(`[runChecks]: ${status === 'fail' ? '❌' : '⏭️'} ${check.name}: ${missing}`);
171
+ index_js_1.logger.warn(`[runChecks]: ${status === 'fail' ? '❌' : '⏭️'} ${check.name}: ${missing}`);
172
172
  collector.register(check.name, status, `tooling unavailable — ${missing}`);
173
173
  return;
174
174
  }
175
175
  const started = Date.now();
176
176
  const timeoutMs = ctx.config.run?.checkTimeoutMs ?? 300000;
177
- const execute = () => (0, pool_1.withTimeout)(check.run(ctx), timeoutMs, () => {
178
- utils_1.logger.warn(`[runChecks]: ⏱️ ${check.name} exceeded ${timeoutMs}ms`);
177
+ const execute = () => (0, pool_js_1.withTimeout)(check.run(ctx), timeoutMs, () => {
178
+ index_js_1.logger.warn(`[runChecks]: ⏱️ ${check.name} exceeded ${timeoutMs}ms`);
179
179
  return { status: 'warn', details: `timed out after ${timeoutMs}ms` };
180
180
  });
181
181
  const outcome = check.weight === 'heavy' ? await heavy.run(execute) : await execute();
182
182
  if (ctx.config.run?.timings) {
183
- utils_1.logger.info(`[runChecks]: ${check.name} took ${Date.now() - started}ms`);
183
+ index_js_1.logger.info(`[runChecks]: ${check.name} took ${Date.now() - started}ms`);
184
184
  }
185
185
  collector.register(check.name, applySeverity(check.name, outcome.status, ctx), outcome.details);
186
186
  }
@@ -189,7 +189,7 @@ async function runOne(check, ctx, collector, heavy, tooling) {
189
189
  // phases it only warns — those phases never block, matching the legacy pipeline.
190
190
  const base = check.phase === 'blocking' ? 'fail' : 'warn';
191
191
  const status = applySeverity(check.name, base, ctx);
192
- utils_1.logger.error(`[runChecks]: ${status === 'fail' ? '❌' : '⚠️'} ${check.name} threw: ${err}`);
192
+ index_js_1.logger.error(`[runChecks]: ${status === 'fail' ? '❌' : '⚠️'} ${check.name} threw: ${err}`);
193
193
  collector.register(check.name, status, errMessage(err));
194
194
  }
195
195
  }
@@ -201,12 +201,12 @@ async function runOne(check, ctx, collector, heavy, tooling) {
201
201
  * within a phase run in parallel.
202
202
  */
203
203
  async function runChecks(opts = {}) {
204
- const ctx = await (0, context_1.buildContext)(opts);
204
+ const ctx = await (0, context_js_1.buildContext)(opts);
205
205
  // `severity: { "<name>": "off" }` disables any check by name, universally —
206
206
  // a superset of the per-check `enabled: false` flags.
207
207
  const off = ctx.config.severity ?? {};
208
208
  const selected = selectChecks(resolveChecks(opts), opts).filter(c => off[c.name] !== 'off');
209
- const collector = new result_collector_1.ResultCollector();
209
+ const collector = new result_collector_js_1.ResultCollector();
210
210
  // Config Validation verifies that `severity` keys name real checks. It reads
211
211
  // the list from here rather than importing the registry, which would make
212
212
  // registry → check → registry a cycle.
@@ -215,12 +215,12 @@ async function runChecks(opts = {}) {
215
215
  // learn which ones are not. Doing this per-check would fetch the same profile
216
216
  // from several checks at once and leave each of them guessing on failure.
217
217
  const tooling = await prepareToolingFor(ctx, selected);
218
- const limit = (0, pool_1.resolveConcurrency)(ctx.config.run?.concurrency);
218
+ const limit = (0, pool_js_1.resolveConcurrency)(ctx.config.run?.concurrency);
219
219
  const heavyLimit = Math.max(1, ctx.config.run?.heavyConcurrency ?? 1);
220
- const heavy = new pool_1.Semaphore(heavyLimit);
221
- for (const phase of types_1.PHASES) {
220
+ const heavy = new pool_js_1.Semaphore(heavyLimit);
221
+ for (const phase of types_js_1.PHASES) {
222
222
  const inPhase = selected.filter(c => c.phase === phase);
223
- await (0, pool_1.runPool)(inPhase.map(c => () => runOne(c, ctx, collector, heavy, tooling)), limit);
223
+ await (0, pool_js_1.runPool)(inPhase.map(c => () => runOne(c, ctx, collector, heavy, tooling)), limit);
224
224
  }
225
225
  reportDegradedScope(ctx, collector);
226
226
  const build = () => {
@@ -254,7 +254,7 @@ async function runChecks(opts = {}) {
254
254
  */
255
255
  async function prepareToolingFor(ctx, selected) {
256
256
  try {
257
- return await (0, prepare_1.prepareTooling)({
257
+ return await (0, prepare_js_1.prepareTooling)({
258
258
  cwd: ctx.cwd,
259
259
  config: ctx.config,
260
260
  // A hand-built context (the SDK, a test) carries no counts. Treating its
@@ -262,15 +262,15 @@ async function prepareToolingFor(ctx, selected) {
262
262
  // that names a language is asserting it, not guessing.
263
263
  usage: ctx.usage ?? ctx.languages.map(lang => ({ lang, files: 1, marker: true })),
264
264
  selected: selected.map(c => c.name),
265
- version: (0, package_version_1.packageVersion)(),
265
+ version: (0, package_version_js_1.packageVersion)(),
266
266
  });
267
267
  }
268
268
  catch (err) {
269
- utils_1.logger.warn(`[install]: ⚠️ could not prepare tooling: ${errMessage(err)}`);
269
+ index_js_1.logger.warn(`[install]: ⚠️ could not prepare tooling: ${errMessage(err)}`);
270
270
  // Preparation may have registered roots before it threw. Leaving them behind
271
271
  // would point resolution at a half-installed directory for the whole run.
272
- (0, resolve_bin_1.clearToolPaths)();
273
- return (0, prepare_1.noTooling)();
272
+ (0, resolve_bin_js_1.clearToolPaths)();
273
+ return (0, prepare_js_1.noTooling)();
274
274
  }
275
275
  }
276
276
  /**
@@ -287,12 +287,12 @@ async function prepareToolingFor(ctx, selected) {
287
287
  */
288
288
  function reportDegradedScope(ctx, collector) {
289
289
  const mode = ctx.config.run?.onDegradedScope ?? 'warn';
290
- if (mode === 'off' || !ctx.scope?.degraded || !(0, utils_1.isCiEnvironment)())
290
+ if (mode === 'off' || !ctx.scope?.degraded || !(0, index_js_1.isCiEnvironment)())
291
291
  return;
292
292
  const dropped = collector
293
293
  .getResults()
294
294
  .filter(r => r.status === 'skip' && isDiffSkip(r.details)).length;
295
295
  const detail = `${ctx.scope.reason}; ${dropped} diff-only check(s) did not run — set fetch-depth: 0`;
296
- utils_1.logger.error(`[runChecks]: ${mode === 'error' ? '❌' : '⚠️'} Degraded scope: ${detail}`);
296
+ index_js_1.logger.error(`[runChecks]: ${mode === 'error' ? '❌' : '⚠️'} Degraded scope: ${detail}`);
297
297
  collector.register('Scan Scope', mode === 'error' ? 'fail' : 'warn', detail);
298
298
  }
@@ -1,4 +1,4 @@
1
- import { type CheckContext, type CheckOutcome } from './types';
1
+ import { type CheckContext, type CheckOutcome } from './types.js';
2
2
  /**
3
3
  * Drop files that live under any excluded directory (client `ignoreDirs` or the
4
4
  * curated default), matched on any path segment so nesting depth doesn't matter.