@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,102 @@
1
+ /**
2
+ * @fileoverview Tests for execAbortable.
3
+ *
4
+ * Covers the array and shell modes, abort signal handling (pre-spawn
5
+ * and during execution), timeout, and error paths (empty array,
6
+ * spawn failure).
7
+ */
8
+ import { SystemError } from '@opensip-cli/core';
9
+ import { describe, expect, it } from 'vitest';
10
+ import { execAbortable } from '../abortable-exec.js';
11
+ describe('execAbortable — array mode', () => {
12
+ it('runs a command and returns stdout / exit code', async () => {
13
+ const result = await execAbortable(['echo', 'hello']);
14
+ expect(result.stdout.trim()).toBe('hello');
15
+ expect(result.exitCode).toBe(0);
16
+ expect(result.aborted).toBe(false);
17
+ });
18
+ it('captures stderr separately from stdout', async () => {
19
+ const result = await execAbortable(['sh', '-c', 'echo to-stderr 1>&2']);
20
+ expect(result.stderr.trim()).toBe('to-stderr');
21
+ expect(result.exitCode).toBe(0);
22
+ });
23
+ it('preserves multi-byte UTF-8 output split across stream chunks', async () => {
24
+ // A large payload is delivered by the OS pipe in multiple ~64 KiB
25
+ // 'data' chunks. A 3-byte char (中, U+4E2D) is used deliberately:
26
+ // 65536 is not a multiple of 3, so the chunk boundary lands
27
+ // mid-character. Without setEncoding, per-chunk decoding emits U+FFFD
28
+ // replacement chars there. (A 4-byte char would falsely pass — 65536
29
+ // is divisible by 4, so its boundaries align.)
30
+ const count = 300_000;
31
+ const result = await execAbortable([
32
+ process.execPath,
33
+ '-e',
34
+ `process.stdout.write('中'.repeat(${count}))`,
35
+ ]);
36
+ expect(result.exitCode).toBe(0);
37
+ expect(result.stdout).not.toContain('�');
38
+ expect(result.stdout).toBe('中'.repeat(count));
39
+ });
40
+ it('returns a non-zero exit code without throwing', async () => {
41
+ const result = await execAbortable(['sh', '-c', 'exit 3']);
42
+ expect(result.exitCode).toBe(3);
43
+ expect(result.aborted).toBe(false);
44
+ });
45
+ it('rejects with SystemError when the command array is empty', async () => {
46
+ await expect(execAbortable([])).rejects.toThrow(SystemError);
47
+ });
48
+ it('rejects with ExecError when the binary cannot be spawned', async () => {
49
+ await expect(execAbortable(['definitely-not-a-real-binary-zzz'])).rejects.toMatchObject({
50
+ name: 'ExecError',
51
+ });
52
+ });
53
+ });
54
+ describe('execAbortable — shell (string) mode', () => {
55
+ it('runs a string command via the shell and returns stdout', async () => {
56
+ const result = await execAbortable('echo shell-mode');
57
+ expect(result.stdout.trim()).toBe('shell-mode');
58
+ expect(result.exitCode).toBe(0);
59
+ });
60
+ it('returns shell exit code 127 for an unknown command', async () => {
61
+ // sh -c emits 127 when the command name isn't found; the wrapper
62
+ // doesn't classify this as an error — it surfaces the exit code.
63
+ const result = await execAbortable('definitely-not-a-real-binary-zzz');
64
+ expect(result.exitCode).toBe(127);
65
+ });
66
+ });
67
+ describe('execAbortable — abort signal', () => {
68
+ it('returns aborted=true immediately when signal is already aborted', async () => {
69
+ const ctrl = new AbortController();
70
+ ctrl.abort();
71
+ const result = await execAbortable(['echo', 'never-runs'], { signal: ctrl.signal });
72
+ expect(result.aborted).toBe(true);
73
+ expect(result.stdout).toBe('');
74
+ });
75
+ it('aborts a running process when the signal fires mid-execution', async () => {
76
+ const ctrl = new AbortController();
77
+ setTimeout(() => ctrl.abort(), 30);
78
+ const result = await execAbortable(['sh', '-c', 'sleep 5'], { signal: ctrl.signal });
79
+ expect(result.aborted).toBe(true);
80
+ });
81
+ });
82
+ describe('execAbortable — timeout', () => {
83
+ it('aborts a running process when timeout elapses', async () => {
84
+ const result = await execAbortable(['sh', '-c', 'sleep 5'], { timeout: 50 });
85
+ expect(result.aborted).toBe(true);
86
+ });
87
+ it('does not abort fast commands', async () => {
88
+ const result = await execAbortable(['echo', 'quick'], { timeout: 5000 });
89
+ expect(result.aborted).toBe(false);
90
+ expect(result.stdout.trim()).toBe('quick');
91
+ });
92
+ });
93
+ describe('execAbortable — buffering', () => {
94
+ it('caps stdout buffer at maxBuffer', async () => {
95
+ // Generate 200 KB of stdout and cap buffer at 1 KB. The spawned
96
+ // process succeeds; buffer cap just truncates what we capture.
97
+ const result = await execAbortable(['sh', '-c', 'yes x | head -c 200000'], { maxBuffer: 1024 });
98
+ expect(result.stdout.length).toBeLessThanOrEqual(1024);
99
+ expect(result.exitCode).toBeDefined();
100
+ });
101
+ });
102
+ //# sourceMappingURL=abortable-exec.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortable-exec.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/abortable-exec.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,+CAA+C,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QACtD,MAAM,CAA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IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7E,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACzE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAC/C,gEAAgE;QAChE,+DAA+D;QAC/D,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,wBAAwB,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=check-config.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-config.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/check-config.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,56 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { validateCheckConfig } from '../check-config.js';
3
+ const BASE_CONFIG = {
4
+ id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
5
+ slug: 'test-check',
6
+ description: 'A test check',
7
+ tags: ['quality'],
8
+ analyze: () => [],
9
+ };
10
+ describe('validateCheckConfig', () => {
11
+ it('accepts a check with tags array', () => {
12
+ expect(() => validateCheckConfig(BASE_CONFIG)).not.toThrow();
13
+ });
14
+ it('rejects a check without tags', () => {
15
+ const config = { ...BASE_CONFIG, tags: undefined };
16
+ expect(() => validateCheckConfig(config)).toThrow();
17
+ });
18
+ it('rejects a check with empty tags array', () => {
19
+ const config = { ...BASE_CONFIG, tags: [] };
20
+ expect(() => validateCheckConfig(config)).toThrow();
21
+ });
22
+ it('accepts arbitrary tag strings', () => {
23
+ const config = { ...BASE_CONFIG, tags: ['custom-tag', 'another-one', 'cwe-89'] };
24
+ expect(() => validateCheckConfig(config)).not.toThrow();
25
+ });
26
+ it('validates all three analysis modes with tags', () => {
27
+ // analyze mode
28
+ expect(() => validateCheckConfig({
29
+ ...BASE_CONFIG,
30
+ analyze: (_content) => [],
31
+ })).not.toThrow();
32
+ // analyzeAll mode
33
+ // eslint-disable-next-line sonarjs/no-unused-vars -- destructure-omit pattern: drop `analyze` from spread copy
34
+ const { analyze: _, ...noAnalyze } = BASE_CONFIG;
35
+ expect(() => validateCheckConfig({
36
+ ...noAnalyze,
37
+ // eslint-disable-next-line @typescript-eslint/require-await -- arrow must match `(files: FileAccessor) => Promise<CheckViolation[]>`
38
+ analyzeAll: async () => [],
39
+ })).not.toThrow();
40
+ // command mode
41
+ expect(() => validateCheckConfig({
42
+ ...noAnalyze,
43
+ command: {
44
+ bin: 'echo',
45
+ args: [],
46
+ parseOutput: () => [],
47
+ },
48
+ })).not.toThrow();
49
+ });
50
+ it('rejects config without any analysis mode', () => {
51
+ // eslint-disable-next-line sonarjs/no-unused-vars -- destructure-omit pattern: drop `analyze` from spread copy
52
+ const { analyze: _, ...noMode } = BASE_CONFIG;
53
+ expect(() => validateCheckConfig(noMode)).toThrow();
54
+ });
55
+ });
56
+ //# sourceMappingURL=check-config.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-config.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/check-config.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,sCAAsC;IAC1C,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,cAAc;IAC3B,IAAI,EAAE,CAAC,SAAS,CAAC;IACjB,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;CAClB,CAAC;AAEF,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,MAAM,GAAG,EAAE,GAAG,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACnD,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,MAAM,GAAG,EAAE,GAAG,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAC5C,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACtD,CAAC,CAAC,C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,MAAM,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=check-types.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-types.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/check-types.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,76 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { collectCheckObjects, isCheck } from '../check-types.js';
3
+ import { defineCheck } from '../define-check.js';
4
+ const noopRun = () => null;
5
+ const checkA = defineCheck({
6
+ id: '11111111-1111-4111-8111-111111111111',
7
+ slug: 'check-a',
8
+ description: 'a',
9
+ tags: ['quality'],
10
+ analyze: () => [],
11
+ });
12
+ const checkB = defineCheck({
13
+ id: '22222222-2222-4222-8222-222222222222',
14
+ slug: 'check-b',
15
+ description: 'b',
16
+ tags: ['quality'],
17
+ analyze: () => [],
18
+ });
19
+ describe('isCheck', () => {
20
+ it('returns true for a Check produced by defineCheck', () => {
21
+ expect(isCheck(checkA)).toBe(true);
22
+ });
23
+ it('returns false for null / undefined / primitives', () => {
24
+ expect(isCheck(null)).toBe(false);
25
+ expect(isCheck(undefined)).toBe(false);
26
+ expect(isCheck(42)).toBe(false);
27
+ expect(isCheck('check')).toBe(false);
28
+ });
29
+ it('returns false for an object missing config.execute', () => {
30
+ expect(isCheck({ config: { id: 'x', slug: 'y' }, run: noopRun })).toBe(false);
31
+ });
32
+ });
33
+ describe('collectCheckObjects', () => {
34
+ it('returns a flat list of Check instances from a flat barrel', () => {
35
+ const out = collectCheckObjects({ checkA, checkB });
36
+ expect(out).toHaveLength(2);
37
+ expect(new Set(out.map((c) => c.config.slug))).toEqual(new Set(['check-a', 'check-b']));
38
+ });
39
+ it('recurses into nested object exports', () => {
40
+ const out = collectCheckObjects({
41
+ quality: { checkA },
42
+ security: { nested: { checkB } },
43
+ });
44
+ expect(out).toHaveLength(2);
45
+ });
46
+ it('deduplicates by config.id when the same check appears multiple times', () => {
47
+ const out = collectCheckObjects({
48
+ direct: checkA,
49
+ reExport: checkA,
50
+ nested: { checkA },
51
+ });
52
+ expect(out).toHaveLength(1);
53
+ expect(out[0]?.config.slug).toBe('check-a');
54
+ });
55
+ it('skips non-Check values (numbers, arrays, primitives)', () => {
56
+ const out = collectCheckObjects({
57
+ checkA,
58
+ meta: 'description',
59
+ version: 1,
60
+ // Arrays must NOT be traversed — they are typically the `checks`
61
+ // re-export the loader handles separately.
62
+ checksArray: [checkB],
63
+ });
64
+ expect(out).toHaveLength(1);
65
+ expect(out[0]?.config.slug).toBe('check-a');
66
+ });
67
+ it('threads a shared seen set across multiple calls', () => {
68
+ const seen = new Set();
69
+ const first = collectCheckObjects({ checkA }, seen);
70
+ const second = collectCheckObjects({ checkA, checkB }, seen);
71
+ expect(first).toHaveLength(1);
72
+ expect(second).toHaveLength(1);
73
+ expect(second[0]?.config.slug).toBe('check-b');
74
+ });
75
+ });
76
+ //# sourceMappingURL=check-types.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-types.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/check-types.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,OAAO,GAAG,GAAS,EAAE,CAAC,IAAI,CAAC;AAEjC,MAAM,MAAM,GAAG,WAAW,CAAC;IACzB,EAAE,EAAE,sCAAsC;IAC1C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,GAAG;IAChB,IAAI,EAAE,CAAC,SAAS,CAAC;IACjB,OAAO,EAAE,GAAG,EAA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,EAAE,CAAC,MAAM,CAAC;SACtB,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,MAAM,KAAK,GAAG,mBAAmB,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;QACpD,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;QAC7D,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=command-executor.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-executor.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/command-executor.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,110 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { executeCommand } from '../command-executor.js';
3
+ const cwd = process.cwd();
4
+ describe('executeCommand', () => {
5
+ it('runs a command with array args and parses stdout', async () => {
6
+ const config = {
7
+ bin: 'echo',
8
+ args: ['hello'],
9
+ parseOutput: (stdout) => [
10
+ {
11
+ line: 1,
12
+ message: stdout.trim(),
13
+ severity: 'warning',
14
+ },
15
+ ],
16
+ };
17
+ const result = await executeCommand(config, [], { cwd });
18
+ expect(result.aborted).toBe(false);
19
+ expect(result.exitCode).toBe(0);
20
+ expect(result.violations).toHaveLength(1);
21
+ expect(result.violations[0]?.message).toBe('hello');
22
+ });
23
+ it('runs a command with function args derived from files', async () => {
24
+ const config = {
25
+ bin: 'echo',
26
+ args: (files) => [`got-${files.length}`],
27
+ parseOutput: (stdout) => [
28
+ {
29
+ line: 1,
30
+ message: stdout.trim(),
31
+ severity: 'warning',
32
+ },
33
+ ],
34
+ };
35
+ const result = await executeCommand(config, ['a', 'b', 'c'], { cwd });
36
+ expect(result.violations[0]?.message).toBe('got-3');
37
+ });
38
+ it('returns an error when the bin is not installed (ENOENT)', async () => {
39
+ const config = {
40
+ bin: 'definitely-not-a-real-binary-xyz123',
41
+ args: [],
42
+ parseOutput: () => [],
43
+ };
44
+ const result = await executeCommand(config, [], { cwd });
45
+ expect(result.error).toContain('not installed');
46
+ expect(result.violations).toEqual([]);
47
+ });
48
+ it('returns an error when exit code is unexpected', async () => {
49
+ const config = {
50
+ bin: 'sh',
51
+ args: ['-c', 'exit 5'],
52
+ parseOutput: () => [],
53
+ expectedExitCodes: [0],
54
+ };
55
+ const result = await executeCommand(config, [], { cwd });
56
+ expect(result.error).toContain('unexpected code 5');
57
+ expect(result.violations).toEqual([]);
58
+ });
59
+ it('honors expectedExitCodes when set', async () => {
60
+ const config = {
61
+ bin: 'sh',
62
+ args: ['-c', 'echo done; exit 1'],
63
+ parseOutput: (stdout) => [
64
+ {
65
+ line: 1,
66
+ message: stdout.trim(),
67
+ severity: 'warning',
68
+ },
69
+ ],
70
+ expectedExitCodes: [0, 1],
71
+ };
72
+ const result = await executeCommand(config, [], { cwd });
73
+ expect(result.violations).toHaveLength(1);
74
+ expect(result.exitCode).toBe(1);
75
+ });
76
+ it('returns aborted=true when the abort signal fires mid-run', async () => {
77
+ const ctrl = new AbortController();
78
+ const config = {
79
+ bin: 'sh',
80
+ args: ['-c', 'sleep 5'],
81
+ parseOutput: () => [],
82
+ };
83
+ setTimeout(() => ctrl.abort(), 30);
84
+ const result = await executeCommand(config, [], { cwd, signal: ctrl.signal });
85
+ expect(result.aborted).toBe(true);
86
+ expect(result.violations).toEqual([]);
87
+ });
88
+ it('reports "not installed" via shell-mode 127 when the bin exits 127', async () => {
89
+ const config = {
90
+ bin: 'sh',
91
+ args: ['-c', 'exit 127'],
92
+ parseOutput: () => [],
93
+ };
94
+ const result = await executeCommand(config, [], { cwd });
95
+ expect(result.exitCode).toBe(127);
96
+ expect(result.error).toContain('not installed');
97
+ });
98
+ it('truncates very long stderr in error messages', async () => {
99
+ const config = {
100
+ bin: 'sh',
101
+ args: ['-c', 'yes x | head -c 1000 1>&2; exit 5'],
102
+ parseOutput: () => [],
103
+ expectedExitCodes: [0],
104
+ };
105
+ const result = await executeCommand(config, [], { cwd });
106
+ expect(result.error).toContain('unexpected code 5');
107
+ expect(result.error).toContain('truncated');
108
+ });
109
+ });
110
+ //# sourceMappingURL=command-executor.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-executor.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/command-executor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAE1B,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,kDAAkD,EAAE,KAAK,IAAI,EAAE;QAChE,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,CAAC,OAAO,CAAC;YACf,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;gBACvB;oBACE,IAAI,EAAE,CAAC;oBACP,OAAO,EAAE,MAAM,CAAC,IAAI,EA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,EAAE,CAAC,CAAC;QACzD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC5D,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,IAAI;YACT,IAAI,EAAE,CAAC,IAAI,EAAE,mCAAmC,CAAC;YACjD,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE;YACrB,iBAAiB,EAAE,CAAC,CAAC,CAAC;SACvB,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACzD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=content-filter-dispatch.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-filter-dispatch.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/content-filter-dispatch.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @fileoverview Pin the contentFilter dispatch in define-check.ts and
3
+ * file-accessor.ts. Two modes are intentional and distinct:
4
+ *
5
+ * - `strip-strings` → strings blanked, COMMENTS PRESERVED.
6
+ * Use when a rule reads comment markers
7
+ * (e.g. `// @swallow-ok`).
8
+ * - `strip-strings-and-comments` → both blanked. Use when the same
9
+ * forbidden phrase could appear in a
10
+ * comment and would false-fire.
11
+ *
12
+ * Mixing them was the bug behind a 2026-05-05 mis-fix that mapped both
13
+ * modes to codeNoComments, breaking every rule that scans comments for
14
+ * directives. This test pins the contract.
15
+ *
16
+ * The legacy `'code-only'` / `'no-strings-no-comments'` aliases were
17
+ * removed in 0.5.0; this file used to assert the alias mapping and now
18
+ * just asserts the canonical names.
19
+ */
20
+ import { mkdtemp, writeFile } from 'node:fs/promises';
21
+ import { tmpdir } from 'node:os';
22
+ import { join } from 'node:path';
23
+ import { LanguageRegistry, RunScope, runWithScope } from '@opensip-cli/core';
24
+ import { filterContent } from '@opensip-cli/lang-typescript';
25
+ import { beforeAll, describe, expect, it } from 'vitest';
26
+ import { createFileAccessor } from '../file-accessor.js';
27
+ // FileAccessor.read dispatches strip via the registered LanguageAdapter
28
+ // for the file's extension. Register a minimal TS adapter for the test
29
+ // scope so the dispatch resolves and the existing core filterContent
30
+ // implementation produces the expected output. Lang packages live in
31
+ // their own workspaces and core can't depend on @opensip-cli/lang-typescript
32
+ // directly without creating a cycle.
33
+ const inProcessTypescriptAdapter = {
34
+ id: 'typescript-test-shim',
35
+ fileExtensions: ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'],
36
+ parse: () => null,
37
+ stripStrings: (s) => filterContent(s).code,
38
+ stripComments: (s) => filterContent(s).codeNoComments,
39
+ };
40
+ let scope;
41
+ beforeAll(() => {
42
+ const reg = new LanguageRegistry();
43
+ reg.register(inProcessTypescriptAdapter);
44
+ scope = new RunScope({ languages: reg });
45
+ });
46
+ function inScope(fn) {
47
+ return runWithScope(scope, fn);
48
+ }
49
+ async function writeTempFile(content) {
50
+ const dir = await mkdtemp(join(tmpdir(), 'cf-dispatch-'));
51
+ const filePath = join(dir, 'sample.ts');
52
+ await writeFile(filePath, content, 'utf8');
53
+ return filePath;
54
+ }
55
+ describe('FileAccessor contentFilter dispatch', () => {
56
+ describe('strip-strings — strings blanked, comments preserved', () => {
57
+ it('preserves line-comment text so rules can scan markers', async () => {
58
+ await inScope(async () => {
59
+ const filePath = await writeTempFile(`const a = 1\n// @swallow-ok intentional fallthrough\nconst b = 2`);
60
+ const accessor = createFileAccessor([filePath], { contentFilter: 'strip-strings' });
61
+ const content = await accessor.read(filePath);
62
+ expect(content).toContain('@swallow-ok');
63
+ expect(content).toContain('const a = 1');
64
+ expect(content).toContain('const b = 2');
65
+ });
66
+ });
67
+ it('preserves block-comment text including JSDoc directives', async () => {
68
+ await inScope(async () => {
69
+ const filePath = await writeTempFile(`/** @deprecated use Y instead */\nexport function legacy() {}`);
70
+ const accessor = createFileAccessor([filePath], { contentFilter: 'strip-strings' });
71
+ const content = await accessor.read(filePath);
72
+ expect(content).toContain('@deprecated');
73
+ expect(content).toContain('export function legacy');
74
+ });
75
+ });
76
+ it('blanks string-literal contents', async () => {
77
+ await inScope(async () => {
78
+ const filePath = await writeTempFile(`const url = 'phrase_in_string'`);
79
+ const accessor = createFileAccessor([filePath], { contentFilter: 'strip-strings' });
80
+ const content = await accessor.read(filePath);
81
+ expect(content).not.toContain('phrase_in_string');
82
+ expect(content).toContain('const url = ');
83
+ });
84
+ });
85
+ });
86
+ describe('strip-strings-and-comments — both blanked', () => {
87
+ it("blanks comment text so rules don't false-fire on prose", async () => {
88
+ await inScope(async () => {
89
+ const filePath = await writeTempFile(`const a = 1\n// forbidden_phrase_in_comment\nconst b = 2`);
90
+ const accessor = createFileAccessor([filePath], {
91
+ contentFilter: 'strip-strings-and-comments',
92
+ });
93
+ const content = await accessor.read(filePath);
94
+ expect(content).not.toContain('forbidden_phrase_in_comment');
95
+ expect(content).toContain('const a = 1');
96
+ expect(content).toContain('const b = 2');
97
+ });
98
+ });
99
+ it('blanks both strings and comments in the same content', async () => {
100
+ await inScope(async () => {
101
+ const filePath = await writeTempFile(`const url = 'phrase_in_string' // phrase_in_comment`);
102
+ const accessor = createFileAccessor([filePath], {
103
+ contentFilter: 'strip-strings-and-comments',
104
+ });
105
+ const content = await accessor.read(filePath);
106
+ expect(content).not.toContain('phrase_in_string');
107
+ expect(content).not.toContain('phrase_in_comment');
108
+ });
109
+ });
110
+ });
111
+ describe('default (raw) — no filter applied', () => {
112
+ it('preserves both strings and comments verbatim', async () => {
113
+ // raw passthrough doesn't need a scope; applyContentFilter short-circuits.
114
+ const src = `const url = 'phrase'\n// also phrase`;
115
+ const filePath = await writeTempFile(src);
116
+ const accessor = createFileAccessor([filePath]); // no contentFilter → raw passthrough
117
+ const content = await accessor.read(filePath);
118
+ expect(content).toBe(src);
119
+ });
120
+ });
121
+ });
122
+ //# sourceMappingURL=content-filter-dispatch.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-filter-dispatch.test.js","sourceRoot":"","sources":["../../../src/framework/__tests__/content-filter-dispatch.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,wEAAwE;AACxE,uEAAuE;AACvE,qEAAqE;AACrE,qEAAqE;AACrE,6EAA6E;AAC7E,qCAAqC;AACrC,MAAM,0BAA0B,GAAoB;IAClD,EAAE,EAAE,sBAAsB;IAC1B,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAC9D,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;IACjB,YAAY,EAAE,CAAC,CAAC,EAAE,EA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O,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;QACjD,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;YAC5D,2EAA2E;YAC3E,MAAM,GAAG,GAAG,sCAAsC,CAAC;YACnD,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC;YAC1C,MAAM,QAAQ,GAAG,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qCAAqC;YACtF,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAE9C,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=define-check.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-check.test.d.ts","sourceRoot":"","sources":["../../../src/framework/__tests__/define-check.test.ts"],"names":[],"mappings":""}