@opensip-cli/fitness 0.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 (576) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +31 -0
  4. package/dist/__tests__/baseline-plane.test.d.ts +12 -0
  5. package/dist/__tests__/baseline-plane.test.d.ts.map +1 -0
  6. package/dist/__tests__/baseline-plane.test.js +63 -0
  7. package/dist/__tests__/baseline-plane.test.js.map +1 -0
  8. package/dist/__tests__/check-utils.test.d.ts +10 -0
  9. package/dist/__tests__/check-utils.test.d.ts.map +1 -0
  10. package/dist/__tests__/check-utils.test.js +193 -0
  11. package/dist/__tests__/check-utils.test.js.map +1 -0
  12. package/dist/__tests__/fingerprint-parity.test.d.ts +14 -0
  13. package/dist/__tests__/fingerprint-parity.test.d.ts.map +1 -0
  14. package/dist/__tests__/fingerprint-parity.test.js +59 -0
  15. package/dist/__tests__/fingerprint-parity.test.js.map +1 -0
  16. package/dist/__tests__/fit-execute-opts.test.d.ts +15 -0
  17. package/dist/__tests__/fit-execute-opts.test.d.ts.map +1 -0
  18. package/dist/__tests__/fit-execute-opts.test.js +124 -0
  19. package/dist/__tests__/fit-execute-opts.test.js.map +1 -0
  20. package/dist/__tests__/public-api.test.d.ts +19 -0
  21. package/dist/__tests__/public-api.test.d.ts.map +1 -0
  22. package/dist/__tests__/public-api.test.js +85 -0
  23. package/dist/__tests__/public-api.test.js.map +1 -0
  24. package/dist/__tests__/tool.test.d.ts +10 -0
  25. package/dist/__tests__/tool.test.d.ts.map +1 -0
  26. package/dist/__tests__/tool.test.js +57 -0
  27. package/dist/__tests__/tool.test.js.map +1 -0
  28. package/dist/baseline-strategy.d.ts +21 -0
  29. package/dist/baseline-strategy.d.ts.map +1 -0
  30. package/dist/baseline-strategy.js +21 -0
  31. package/dist/baseline-strategy.js.map +1 -0
  32. package/dist/check-utils/display.d.ts +52 -0
  33. package/dist/check-utils/display.d.ts.map +1 -0
  34. package/dist/check-utils/display.js +66 -0
  35. package/dist/check-utils/display.js.map +1 -0
  36. package/dist/check-utils/index.d.ts +17 -0
  37. package/dist/check-utils/index.d.ts.map +1 -0
  38. package/dist/check-utils/index.js +13 -0
  39. package/dist/check-utils/index.js.map +1 -0
  40. package/dist/check-utils/path-matching.d.ts +40 -0
  41. package/dist/check-utils/path-matching.d.ts.map +1 -0
  42. package/dist/check-utils/path-matching.js +38 -0
  43. package/dist/check-utils/path-matching.js.map +1 -0
  44. package/dist/check-utils/source-analysis.d.ts +36 -0
  45. package/dist/check-utils/source-analysis.d.ts.map +1 -0
  46. package/dist/check-utils/source-analysis.js +44 -0
  47. package/dist/check-utils/source-analysis.js.map +1 -0
  48. package/dist/check-utils/test-helpers.d.ts +57 -0
  49. package/dist/check-utils/test-helpers.d.ts.map +1 -0
  50. package/dist/check-utils/test-helpers.js +71 -0
  51. package/dist/check-utils/test-helpers.js.map +1 -0
  52. package/dist/cli/__tests__/fit-gate-mode.test.d.ts +14 -0
  53. package/dist/cli/__tests__/fit-gate-mode.test.d.ts.map +1 -0
  54. package/dist/cli/__tests__/fit-gate-mode.test.js +110 -0
  55. package/dist/cli/__tests__/fit-gate-mode.test.js.map +1 -0
  56. package/dist/cli/__tests__/fit-modes-live.test.d.ts +13 -0
  57. package/dist/cli/__tests__/fit-modes-live.test.d.ts.map +1 -0
  58. package/dist/cli/__tests__/fit-modes-live.test.js +182 -0
  59. package/dist/cli/__tests__/fit-modes-live.test.js.map +1 -0
  60. package/dist/cli/__tests__/report-data.test.d.ts +12 -0
  61. package/dist/cli/__tests__/report-data.test.d.ts.map +1 -0
  62. package/dist/cli/__tests__/report-data.test.js +113 -0
  63. package/dist/cli/__tests__/report-data.test.js.map +1 -0
  64. package/dist/cli/fit/__tests__/display-fold.test.d.ts +8 -0
  65. package/dist/cli/fit/__tests__/display-fold.test.d.ts.map +1 -0
  66. package/dist/cli/fit/__tests__/display-fold.test.js +87 -0
  67. package/dist/cli/fit/__tests__/display-fold.test.js.map +1 -0
  68. package/dist/cli/fit/__tests__/gate-resolved-config.test.d.ts +16 -0
  69. package/dist/cli/fit/__tests__/gate-resolved-config.test.d.ts.map +1 -0
  70. package/dist/cli/fit/__tests__/gate-resolved-config.test.js +62 -0
  71. package/dist/cli/fit/__tests__/gate-resolved-config.test.js.map +1 -0
  72. package/dist/cli/fit/check-loader.d.ts +37 -0
  73. package/dist/cli/fit/check-loader.d.ts.map +1 -0
  74. package/dist/cli/fit/check-loader.js +154 -0
  75. package/dist/cli/fit/check-loader.js.map +1 -0
  76. package/dist/cli/fit/config-loader.d.ts +55 -0
  77. package/dist/cli/fit/config-loader.d.ts.map +1 -0
  78. package/dist/cli/fit/config-loader.js +107 -0
  79. package/dist/cli/fit/config-loader.js.map +1 -0
  80. package/dist/cli/fit/display-registry.d.ts +19 -0
  81. package/dist/cli/fit/display-registry.d.ts.map +1 -0
  82. package/dist/cli/fit/display-registry.js +33 -0
  83. package/dist/cli/fit/display-registry.js.map +1 -0
  84. package/dist/cli/fit/envelope-view.d.ts +49 -0
  85. package/dist/cli/fit/envelope-view.d.ts.map +1 -0
  86. package/dist/cli/fit/envelope-view.js +85 -0
  87. package/dist/cli/fit/envelope-view.js.map +1 -0
  88. package/dist/cli/fit/fit-aux-command-specs.d.ts +35 -0
  89. package/dist/cli/fit/fit-aux-command-specs.d.ts.map +1 -0
  90. package/dist/cli/fit/fit-aux-command-specs.js +110 -0
  91. package/dist/cli/fit/fit-aux-command-specs.js.map +1 -0
  92. package/dist/cli/fit/fit-command-spec.d.ts +24 -0
  93. package/dist/cli/fit/fit-command-spec.d.ts.map +1 -0
  94. package/dist/cli/fit/fit-command-spec.js +131 -0
  95. package/dist/cli/fit/fit-command-spec.js.map +1 -0
  96. package/dist/cli/fit/gate-compare-render.d.ts +13 -0
  97. package/dist/cli/fit/gate-compare-render.d.ts.map +1 -0
  98. package/dist/cli/fit/gate-compare-render.js +87 -0
  99. package/dist/cli/fit/gate-compare-render.js.map +1 -0
  100. package/dist/cli/fit/recipe-selector.d.ts +53 -0
  101. package/dist/cli/fit/recipe-selector.d.ts.map +1 -0
  102. package/dist/cli/fit/recipe-selector.js +106 -0
  103. package/dist/cli/fit/recipe-selector.js.map +1 -0
  104. package/dist/cli/fit/recipe-selector.test.d.ts +2 -0
  105. package/dist/cli/fit/recipe-selector.test.d.ts.map +1 -0
  106. package/dist/cli/fit/recipe-selector.test.js +69 -0
  107. package/dist/cli/fit/recipe-selector.test.js.map +1 -0
  108. package/dist/cli/fit/resolved-fitness-config.d.ts +48 -0
  109. package/dist/cli/fit/resolved-fitness-config.d.ts.map +1 -0
  110. package/dist/cli/fit/resolved-fitness-config.js +46 -0
  111. package/dist/cli/fit/resolved-fitness-config.js.map +1 -0
  112. package/dist/cli/fit/result-builders.d.ts +91 -0
  113. package/dist/cli/fit/result-builders.d.ts.map +1 -0
  114. package/dist/cli/fit/result-builders.js +206 -0
  115. package/dist/cli/fit/result-builders.js.map +1 -0
  116. package/dist/cli/fit-list.d.ts +7 -0
  117. package/dist/cli/fit-list.d.ts.map +1 -0
  118. package/dist/cli/fit-list.js +24 -0
  119. package/dist/cli/fit-list.js.map +1 -0
  120. package/dist/cli/fit-modes.d.ts +42 -0
  121. package/dist/cli/fit-modes.d.ts.map +1 -0
  122. package/dist/cli/fit-modes.js +322 -0
  123. package/dist/cli/fit-modes.js.map +1 -0
  124. package/dist/cli/fit-recipes.d.ts +7 -0
  125. package/dist/cli/fit-recipes.d.ts.map +1 -0
  126. package/dist/cli/fit-recipes.js +34 -0
  127. package/dist/cli/fit-recipes.js.map +1 -0
  128. package/dist/cli/fit-runner-views.d.ts +33 -0
  129. package/dist/cli/fit-runner-views.d.ts.map +1 -0
  130. package/dist/cli/fit-runner-views.js +92 -0
  131. package/dist/cli/fit-runner-views.js.map +1 -0
  132. package/dist/cli/fit-runner.d.ts +44 -0
  133. package/dist/cli/fit-runner.d.ts.map +1 -0
  134. package/dist/cli/fit-runner.js +250 -0
  135. package/dist/cli/fit-runner.js.map +1 -0
  136. package/dist/cli/fit-worker.d.ts +26 -0
  137. package/dist/cli/fit-worker.d.ts.map +1 -0
  138. package/dist/cli/fit-worker.js +67 -0
  139. package/dist/cli/fit-worker.js.map +1 -0
  140. package/dist/cli/fit.d.ts +74 -0
  141. package/dist/cli/fit.d.ts.map +1 -0
  142. package/dist/cli/fit.js +149 -0
  143. package/dist/cli/fit.js.map +1 -0
  144. package/dist/cli/report-data.d.ts +44 -0
  145. package/dist/cli/report-data.d.ts.map +1 -0
  146. package/dist/cli/report-data.js +89 -0
  147. package/dist/cli/report-data.js.map +1 -0
  148. package/dist/config/__tests__/fitness-config-schema.test.d.ts +6 -0
  149. package/dist/config/__tests__/fitness-config-schema.test.d.ts.map +1 -0
  150. package/dist/config/__tests__/fitness-config-schema.test.js +37 -0
  151. package/dist/config/__tests__/fitness-config-schema.test.js.map +1 -0
  152. package/dist/config/fitness-config-schema.d.ts +48 -0
  153. package/dist/config/fitness-config-schema.d.ts.map +1 -0
  154. package/dist/config/fitness-config-schema.js +62 -0
  155. package/dist/config/fitness-config-schema.js.map +1 -0
  156. package/dist/framework/__tests__/abortable-exec.test.d.ts +9 -0
  157. package/dist/framework/__tests__/abortable-exec.test.d.ts.map +1 -0
  158. package/dist/framework/__tests__/abortable-exec.test.js +102 -0
  159. package/dist/framework/__tests__/abortable-exec.test.js.map +1 -0
  160. package/dist/framework/__tests__/check-config.test.d.ts +2 -0
  161. package/dist/framework/__tests__/check-config.test.d.ts.map +1 -0
  162. package/dist/framework/__tests__/check-config.test.js +56 -0
  163. package/dist/framework/__tests__/check-config.test.js.map +1 -0
  164. package/dist/framework/__tests__/check-types.test.d.ts +2 -0
  165. package/dist/framework/__tests__/check-types.test.d.ts.map +1 -0
  166. package/dist/framework/__tests__/check-types.test.js +76 -0
  167. package/dist/framework/__tests__/check-types.test.js.map +1 -0
  168. package/dist/framework/__tests__/command-executor.test.d.ts +2 -0
  169. package/dist/framework/__tests__/command-executor.test.d.ts.map +1 -0
  170. package/dist/framework/__tests__/command-executor.test.js +110 -0
  171. package/dist/framework/__tests__/command-executor.test.js.map +1 -0
  172. package/dist/framework/__tests__/content-filter-dispatch.test.d.ts +2 -0
  173. package/dist/framework/__tests__/content-filter-dispatch.test.d.ts.map +1 -0
  174. package/dist/framework/__tests__/content-filter-dispatch.test.js +122 -0
  175. package/dist/framework/__tests__/content-filter-dispatch.test.js.map +1 -0
  176. package/dist/framework/__tests__/define-check.test.d.ts +2 -0
  177. package/dist/framework/__tests__/define-check.test.d.ts.map +1 -0
  178. package/dist/framework/__tests__/define-check.test.js +402 -0
  179. package/dist/framework/__tests__/define-check.test.js.map +1 -0
  180. package/dist/framework/__tests__/define-regex-list-check.test.d.ts +15 -0
  181. package/dist/framework/__tests__/define-regex-list-check.test.d.ts.map +1 -0
  182. package/dist/framework/__tests__/define-regex-list-check.test.js +299 -0
  183. package/dist/framework/__tests__/define-regex-list-check.test.js.map +1 -0
  184. package/dist/framework/__tests__/directive-inventory.test.d.ts +2 -0
  185. package/dist/framework/__tests__/directive-inventory.test.d.ts.map +1 -0
  186. package/dist/framework/__tests__/directive-inventory.test.js +111 -0
  187. package/dist/framework/__tests__/directive-inventory.test.js.map +1 -0
  188. package/dist/framework/__tests__/directive-parsing.test.d.ts +13 -0
  189. package/dist/framework/__tests__/directive-parsing.test.d.ts.map +1 -0
  190. package/dist/framework/__tests__/directive-parsing.test.js +86 -0
  191. package/dist/framework/__tests__/directive-parsing.test.js.map +1 -0
  192. package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.d.ts +2 -0
  193. package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.d.ts.map +1 -0
  194. package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js +56 -0
  195. package/dist/framework/__tests__/execution-context.globalexcludes-parity.test.js.map +1 -0
  196. package/dist/framework/__tests__/execution-context.test.d.ts +2 -0
  197. package/dist/framework/__tests__/execution-context.test.d.ts.map +1 -0
  198. package/dist/framework/__tests__/execution-context.test.js +140 -0
  199. package/dist/framework/__tests__/execution-context.test.js.map +1 -0
  200. package/dist/framework/__tests__/file-accessor.test.d.ts +2 -0
  201. package/dist/framework/__tests__/file-accessor.test.d.ts.map +1 -0
  202. package/dist/framework/__tests__/file-accessor.test.js +106 -0
  203. package/dist/framework/__tests__/file-accessor.test.js.map +1 -0
  204. package/dist/framework/__tests__/file-cache.test.d.ts +2 -0
  205. package/dist/framework/__tests__/file-cache.test.d.ts.map +1 -0
  206. package/dist/framework/__tests__/file-cache.test.js +122 -0
  207. package/dist/framework/__tests__/file-cache.test.js.map +1 -0
  208. package/dist/framework/__tests__/file-type-filter.test.d.ts +9 -0
  209. package/dist/framework/__tests__/file-type-filter.test.d.ts.map +1 -0
  210. package/dist/framework/__tests__/file-type-filter.test.js +39 -0
  211. package/dist/framework/__tests__/file-type-filter.test.js.map +1 -0
  212. package/dist/framework/__tests__/ignore-processing.test.d.ts +11 -0
  213. package/dist/framework/__tests__/ignore-processing.test.d.ts.map +1 -0
  214. package/dist/framework/__tests__/ignore-processing.test.js +175 -0
  215. package/dist/framework/__tests__/ignore-processing.test.js.map +1 -0
  216. package/dist/framework/__tests__/import-graph.test.d.ts +15 -0
  217. package/dist/framework/__tests__/import-graph.test.d.ts.map +1 -0
  218. package/dist/framework/__tests__/import-graph.test.js +164 -0
  219. package/dist/framework/__tests__/import-graph.test.js.map +1 -0
  220. package/dist/framework/__tests__/memory-profiler.test.d.ts +9 -0
  221. package/dist/framework/__tests__/memory-profiler.test.d.ts.map +1 -0
  222. package/dist/framework/__tests__/memory-profiler.test.js +108 -0
  223. package/dist/framework/__tests__/memory-profiler.test.js.map +1 -0
  224. package/dist/framework/__tests__/parse-cache.test.d.ts +9 -0
  225. package/dist/framework/__tests__/parse-cache.test.d.ts.map +1 -0
  226. package/dist/framework/__tests__/parse-cache.test.js +51 -0
  227. package/dist/framework/__tests__/parse-cache.test.js.map +1 -0
  228. package/dist/framework/__tests__/path-matcher.test.d.ts +2 -0
  229. package/dist/framework/__tests__/path-matcher.test.d.ts.map +1 -0
  230. package/dist/framework/__tests__/path-matcher.test.js +113 -0
  231. package/dist/framework/__tests__/path-matcher.test.js.map +1 -0
  232. package/dist/framework/__tests__/register-helpers.test.d.ts +2 -0
  233. package/dist/framework/__tests__/register-helpers.test.d.ts.map +1 -0
  234. package/dist/framework/__tests__/register-helpers.test.js +51 -0
  235. package/dist/framework/__tests__/register-helpers.test.js.map +1 -0
  236. package/dist/framework/__tests__/registry.test.d.ts +2 -0
  237. package/dist/framework/__tests__/registry.test.d.ts.map +1 -0
  238. package/dist/framework/__tests__/registry.test.js +211 -0
  239. package/dist/framework/__tests__/registry.test.js.map +1 -0
  240. package/dist/framework/__tests__/result-builder.test.d.ts +2 -0
  241. package/dist/framework/__tests__/result-builder.test.d.ts.map +1 -0
  242. package/dist/framework/__tests__/result-builder.test.js +153 -0
  243. package/dist/framework/__tests__/result-builder.test.js.map +1 -0
  244. package/dist/framework/__tests__/scope-registry.test.d.ts +8 -0
  245. package/dist/framework/__tests__/scope-registry.test.d.ts.map +1 -0
  246. package/dist/framework/__tests__/scope-registry.test.js +156 -0
  247. package/dist/framework/__tests__/scope-registry.test.js.map +1 -0
  248. package/dist/framework/__tests__/scope-resolver.golden.test.d.ts +2 -0
  249. package/dist/framework/__tests__/scope-resolver.golden.test.d.ts.map +1 -0
  250. package/dist/framework/__tests__/scope-resolver.golden.test.js +105 -0
  251. package/dist/framework/__tests__/scope-resolver.golden.test.js.map +1 -0
  252. package/dist/framework/__tests__/scope-resolver.test.d.ts +2 -0
  253. package/dist/framework/__tests__/scope-resolver.test.d.ts.map +1 -0
  254. package/dist/framework/__tests__/scope-resolver.test.js +150 -0
  255. package/dist/framework/__tests__/scope-resolver.test.js.map +1 -0
  256. package/dist/framework/__tests__/severity-mapping.test.d.ts +2 -0
  257. package/dist/framework/__tests__/severity-mapping.test.d.ts.map +1 -0
  258. package/dist/framework/__tests__/severity-mapping.test.js +74 -0
  259. package/dist/framework/__tests__/severity-mapping.test.js.map +1 -0
  260. package/dist/framework/__tests__/strip-literals.test.d.ts +2 -0
  261. package/dist/framework/__tests__/strip-literals.test.d.ts.map +1 -0
  262. package/dist/framework/__tests__/strip-literals.test.js +87 -0
  263. package/dist/framework/__tests__/strip-literals.test.js.map +1 -0
  264. package/dist/framework/abortable-exec.d.ts +34 -0
  265. package/dist/framework/abortable-exec.d.ts.map +1 -0
  266. package/dist/framework/abortable-exec.js +143 -0
  267. package/dist/framework/abortable-exec.js.map +1 -0
  268. package/dist/framework/check-config.d.ts +175 -0
  269. package/dist/framework/check-config.d.ts.map +1 -0
  270. package/dist/framework/check-config.js +115 -0
  271. package/dist/framework/check-config.js.map +1 -0
  272. package/dist/framework/check-types.d.ts +82 -0
  273. package/dist/framework/check-types.d.ts.map +1 -0
  274. package/dist/framework/check-types.js +63 -0
  275. package/dist/framework/check-types.js.map +1 -0
  276. package/dist/framework/command-executor.d.ts +25 -0
  277. package/dist/framework/command-executor.d.ts.map +1 -0
  278. package/dist/framework/command-executor.js +63 -0
  279. package/dist/framework/command-executor.js.map +1 -0
  280. package/dist/framework/comment-openers.d.ts +11 -0
  281. package/dist/framework/comment-openers.d.ts.map +1 -0
  282. package/dist/framework/comment-openers.js +11 -0
  283. package/dist/framework/comment-openers.js.map +1 -0
  284. package/dist/framework/constants.d.ts +9 -0
  285. package/dist/framework/constants.d.ts.map +1 -0
  286. package/dist/framework/constants.js +16 -0
  287. package/dist/framework/constants.js.map +1 -0
  288. package/dist/framework/define-check.d.ts +38 -0
  289. package/dist/framework/define-check.d.ts.map +1 -0
  290. package/dist/framework/define-check.js +296 -0
  291. package/dist/framework/define-check.js.map +1 -0
  292. package/dist/framework/define-regex-list-check.d.ts +160 -0
  293. package/dist/framework/define-regex-list-check.d.ts.map +1 -0
  294. package/dist/framework/define-regex-list-check.js +177 -0
  295. package/dist/framework/define-regex-list-check.js.map +1 -0
  296. package/dist/framework/directive-inventory.d.ts +37 -0
  297. package/dist/framework/directive-inventory.d.ts.map +1 -0
  298. package/dist/framework/directive-inventory.js +82 -0
  299. package/dist/framework/directive-inventory.js.map +1 -0
  300. package/dist/framework/directive-parsing.d.ts +23 -0
  301. package/dist/framework/directive-parsing.d.ts.map +1 -0
  302. package/dist/framework/directive-parsing.js +39 -0
  303. package/dist/framework/directive-parsing.js.map +1 -0
  304. package/dist/framework/execution-context.d.ts +98 -0
  305. package/dist/framework/execution-context.d.ts.map +1 -0
  306. package/dist/framework/execution-context.js +145 -0
  307. package/dist/framework/execution-context.js.map +1 -0
  308. package/dist/framework/file-accessor.d.ts +20 -0
  309. package/dist/framework/file-accessor.d.ts.map +1 -0
  310. package/dist/framework/file-accessor.js +122 -0
  311. package/dist/framework/file-accessor.js.map +1 -0
  312. package/dist/framework/file-cache.d.ts +70 -0
  313. package/dist/framework/file-cache.d.ts.map +1 -0
  314. package/dist/framework/file-cache.js +199 -0
  315. package/dist/framework/file-cache.js.map +1 -0
  316. package/dist/framework/file-type-filter.d.ts +11 -0
  317. package/dist/framework/file-type-filter.d.ts.map +1 -0
  318. package/dist/framework/file-type-filter.js +21 -0
  319. package/dist/framework/file-type-filter.js.map +1 -0
  320. package/dist/framework/ignore-processing.d.ts +36 -0
  321. package/dist/framework/ignore-processing.d.ts.map +1 -0
  322. package/dist/framework/ignore-processing.js +172 -0
  323. package/dist/framework/ignore-processing.js.map +1 -0
  324. package/dist/framework/import-graph.d.ts +51 -0
  325. package/dist/framework/import-graph.d.ts.map +1 -0
  326. package/dist/framework/import-graph.js +217 -0
  327. package/dist/framework/import-graph.js.map +1 -0
  328. package/dist/framework/memory-profiler.d.ts +53 -0
  329. package/dist/framework/memory-profiler.d.ts.map +1 -0
  330. package/dist/framework/memory-profiler.js +92 -0
  331. package/dist/framework/memory-profiler.js.map +1 -0
  332. package/dist/framework/parse-cache.d.ts +24 -0
  333. package/dist/framework/parse-cache.d.ts.map +1 -0
  334. package/dist/framework/parse-cache.js +41 -0
  335. package/dist/framework/parse-cache.js.map +1 -0
  336. package/dist/framework/path-matcher.d.ts +86 -0
  337. package/dist/framework/path-matcher.d.ts.map +1 -0
  338. package/dist/framework/path-matcher.js +138 -0
  339. package/dist/framework/path-matcher.js.map +1 -0
  340. package/dist/framework/register-helpers.d.ts +11 -0
  341. package/dist/framework/register-helpers.d.ts.map +1 -0
  342. package/dist/framework/register-helpers.js +19 -0
  343. package/dist/framework/register-helpers.js.map +1 -0
  344. package/dist/framework/registry.d.ts +51 -0
  345. package/dist/framework/registry.d.ts.map +1 -0
  346. package/dist/framework/registry.js +131 -0
  347. package/dist/framework/registry.js.map +1 -0
  348. package/dist/framework/result-builder.d.ts +74 -0
  349. package/dist/framework/result-builder.d.ts.map +1 -0
  350. package/dist/framework/result-builder.js +154 -0
  351. package/dist/framework/result-builder.js.map +1 -0
  352. package/dist/framework/scope-registry.d.ts +38 -0
  353. package/dist/framework/scope-registry.d.ts.map +1 -0
  354. package/dist/framework/scope-registry.js +77 -0
  355. package/dist/framework/scope-registry.js.map +1 -0
  356. package/dist/framework/scope-resolver.d.ts +23 -0
  357. package/dist/framework/scope-resolver.d.ts.map +1 -0
  358. package/dist/framework/scope-resolver.js +102 -0
  359. package/dist/framework/scope-resolver.js.map +1 -0
  360. package/dist/framework/severity-mapping.d.ts +17 -0
  361. package/dist/framework/severity-mapping.d.ts.map +1 -0
  362. package/dist/framework/severity-mapping.js +71 -0
  363. package/dist/framework/severity-mapping.js.map +1 -0
  364. package/dist/framework/strip-literals.d.ts +73 -0
  365. package/dist/framework/strip-literals.d.ts.map +1 -0
  366. package/dist/framework/strip-literals.js +213 -0
  367. package/dist/framework/strip-literals.js.map +1 -0
  368. package/dist/index.d.ts +47 -0
  369. package/dist/index.d.ts.map +1 -0
  370. package/dist/index.js +64 -0
  371. package/dist/index.js.map +1 -0
  372. package/dist/internal.d.ts +17 -0
  373. package/dist/internal.d.ts.map +1 -0
  374. package/dist/internal.js +17 -0
  375. package/dist/internal.js.map +1 -0
  376. package/dist/persistence/session-payload.d.ts +68 -0
  377. package/dist/persistence/session-payload.d.ts.map +1 -0
  378. package/dist/persistence/session-payload.js +78 -0
  379. package/dist/persistence/session-payload.js.map +1 -0
  380. package/dist/persistence/session-payload.test.d.ts +11 -0
  381. package/dist/persistence/session-payload.test.d.ts.map +1 -0
  382. package/dist/persistence/session-payload.test.js +80 -0
  383. package/dist/persistence/session-payload.test.js.map +1 -0
  384. package/dist/persistence/session-replay.d.ts +14 -0
  385. package/dist/persistence/session-replay.d.ts.map +1 -0
  386. package/dist/persistence/session-replay.js +85 -0
  387. package/dist/persistence/session-replay.js.map +1 -0
  388. package/dist/persistence/session-replay.test.d.ts +10 -0
  389. package/dist/persistence/session-replay.test.d.ts.map +1 -0
  390. package/dist/persistence/session-replay.test.js +171 -0
  391. package/dist/persistence/session-replay.test.js.map +1 -0
  392. package/dist/plugins/__tests__/check-package-discovery.test.d.ts +2 -0
  393. package/dist/plugins/__tests__/check-package-discovery.test.d.ts.map +1 -0
  394. package/dist/plugins/__tests__/check-package-discovery.test.js +48 -0
  395. package/dist/plugins/__tests__/check-package-discovery.test.js.map +1 -0
  396. package/dist/plugins/__tests__/lang-domain.test.d.ts +2 -0
  397. package/dist/plugins/__tests__/lang-domain.test.d.ts.map +1 -0
  398. package/dist/plugins/__tests__/lang-domain.test.js +192 -0
  399. package/dist/plugins/__tests__/lang-domain.test.js.map +1 -0
  400. package/dist/plugins/__tests__/loader.test.d.ts +2 -0
  401. package/dist/plugins/__tests__/loader.test.d.ts.map +1 -0
  402. package/dist/plugins/__tests__/loader.test.js +271 -0
  403. package/dist/plugins/__tests__/loader.test.js.map +1 -0
  404. package/dist/plugins/check-package-discovery.d.ts +19 -0
  405. package/dist/plugins/check-package-discovery.d.ts.map +1 -0
  406. package/dist/plugins/check-package-discovery.js +34 -0
  407. package/dist/plugins/check-package-discovery.js.map +1 -0
  408. package/dist/plugins/loader.d.ts +32 -0
  409. package/dist/plugins/loader.d.ts.map +1 -0
  410. package/dist/plugins/loader.js +198 -0
  411. package/dist/plugins/loader.js.map +1 -0
  412. package/dist/plugins/types.d.ts +29 -0
  413. package/dist/plugins/types.d.ts.map +1 -0
  414. package/dist/plugins/types.js +9 -0
  415. package/dist/plugins/types.js.map +1 -0
  416. package/dist/recipes/__tests__/built-in-recipes.test.d.ts +2 -0
  417. package/dist/recipes/__tests__/built-in-recipes.test.d.ts.map +1 -0
  418. package/dist/recipes/__tests__/built-in-recipes.test.js +93 -0
  419. package/dist/recipes/__tests__/built-in-recipes.test.js.map +1 -0
  420. package/dist/recipes/__tests__/check-config.test.d.ts +12 -0
  421. package/dist/recipes/__tests__/check-config.test.d.ts.map +1 -0
  422. package/dist/recipes/__tests__/check-config.test.js +90 -0
  423. package/dist/recipes/__tests__/check-config.test.js.map +1 -0
  424. package/dist/recipes/__tests__/check-resolution.test.d.ts +2 -0
  425. package/dist/recipes/__tests__/check-resolution.test.d.ts.map +1 -0
  426. package/dist/recipes/__tests__/check-resolution.test.js +160 -0
  427. package/dist/recipes/__tests__/check-resolution.test.js.map +1 -0
  428. package/dist/recipes/__tests__/execution-branches.test.d.ts +10 -0
  429. package/dist/recipes/__tests__/execution-branches.test.d.ts.map +1 -0
  430. package/dist/recipes/__tests__/execution-branches.test.js +612 -0
  431. package/dist/recipes/__tests__/execution-branches.test.js.map +1 -0
  432. package/dist/recipes/__tests__/execution-paths.test.d.ts +10 -0
  433. package/dist/recipes/__tests__/execution-paths.test.d.ts.map +1 -0
  434. package/dist/recipes/__tests__/execution-paths.test.js +280 -0
  435. package/dist/recipes/__tests__/execution-paths.test.js.map +1 -0
  436. package/dist/recipes/__tests__/registry.test.d.ts +2 -0
  437. package/dist/recipes/__tests__/registry.test.d.ts.map +1 -0
  438. package/dist/recipes/__tests__/registry.test.js +89 -0
  439. package/dist/recipes/__tests__/registry.test.js.map +1 -0
  440. package/dist/recipes/__tests__/retry.test.d.ts +2 -0
  441. package/dist/recipes/__tests__/retry.test.d.ts.map +1 -0
  442. package/dist/recipes/__tests__/retry.test.js +75 -0
  443. package/dist/recipes/__tests__/retry.test.js.map +1 -0
  444. package/dist/recipes/__tests__/run-one-check.test.d.ts +14 -0
  445. package/dist/recipes/__tests__/run-one-check.test.d.ts.map +1 -0
  446. package/dist/recipes/__tests__/run-one-check.test.js +182 -0
  447. package/dist/recipes/__tests__/run-one-check.test.js.map +1 -0
  448. package/dist/recipes/__tests__/service.test.d.ts +11 -0
  449. package/dist/recipes/__tests__/service.test.d.ts.map +1 -0
  450. package/dist/recipes/__tests__/service.test.js +572 -0
  451. package/dist/recipes/__tests__/service.test.js.map +1 -0
  452. package/dist/recipes/built-in-recipes.d.ts +14 -0
  453. package/dist/recipes/built-in-recipes.d.ts.map +1 -0
  454. package/dist/recipes/built-in-recipes.js +241 -0
  455. package/dist/recipes/built-in-recipes.js.map +1 -0
  456. package/dist/recipes/check-config.d.ts +56 -0
  457. package/dist/recipes/check-config.d.ts.map +1 -0
  458. package/dist/recipes/check-config.js +61 -0
  459. package/dist/recipes/check-config.js.map +1 -0
  460. package/dist/recipes/check-resolution.d.ts +36 -0
  461. package/dist/recipes/check-resolution.d.ts.map +1 -0
  462. package/dist/recipes/check-resolution.js +81 -0
  463. package/dist/recipes/check-resolution.js.map +1 -0
  464. package/dist/recipes/check-result-processor.d.ts +51 -0
  465. package/dist/recipes/check-result-processor.d.ts.map +1 -0
  466. package/dist/recipes/check-result-processor.js +197 -0
  467. package/dist/recipes/check-result-processor.js.map +1 -0
  468. package/dist/recipes/parallel-execution.d.ts +38 -0
  469. package/dist/recipes/parallel-execution.d.ts.map +1 -0
  470. package/dist/recipes/parallel-execution.js +61 -0
  471. package/dist/recipes/parallel-execution.js.map +1 -0
  472. package/dist/recipes/registry.d.ts +47 -0
  473. package/dist/recipes/registry.d.ts.map +1 -0
  474. package/dist/recipes/registry.js +70 -0
  475. package/dist/recipes/registry.js.map +1 -0
  476. package/dist/recipes/retry.d.ts +29 -0
  477. package/dist/recipes/retry.d.ts.map +1 -0
  478. package/dist/recipes/retry.js +23 -0
  479. package/dist/recipes/retry.js.map +1 -0
  480. package/dist/recipes/run-one-check.d.ts +59 -0
  481. package/dist/recipes/run-one-check.d.ts.map +1 -0
  482. package/dist/recipes/run-one-check.js +174 -0
  483. package/dist/recipes/run-one-check.js.map +1 -0
  484. package/dist/recipes/sequential-execution.d.ts +12 -0
  485. package/dist/recipes/sequential-execution.d.ts.map +1 -0
  486. package/dist/recipes/sequential-execution.js +48 -0
  487. package/dist/recipes/sequential-execution.js.map +1 -0
  488. package/dist/recipes/service-types.d.ts +87 -0
  489. package/dist/recipes/service-types.d.ts.map +1 -0
  490. package/dist/recipes/service-types.js +8 -0
  491. package/dist/recipes/service-types.js.map +1 -0
  492. package/dist/recipes/service.d.ts +73 -0
  493. package/dist/recipes/service.d.ts.map +1 -0
  494. package/dist/recipes/service.js +438 -0
  495. package/dist/recipes/service.js.map +1 -0
  496. package/dist/recipes/types.d.ts +155 -0
  497. package/dist/recipes/types.d.ts.map +1 -0
  498. package/dist/recipes/types.js +56 -0
  499. package/dist/recipes/types.js.map +1 -0
  500. package/dist/scaffold/config-block.d.ts +17 -0
  501. package/dist/scaffold/config-block.d.ts.map +1 -0
  502. package/dist/scaffold/config-block.js +30 -0
  503. package/dist/scaffold/config-block.js.map +1 -0
  504. package/dist/scaffold/examples.d.ts +30 -0
  505. package/dist/scaffold/examples.d.ts.map +1 -0
  506. package/dist/scaffold/examples.js +129 -0
  507. package/dist/scaffold/examples.js.map +1 -0
  508. package/dist/scope-augmentation.d.ts +77 -0
  509. package/dist/scope-augmentation.d.ts.map +1 -0
  510. package/dist/scope-augmentation.js +31 -0
  511. package/dist/scope-augmentation.js.map +1 -0
  512. package/dist/signalers/__tests__/loader.test.d.ts +2 -0
  513. package/dist/signalers/__tests__/loader.test.d.ts.map +1 -0
  514. package/dist/signalers/__tests__/loader.test.js +141 -0
  515. package/dist/signalers/__tests__/loader.test.js.map +1 -0
  516. package/dist/signalers/__tests__/violation-to-signal.test.d.ts +2 -0
  517. package/dist/signalers/__tests__/violation-to-signal.test.d.ts.map +1 -0
  518. package/dist/signalers/__tests__/violation-to-signal.test.js +59 -0
  519. package/dist/signalers/__tests__/violation-to-signal.test.js.map +1 -0
  520. package/dist/signalers/index.d.ts +8 -0
  521. package/dist/signalers/index.d.ts.map +1 -0
  522. package/dist/signalers/index.js +9 -0
  523. package/dist/signalers/index.js.map +1 -0
  524. package/dist/signalers/loader.d.ts +30 -0
  525. package/dist/signalers/loader.d.ts.map +1 -0
  526. package/dist/signalers/loader.js +120 -0
  527. package/dist/signalers/loader.js.map +1 -0
  528. package/dist/signalers/schema.d.ts +60 -0
  529. package/dist/signalers/schema.d.ts.map +1 -0
  530. package/dist/signalers/schema.js +74 -0
  531. package/dist/signalers/schema.js.map +1 -0
  532. package/dist/signalers/types.d.ts +13 -0
  533. package/dist/signalers/types.d.ts.map +1 -0
  534. package/dist/signalers/types.js +5 -0
  535. package/dist/signalers/types.js.map +1 -0
  536. package/dist/signalers/violation-to-signal.d.ts +38 -0
  537. package/dist/signalers/violation-to-signal.d.ts.map +1 -0
  538. package/dist/signalers/violation-to-signal.js +43 -0
  539. package/dist/signalers/violation-to-signal.js.map +1 -0
  540. package/dist/targets/__tests__/loader.test.d.ts +2 -0
  541. package/dist/targets/__tests__/loader.test.d.ts.map +1 -0
  542. package/dist/targets/__tests__/loader.test.js +190 -0
  543. package/dist/targets/__tests__/loader.test.js.map +1 -0
  544. package/dist/targets/__tests__/target-registry.test.d.ts +2 -0
  545. package/dist/targets/__tests__/target-registry.test.d.ts.map +1 -0
  546. package/dist/targets/__tests__/target-registry.test.js +182 -0
  547. package/dist/targets/__tests__/target-registry.test.js.map +1 -0
  548. package/dist/targets/index.d.ts +18 -0
  549. package/dist/targets/index.d.ts.map +1 -0
  550. package/dist/targets/index.js +21 -0
  551. package/dist/targets/index.js.map +1 -0
  552. package/dist/targets/loader.d.ts +27 -0
  553. package/dist/targets/loader.d.ts.map +1 -0
  554. package/dist/targets/loader.js +178 -0
  555. package/dist/targets/loader.js.map +1 -0
  556. package/dist/targets/target-registry.d.ts +41 -0
  557. package/dist/targets/target-registry.d.ts.map +1 -0
  558. package/dist/targets/target-registry.js +71 -0
  559. package/dist/targets/target-registry.js.map +1 -0
  560. package/dist/targets/types.d.ts +14 -0
  561. package/dist/targets/types.d.ts.map +1 -0
  562. package/dist/targets/types.js +14 -0
  563. package/dist/targets/types.js.map +1 -0
  564. package/dist/tool.d.ts +61 -0
  565. package/dist/tool.d.ts.map +1 -0
  566. package/dist/tool.js +260 -0
  567. package/dist/tool.js.map +1 -0
  568. package/dist/types/findings.d.ts +113 -0
  569. package/dist/types/findings.d.ts.map +1 -0
  570. package/dist/types/findings.js +89 -0
  571. package/dist/types/findings.js.map +1 -0
  572. package/dist/types/severity.d.ts +15 -0
  573. package/dist/types/severity.d.ts.map +1 -0
  574. package/dist/types/severity.js +33 -0
  575. package/dist/types/severity.js.map +1 -0
  576. package/package.json +137 -0
@@ -0,0 +1,175 @@
1
+ /**
2
+ * @fileoverview Tests for filterSignalsByDirectives and buildFilteredResult.
3
+ *
4
+ * Covers the two main entrypoints the engine uses to suppress signals
5
+ * via `@fitness-ignore-file` and `@fitness-ignore-next-line`. Also
6
+ * covers the anti-recursion guard (signals pointing AT a directive
7
+ * line are never suppressed, otherwise directive-auditing checks would
8
+ * silently hide their own findings).
9
+ */
10
+ import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
11
+ import { tmpdir } from 'node:os';
12
+ import { dirname, join } from 'node:path';
13
+ import { createSignal } from '@opensip-cli/core';
14
+ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
15
+ import { fileCache } from '../file-cache.js';
16
+ import { buildFilteredResult, filterSignalsByDirectives } from '../ignore-processing.js';
17
+ let testDir;
18
+ function fixture(rel, content) {
19
+ const abs = join(testDir, rel);
20
+ mkdirSync(dirname(abs), { recursive: true });
21
+ writeFileSync(abs, content);
22
+ return abs;
23
+ }
24
+ function mkSignal(file, line, message = 'finding') {
25
+ return createSignal({
26
+ source: 'fitness',
27
+ provider: 'opensip',
28
+ severity: 'high',
29
+ category: 'quality',
30
+ ruleId: 'fit:no-foo',
31
+ message,
32
+ code: { file, line, column: 1 },
33
+ });
34
+ }
35
+ beforeEach(() => {
36
+ testDir = mkdtempSync(join(tmpdir(), 'opensip-ignore-proc-'));
37
+ });
38
+ afterEach(() => {
39
+ fileCache.clear();
40
+ rmSync(testDir, { recursive: true, force: true });
41
+ });
42
+ describe('filterSignalsByDirectives — file-level ignore', () => {
43
+ it('suppresses every signal in a file marked `@fitness-ignore-file <slug>`', async () => {
44
+ const file = fixture('src/a.ts', '// @fitness-ignore-file no-foo -- justified\nconst x = "FOO";\nconst y = "FOO";');
45
+ await fileCache.prewarm(testDir, ['**/*.ts']);
46
+ const signals = [mkSignal(file, 2), mkSignal(file, 3)];
47
+ const out = await filterSignalsByDirectives(signals, 'no-foo', 0);
48
+ expect(out.filteredSignals).toEqual([]);
49
+ expect(out.ignoredCount).toBe(2);
50
+ expect(out.appliedDirectives).toHaveLength(1);
51
+ expect(out.appliedDirectives[0]?.type).toBe('file');
52
+ expect(out.appliedDirectives[0]?.checkId).toBe('no-foo');
53
+ });
54
+ it('does not suppress signals when the file ignore targets a different check', async () => {
55
+ const file = fixture('src/a.ts', '// @fitness-ignore-file other-check\nconst x = "FOO";');
56
+ await fileCache.prewarm(testDir, ['**/*.ts']);
57
+ const signals = [mkSignal(file, 2)];
58
+ const out = await filterSignalsByDirectives(signals, 'no-foo', 0);
59
+ expect(out.filteredSignals).toHaveLength(1);
60
+ expect(out.ignoredCount).toBe(0);
61
+ });
62
+ });
63
+ describe('filterSignalsByDirectives — line-level ignore', () => {
64
+ it('suppresses a signal on the line immediately following a `@fitness-ignore-next-line` directive', async () => {
65
+ const file = fixture('src/a.ts', [
66
+ 'const a = 1',
67
+ '// @fitness-ignore-next-line no-foo -- justified',
68
+ 'const x = "FOO"', // line 3 — suppressed
69
+ 'const y = "FOO"', // line 4 — not suppressed
70
+ ].join('\n'));
71
+ await fileCache.prewarm(testDir, ['**/*.ts']);
72
+ const signals = [mkSignal(file, 3), mkSignal(file, 4)];
73
+ const out = await filterSignalsByDirectives(signals, 'no-foo', 0);
74
+ expect(out.filteredSignals).toHaveLength(1);
75
+ expect(out.filteredSignals[0]?.code?.line).toBe(4);
76
+ expect(out.ignoredCount).toBe(1);
77
+ expect(out.appliedDirectives).toHaveLength(1);
78
+ expect(out.appliedDirectives[0]?.type).toBe('next-line');
79
+ });
80
+ it('never suppresses a signal pointing at a directive line itself (anti-recursion)', async () => {
81
+ const file = fixture('src/a.ts', ['// @fitness-ignore-next-line no-foo -- bad', 'const x = "FOO"'].join('\n'));
82
+ await fileCache.prewarm(testDir, ['**/*.ts']);
83
+ // A directive-auditing check pointing at the directive line (1) MUST
84
+ // pass through, otherwise its own findings would silently disappear.
85
+ const signals = [mkSignal(file, 1, 'directive findings')];
86
+ const out = await filterSignalsByDirectives(signals, 'no-foo', 0);
87
+ expect(out.filteredSignals).toHaveLength(1);
88
+ expect(out.ignoredCount).toBe(0);
89
+ });
90
+ });
91
+ describe('filterSignalsByDirectives — edge cases', () => {
92
+ it('ignores signals without a filePath', async () => {
93
+ const signals = [
94
+ createSignal({
95
+ source: 'fitness',
96
+ provider: 'opensip',
97
+ severity: 'high',
98
+ category: 'quality',
99
+ ruleId: 'fit:no-foo',
100
+ message: 'no-file',
101
+ code: { line: 1, column: 1, file: '' },
102
+ }),
103
+ ];
104
+ const out = await filterSignalsByDirectives(signals, 'no-foo', 0);
105
+ // Empty file path makes uniqueFiles set skip it; signal is kept as-is
106
+ expect(out.filteredSignals).toHaveLength(1);
107
+ });
108
+ it('preserves the initialIgnoredCount when no signals are filtered', async () => {
109
+ const out = await filterSignalsByDirectives([], 'no-foo', 5);
110
+ expect(out.ignoredCount).toBe(5);
111
+ expect(out.filteredSignals).toEqual([]);
112
+ });
113
+ it('handles a signal pointing at a non-existent file gracefully', async () => {
114
+ const signals = [mkSignal('/does/not/exist.ts', 1)];
115
+ const out = await filterSignalsByDirectives(signals, 'no-foo', 0);
116
+ expect(out.filteredSignals).toHaveLength(1);
117
+ expect(out.ignoredCount).toBe(0);
118
+ });
119
+ });
120
+ function mkResult(signals) {
121
+ return {
122
+ passed: signals.every((s) => s.severity !== 'high'),
123
+ errors: signals.filter((s) => s.severity === 'high').length,
124
+ warnings: signals.filter((s) => s.severity !== 'high').length,
125
+ signals: [...signals],
126
+ info: { label: 'test result' },
127
+ metadata: {
128
+ durationMs: 100,
129
+ totalItems: 0,
130
+ filesScanned: 0,
131
+ itemType: 'files',
132
+ signals: [...signals],
133
+ },
134
+ };
135
+ }
136
+ describe('buildFilteredResult', () => {
137
+ it('returns the original result when filteredSignals is not an array', () => {
138
+ const result = mkResult([]);
139
+ // @ts-expect-error — exercising the runtime guard
140
+ const out = buildFilteredResult(result, undefined, 0, Date.now());
141
+ expect(out).toBe(result);
142
+ });
143
+ it('recomputes errors / warnings / passed from filtered signals', () => {
144
+ const file = '/virtual/a.ts';
145
+ const errSig = mkSignal(file, 1);
146
+ const warnSig = createSignal({
147
+ source: 'fitness',
148
+ provider: 'opensip',
149
+ severity: 'medium',
150
+ category: 'quality',
151
+ ruleId: 'fit:warn',
152
+ message: 'w',
153
+ code: { file, line: 2, column: 1 },
154
+ });
155
+ const original = mkResult([errSig, warnSig]);
156
+ const out = buildFilteredResult(original, [warnSig], 1, Date.now() - 10);
157
+ expect(out.errors).toBe(0);
158
+ expect(out.warnings).toBe(1);
159
+ expect(out.passed).toBe(true);
160
+ expect(out.signals).toHaveLength(1);
161
+ expect(out.ignoredCount).toBe(1);
162
+ });
163
+ it('omits ignoredCount when zero', () => {
164
+ const file = '/virtual/a.ts';
165
+ const sig = mkSignal(file, 1);
166
+ const out = buildFilteredResult(mkResult([sig]), [sig], 0, Date.now());
167
+ expect(out.ignoredCount).toBeUndefined();
168
+ });
169
+ it('uses metadata.durationMs when available', () => {
170
+ const result = mkResult([]);
171
+ const out = buildFilteredResult(result, [], 0, Date.now());
172
+ expect(out.metadata.durationMs).toBe(100);
173
+ });
174
+ });
175
+ //# sourceMappingURL=ignore-processing.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-processing.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/ignore-processing.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAKzF,IAAI,OAAe,CAAC;AAEpB,SAAS,OAAO,CAAC,GAAW,EAAE,OAAe;IAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAC/B,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,IAAY,EAAE,OAAO,GAAG,SAAS;IAC/D,OAAO,YAAY,CAAC;QAClB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,YAAY;QACpB,OAAO;QACP,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI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AAE,CAAC,CAAC;QACvE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5B,MAAM,GAAG,GAAG,mBAAmB,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3D,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Unit tests for the import-graph builder + Tarjan's SCC.
3
+ *
4
+ * Covers:
5
+ * - Basic relative-import resolution (./foo, ../bar, with/without ext)
6
+ * - Index resolution (./foo/index.ts)
7
+ * - ESM extension swap (.js → .ts)
8
+ * - Bare specifiers dropped (npm packages don't appear as edges)
9
+ * - export-from declarations contribute edges
10
+ * - Files that fail to parse still appear as nodes
11
+ * - SCC detection: simple 2-cycle, larger cycle, multiple disjoint cycles,
12
+ * no-cycle case, self-loop
13
+ */
14
+ export {};
15
+ //# sourceMappingURL=import-graph.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-graph.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/import-graph.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Unit tests for the import-graph builder + Tarjan's SCC.
3
+ *
4
+ * Covers:
5
+ * - Basic relative-import resolution (./foo, ../bar, with/without ext)
6
+ * - Index resolution (./foo/index.ts)
7
+ * - ESM extension swap (.js → .ts)
8
+ * - Bare specifiers dropped (npm packages don't appear as edges)
9
+ * - export-from declarations contribute edges
10
+ * - Files that fail to parse still appear as nodes
11
+ * - SCC detection: simple 2-cycle, larger cycle, multiple disjoint cycles,
12
+ * no-cycle case, self-loop
13
+ */
14
+ import { describe, expect, it } from 'vitest';
15
+ import { buildImportGraph, findStronglyConnectedComponents, } from '../import-graph.js';
16
+ // ---------------------------------------------------------------------------
17
+ // Helpers — synthetic file maps
18
+ // ---------------------------------------------------------------------------
19
+ function map(...entries) {
20
+ return new Map(entries);
21
+ }
22
+ // ---------------------------------------------------------------------------
23
+ // buildImportGraph — resolution
24
+ // ---------------------------------------------------------------------------
25
+ describe('buildImportGraph — resolution', () => {
26
+ it('resolves relative ./foo imports', () => {
27
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { x } from './b'`], ['/p/src/b.ts', `export const x = 1`]));
28
+ expect(g.outbound.get('/p/src/a.ts').has('/p/src/b.ts')).toBe(true);
29
+ expect(g.inbound.get('/p/src/b.ts').has('/p/src/a.ts')).toBe(true);
30
+ });
31
+ it('resolves ../foo imports', () => {
32
+ const g = buildImportGraph(map(['/p/src/sub/a.ts', `import { x } from '../b'`], ['/p/src/b.ts', `export const x = 1`]));
33
+ expect(g.outbound.get('/p/src/sub/a.ts').has('/p/src/b.ts')).toBe(true);
34
+ });
35
+ it('resolves index files (./foo → ./foo/index.ts)', () => {
36
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { x } from './lib'`], ['/p/src/lib/index.ts', `export const x = 1`]));
37
+ expect(g.outbound.get('/p/src/a.ts').has('/p/src/lib/index.ts')).toBe(true);
38
+ });
39
+ it('resolves .tsx files', () => {
40
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { B } from './b'`], ['/p/src/b.tsx', `export const B = () => null`]));
41
+ expect(g.outbound.get('/p/src/a.ts').has('/p/src/b.tsx')).toBe(true);
42
+ });
43
+ it('resolves ESM extension swap (.js → .ts)', () => {
44
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { x } from './b.js'`], ['/p/src/b.ts', `export const x = 1`]));
45
+ expect(g.outbound.get('/p/src/a.ts').has('/p/src/b.ts')).toBe(true);
46
+ });
47
+ it('resolves literal .ts paths', () => {
48
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { x } from './b.ts'`], ['/p/src/b.ts', `export const x = 1`]));
49
+ expect(g.outbound.get('/p/src/a.ts').has('/p/src/b.ts')).toBe(true);
50
+ });
51
+ it('drops bare specifiers (npm packages have no intra-project edge)', () => {
52
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { useState } from 'react'\nimport lodash from 'lodash'`]));
53
+ expect(g.outbound.get('/p/src/a.ts').size).toBe(0);
54
+ });
55
+ it('drops unresolved relative paths (target file not in project)', () => {
56
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { x } from './does-not-exist'`]));
57
+ expect(g.outbound.get('/p/src/a.ts').size).toBe(0);
58
+ });
59
+ it('counts export-from declarations as edges', () => {
60
+ const g = buildImportGraph(map(['/p/src/index.ts', `export * from './a'\nexport { x } from './b'`], ['/p/src/a.ts', `export const a = 1`], ['/p/src/b.ts', `export const x = 1`]));
61
+ expect(g.outbound.get('/p/src/index.ts').size).toBe(2);
62
+ expect(g.outbound.get('/p/src/index.ts').has('/p/src/a.ts')).toBe(true);
63
+ expect(g.outbound.get('/p/src/index.ts').has('/p/src/b.ts')).toBe(true);
64
+ });
65
+ it('handles side-effect imports (import "./foo")', () => {
66
+ const g = buildImportGraph(map(['/p/src/a.ts', `import './side-effect'`], ['/p/src/side-effect.ts', `console.log('loaded')`]));
67
+ expect(g.outbound.get('/p/src/a.ts').has('/p/src/side-effect.ts')).toBe(true);
68
+ });
69
+ it('keeps files that fail to parse as nodes (with no edges)', () => {
70
+ const g = buildImportGraph(map(['/p/src/a.ts', `import { x } from './b'`], ['/p/src/b.ts', `export const x = 1`],
71
+ // Intentionally truncated/garbled content. ts.createSourceFile is
72
+ // forgiving so this may parse to empty statements; either way the file
73
+ // should be a node.
74
+ ['/p/src/garbled.ts', `import { incomplete\nexport //`]));
75
+ expect(g.nodes.has('/p/src/garbled.ts')).toBe(true);
76
+ expect(g.outbound.has('/p/src/garbled.ts')).toBe(true);
77
+ });
78
+ it('initializes empty edge sets for every node', () => {
79
+ const g = buildImportGraph(map(['/p/src/a.ts', `// no imports`], ['/p/src/b.ts', `// no imports`]));
80
+ expect(g.outbound.get('/p/src/a.ts')).toBeDefined();
81
+ expect(g.outbound.get('/p/src/a.ts').size).toBe(0);
82
+ expect(g.inbound.get('/p/src/b.ts')).toBeDefined();
83
+ expect(g.inbound.get('/p/src/b.ts').size).toBe(0);
84
+ });
85
+ });
86
+ // ---------------------------------------------------------------------------
87
+ // findStronglyConnectedComponents — cycle detection
88
+ // ---------------------------------------------------------------------------
89
+ describe('findStronglyConnectedComponents', () => {
90
+ it('returns one SCC per node when there are no cycles', () => {
91
+ const g = buildImportGraph(map(['/p/a.ts', `import {} from './b'`], ['/p/b.ts', `import {} from './c'`], ['/p/c.ts', `// leaf`]));
92
+ const sccs = findStronglyConnectedComponents(g);
93
+ expect(sccs.length).toBe(3); // every node is its own trivial SCC
94
+ for (const scc of sccs)
95
+ expect(scc.length).toBe(1);
96
+ });
97
+ it('detects a simple 2-file cycle (a ↔ b)', () => {
98
+ const g = buildImportGraph(map(['/p/a.ts', `import type {} from './b'`], ['/p/b.ts', `import type {} from './a'`]));
99
+ const sccs = findStronglyConnectedComponents(g);
100
+ const cycles = sccs.filter((s) => s.length > 1);
101
+ expect(cycles.length).toBe(1);
102
+ expect(new Set(cycles[0])).toEqual(new Set(['/p/a.ts', '/p/b.ts']));
103
+ });
104
+ it('detects a 4-file cycle (a → b → c → d → a)', () => {
105
+ const g = buildImportGraph(map(['/p/a.ts', `import {} from './b'`], ['/p/b.ts', `import {} from './c'`], ['/p/c.ts', `import {} from './d'`], ['/p/d.ts', `import {} from './a'`]));
106
+ const sccs = findStronglyConnectedComponents(g);
107
+ const cycles = sccs.filter((s) => s.length > 1);
108
+ expect(cycles.length).toBe(1);
109
+ expect(cycles[0].length).toBe(4);
110
+ });
111
+ it('detects two disjoint cycles', () => {
112
+ const g = buildImportGraph(map(['/p/a.ts', `import {} from './b'`], ['/p/b.ts', `import {} from './a'`], ['/p/c.ts', `import {} from './d'`], ['/p/d.ts', `import {} from './c'`]));
113
+ const sccs = findStronglyConnectedComponents(g);
114
+ const cycles = sccs.filter((s) => s.length > 1);
115
+ expect(cycles.length).toBe(2);
116
+ for (const cycle of cycles)
117
+ expect(cycle.length).toBe(2);
118
+ });
119
+ it('does NOT report self-loops as multi-file cycles', () => {
120
+ // A file that imports itself is structurally weird but not a multi-file
121
+ // cycle. This mostly can't happen in practice with TS (the resolver would
122
+ // need an aliased path), but the SCC algorithm shouldn't conflate it.
123
+ const g = buildImportGraph(map(['/p/a.ts', `// self`]));
124
+ const sccs = findStronglyConnectedComponents(g);
125
+ const cycles = sccs.filter((s) => s.length > 1);
126
+ expect(cycles.length).toBe(0);
127
+ });
128
+ it('handles a graph where one cycle is reachable from non-cycle nodes', () => {
129
+ // entry → a ↔ b
130
+ const g = buildImportGraph(map(['/p/entry.ts', `import {} from './a'`], ['/p/a.ts', `import {} from './b'`], ['/p/b.ts', `import {} from './a'`]));
131
+ const sccs = findStronglyConnectedComponents(g);
132
+ const cycles = sccs.filter((s) => s.length > 1);
133
+ expect(cycles.length).toBe(1);
134
+ expect(new Set(cycles[0])).toEqual(new Set(['/p/a.ts', '/p/b.ts']));
135
+ });
136
+ it('handles a deep graph without recursion blowing the stack', () => {
137
+ // 1000-node linear chain: a0 → a1 → ... → a999. Iterative Tarjan's
138
+ // should handle this without stack overflow (recursive form would die
139
+ // around ~10k depending on the runtime).
140
+ const entries = [];
141
+ const N = 1000;
142
+ for (let i = 0; i < N; i++) {
143
+ const next = i + 1 < N ? `import {} from './a${i + 1}'` : '';
144
+ entries.push([`/p/a${i}.ts`, next]);
145
+ }
146
+ const g = buildImportGraph(map(...entries));
147
+ const sccs = findStronglyConnectedComponents(g);
148
+ expect(sccs.length).toBe(N); // each node is its own trivial SCC
149
+ });
150
+ });
151
+ // ---------------------------------------------------------------------------
152
+ // Inbound vs outbound symmetry
153
+ // ---------------------------------------------------------------------------
154
+ describe('buildImportGraph — inbound/outbound symmetry', () => {
155
+ it('every outbound edge has a matching inbound edge', () => {
156
+ const g = buildImportGraph(map(['/p/a.ts', `import {} from './b'\nimport {} from './c'`], ['/p/b.ts', `import {} from './c'`], ['/p/c.ts', `// leaf`]));
157
+ for (const [from, tos] of g.outbound) {
158
+ for (const to of tos) {
159
+ expect(g.inbound.get(to).has(from)).toBe(true);
160
+ }
161
+ }
162
+ });
163
+ });
164
+ //# sourceMappingURL=import-graph.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-graph.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/import-graph.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EACL,gBAAgB,EAChB,+BAA+B,GAEhC,MAAM,oBAAoB,CAAC;AAE5B,8EAA8E;AAC9E,gCAAgC;AAChC,8EAA8E;AAE9E,SAAS,GAAG,CAAC,GAAG,OAA+C;IAC7D,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;AAC1B,CAAC;AAED,8EAA8E;AAC9E,gCAAgC;AAChC,8EAA8E;AAE9E,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,GAAG,gBAAgB,CACxB,GAAG,CAAC,CAAC,aAAa,EAAE,yBAAyB,CAAC,EAAE,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC,CACvF,CAAC;QACF,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAE,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC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AC,CAAC,EAAE,CAAC;YAC7D,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,CAAC,GAAG,gBAAgB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,+BAA+B,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,mCAAmC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,8EAA8E;AAC9E,+BAA+B;AAC/B,8EAA8E;AAE9E,QAAQ,CAAC,8CAA8C,EAAE,GAAG,EAAE;IAC5D,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,CAAC,GAAgB,gBAAgB,CACrC,GAAG,CACD,CAAC,SAAS,EAAE,4CAA4C,CAAC,EACzD,CAAC,SAAS,EAAE,sBAAsB,CAAC,EACnC,CAAC,SAAS,EAAE,SAAS,CAAC,CACvB,CACF,CAAC;QACF,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;YACrC,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;gBACrB,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @fileoverview Tests for the per-check memory profiler.
3
+ *
4
+ * Covers the public surface used by the recipe execution engine:
5
+ * recordPrewarmComplete / recordCheckStart / recordCheckComplete plus
6
+ * the threshold-tracking, summary, and reset paths.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=memory-profiler.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-profiler.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/memory-profiler.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @fileoverview Tests for the per-check memory profiler.
3
+ *
4
+ * Covers the public surface used by the recipe execution engine:
5
+ * recordPrewarmComplete / recordCheckStart / recordCheckComplete plus
6
+ * the threshold-tracking, summary, and reset paths.
7
+ */
8
+ import { afterEach, describe, expect, it } from 'vitest';
9
+ import { memoryProfiler } from '../memory-profiler.js';
10
+ afterEach(() => {
11
+ memoryProfiler.reset();
12
+ });
13
+ describe('memoryProfiler — basics', () => {
14
+ it('returns a non-negative current memory reading in MB', () => {
15
+ const mb = memoryProfiler.getCurrentMemoryMB();
16
+ expect(typeof mb).toBe('number');
17
+ expect(mb).toBeGreaterThan(0);
18
+ });
19
+ it('recordCheckStart returns the current heap snapshot in MB', () => {
20
+ const before = memoryProfiler.recordCheckStart();
21
+ expect(before).toBeGreaterThan(0);
22
+ });
23
+ it('exposes the configured warning threshold', () => {
24
+ expect(memoryProfiler.getWarningThresholdMB()).toBeGreaterThan(0);
25
+ });
26
+ });
27
+ describe('memoryProfiler — recordCheckComplete', () => {
28
+ it('returns a profile with rounded numbers and recorded violation count', () => {
29
+ const before = memoryProfiler.recordCheckStart();
30
+ const profile = memoryProfiler.recordCheckComplete('check-A', before, 7, 123);
31
+ expect(profile.checkId).toBe('check-A');
32
+ expect(profile.violationCount).toBe(7);
33
+ expect(profile.durationMs).toBe(123);
34
+ // memoryDeltaMB rounded to 2 decimals — i.e., last fractional digit can be 0 or up to 99
35
+ expect(Number.isFinite(profile.memoryDeltaMB)).toBe(true);
36
+ expect(profile.memoryAfterMB).toBeGreaterThan(0);
37
+ });
38
+ it('records the profile in the summary', () => {
39
+ const before = memoryProfiler.recordCheckStart();
40
+ memoryProfiler.recordCheckComplete('first', before, 1, 10);
41
+ memoryProfiler.recordCheckComplete('second', before, 2, 20);
42
+ const summary = memoryProfiler.getSummary();
43
+ expect(summary.allProfiles).toHaveLength(2);
44
+ });
45
+ });
46
+ describe('memoryProfiler — exceedsThreshold', () => {
47
+ it('returns false for deltas below the threshold', () => {
48
+ expect(memoryProfiler.exceedsThreshold(0)).toBe(false);
49
+ expect(memoryProfiler.exceedsThreshold(50)).toBe(false);
50
+ });
51
+ it('returns true for deltas above the threshold', () => {
52
+ const threshold = memoryProfiler.getWarningThresholdMB();
53
+ expect(memoryProfiler.exceedsThreshold(threshold + 1)).toBe(true);
54
+ });
55
+ });
56
+ describe('memoryProfiler — getSummary', () => {
57
+ it('returns an empty summary after reset', () => {
58
+ memoryProfiler.reset();
59
+ const summary = memoryProfiler.getSummary();
60
+ expect(summary.allProfiles).toEqual([]);
61
+ expect(summary.topConsumers).toEqual([]);
62
+ expect(summary.checksExceedingThreshold).toBe(0);
63
+ expect(summary.peakMemoryMB).toBe(0);
64
+ expect(summary.prewarmMemoryMB).toBe(0);
65
+ });
66
+ it('records prewarm baseline when recordPrewarmComplete is called', () => {
67
+ memoryProfiler.recordPrewarmComplete();
68
+ const summary = memoryProfiler.getSummary();
69
+ expect(summary.prewarmMemoryMB).toBeGreaterThan(0);
70
+ expect(summary.peakMemoryMB).toBeGreaterThan(0);
71
+ });
72
+ it('returns at most 10 top consumers, sorted by delta descending', () => {
73
+ const before = memoryProfiler.recordCheckStart();
74
+ for (let i = 0; i < 12; i++) {
75
+ memoryProfiler.recordCheckComplete(`c${i}`, before, i, 5);
76
+ }
77
+ const summary = memoryProfiler.getSummary();
78
+ expect(summary.allProfiles).toHaveLength(12);
79
+ expect(summary.topConsumers.length).toBeLessThanOrEqual(10);
80
+ // Sorted by memoryDeltaMB descending
81
+ for (let i = 1; i < summary.topConsumers.length; i++) {
82
+ const prev = summary.topConsumers[i - 1]?.memoryDeltaMB ?? 0;
83
+ const curr = summary.topConsumers[i]?.memoryDeltaMB ?? 0;
84
+ expect(prev).toBeGreaterThanOrEqual(curr);
85
+ }
86
+ });
87
+ it('counts profiles above the threshold', () => {
88
+ const threshold = memoryProfiler.getWarningThresholdMB();
89
+ // Forge profiles by passing a very low memoryBefore to inflate the delta
90
+ memoryProfiler.recordCheckComplete('hot-1', -threshold * 2, 0, 10);
91
+ memoryProfiler.recordCheckComplete('hot-2', -threshold * 2, 0, 10);
92
+ memoryProfiler.recordCheckComplete('cool', memoryProfiler.getCurrentMemoryMB(), 0, 10);
93
+ const summary = memoryProfiler.getSummary();
94
+ expect(summary.checksExceedingThreshold).toBeGreaterThanOrEqual(2);
95
+ });
96
+ });
97
+ describe('memoryProfiler — reset', () => {
98
+ it('clears profiles and prewarm/peak baselines', () => {
99
+ memoryProfiler.recordPrewarmComplete();
100
+ memoryProfiler.recordCheckComplete('x', 0, 0, 1);
101
+ memoryProfiler.reset();
102
+ const summary = memoryProfiler.getSummary();
103
+ expect(summary.allProfiles).toEqual([]);
104
+ expect(summary.prewarmMemoryMB).toBe(0);
105
+ expect(summary.peakMemoryMB).toBe(0);
106
+ });
107
+ });
108
+ //# sourceMappingURL=memory-profiler.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-profiler.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/memory-profiler.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,SAAS,CAAC,GAAG,EAAE;IACb,cAAc,CAAC,KAAK,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC7D,MAAM,EAAE,GAAG,cAAc,CAAC,kBAAkB,EAAE,CAAC;QAC/C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B,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACjD,cAAc,CAAC,KAAK,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @fileoverview Tests for the parse-cache shim.
3
+ *
4
+ * The shim forwards to the language-aware parse cache when a TypeScript
5
+ * adapter is registered, and falls back to a direct `ts.createSourceFile`
6
+ * parse otherwise. Both branches are exercised here.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=parse-cache.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-cache.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/parse-cache.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @fileoverview Tests for the parse-cache shim.
3
+ *
4
+ * The shim forwards to the language-aware parse cache when a TypeScript
5
+ * adapter is registered, and falls back to a direct `ts.createSourceFile`
6
+ * parse otherwise. Both branches are exercised here.
7
+ */
8
+ import { LanguageRegistry, RunScope, runWithScopeSync } from '@opensip-cli/core';
9
+ import ts from 'typescript';
10
+ import { describe, expect, it } from 'vitest';
11
+ import { getSharedSourceFile } from '../parse-cache.js';
12
+ describe('getSharedSourceFile — fallback (no adapter registered)', () => {
13
+ it('returns a TypeScript SourceFile for valid TS content', () => {
14
+ const sf = getSharedSourceFile('virt.ts', 'const x: number = 1');
15
+ expect(sf).not.toBeNull();
16
+ expect(sf?.fileName).toBe('virt.ts');
17
+ });
18
+ it('returns a SourceFile for valid TSX content', () => {
19
+ const sf = getSharedSourceFile('virt.tsx', 'const E = () => <div/>');
20
+ expect(sf).not.toBeNull();
21
+ });
22
+ it('returns a SourceFile even when TS reports syntax errors (TS recovers)', () => {
23
+ // ts.createSourceFile is permissive — it returns a partial AST rather
24
+ // than throwing on syntax errors. The fallback should pass it through.
25
+ const sf = getSharedSourceFile('virt.ts', 'const x = ');
26
+ expect(sf).not.toBeNull();
27
+ });
28
+ });
29
+ describe('getSharedSourceFile — adapter-backed cache hit', () => {
30
+ it('routes through getParseTree when a TypeScript adapter is registered in the scope', () => {
31
+ let parseCount = 0;
32
+ const tsAdapter = {
33
+ id: 'typescript',
34
+ fileExtensions: ['.ts', '.tsx'],
35
+ parse: (content, filePath) => {
36
+ parseCount++;
37
+ return ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
38
+ },
39
+ stripStrings: (s) => s,
40
+ stripComments: (s) => s,
41
+ };
42
+ const reg = new LanguageRegistry();
43
+ reg.register(tsAdapter);
44
+ const scope = new RunScope({ languages: reg });
45
+ const sf = runWithScopeSync(scope, () => getSharedSourceFile('virt.ts', 'const x = 1'));
46
+ expect(sf).not.toBeNull();
47
+ expect(sf?.fileName).toBe('virt.ts');
48
+ expect(parseCount).toBeGreaterThanOrEqual(1);
49
+ });
50
+ });
51
+ //# sourceMappingURL=parse-cache.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-cache.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/parse-cache.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,O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AAY,CAAC,MAAM,EACtB,IAAI,EACJ,EAAE,CAAC,UAAU,CAAC,GAAG,CAClB,CAAC;YACJ,CAAC;YACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACtB,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SACxB,CAAC;QACF,MAAM,GAAG,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACnC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACxB,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;QAE/C,MAAM,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;QACxF,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC1B,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrC,MAAM,CAAC,UAAU,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=path-matcher.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-matcher.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/path-matcher.test.ts"],"names":[],"mappings":""}