@nielspeter/eess-ts 0.2.0 → 0.4.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 (433) hide show
  1. package/README.md +87 -34
  2. package/dist/builders/call-rule-builder.d.ts +66 -26
  3. package/dist/builders/call-rule-builder.d.ts.map +1 -1
  4. package/dist/builders/call-rule-builder.js +73 -31
  5. package/dist/builders/call-rule-builder.js.map +1 -1
  6. package/dist/builders/class-rule-builder.d.ts +125 -26
  7. package/dist/builders/class-rule-builder.d.ts.map +1 -1
  8. package/dist/builders/class-rule-builder.js +134 -30
  9. package/dist/builders/class-rule-builder.js.map +1 -1
  10. package/dist/builders/correspondence-builder.d.ts +287 -0
  11. package/dist/builders/correspondence-builder.d.ts.map +1 -0
  12. package/dist/builders/correspondence-builder.js +393 -0
  13. package/dist/builders/correspondence-builder.js.map +1 -0
  14. package/dist/builders/correspondence-findings.d.ts +104 -0
  15. package/dist/builders/correspondence-findings.d.ts.map +1 -0
  16. package/dist/builders/correspondence-findings.js +301 -0
  17. package/dist/builders/correspondence-findings.js.map +1 -0
  18. package/dist/builders/cross-layer-builder.d.ts +99 -16
  19. package/dist/builders/cross-layer-builder.d.ts.map +1 -1
  20. package/dist/builders/cross-layer-builder.js +181 -35
  21. package/dist/builders/cross-layer-builder.js.map +1 -1
  22. package/dist/builders/function-rule-builder.d.ts +144 -25
  23. package/dist/builders/function-rule-builder.d.ts.map +1 -1
  24. package/dist/builders/function-rule-builder.js +173 -26
  25. package/dist/builders/function-rule-builder.js.map +1 -1
  26. package/dist/builders/jsx-rule-builder.d.ts +70 -14
  27. package/dist/builders/jsx-rule-builder.d.ts.map +1 -1
  28. package/dist/builders/jsx-rule-builder.js +73 -14
  29. package/dist/builders/jsx-rule-builder.js.map +1 -1
  30. package/dist/builders/module-rule-builder.d.ts +2 -2
  31. package/dist/builders/module-rule-builder.d.ts.map +1 -1
  32. package/dist/builders/module-rule-builder.js +12 -3
  33. package/dist/builders/module-rule-builder.js.map +1 -1
  34. package/dist/builders/scoped-function-rule-builder.d.ts +11 -0
  35. package/dist/builders/scoped-function-rule-builder.d.ts.map +1 -1
  36. package/dist/builders/scoped-function-rule-builder.js +12 -0
  37. package/dist/builders/scoped-function-rule-builder.js.map +1 -1
  38. package/dist/builders/slice-discovery-message.d.ts +36 -0
  39. package/dist/builders/slice-discovery-message.d.ts.map +1 -0
  40. package/dist/builders/slice-discovery-message.js +181 -0
  41. package/dist/builders/slice-discovery-message.js.map +1 -0
  42. package/dist/builders/slice-rule-builder.d.ts +151 -12
  43. package/dist/builders/slice-rule-builder.d.ts.map +1 -1
  44. package/dist/builders/slice-rule-builder.js +242 -35
  45. package/dist/builders/slice-rule-builder.js.map +1 -1
  46. package/dist/builders/type-rule-builder.d.ts +95 -24
  47. package/dist/builders/type-rule-builder.d.ts.map +1 -1
  48. package/dist/builders/type-rule-builder.js +105 -29
  49. package/dist/builders/type-rule-builder.js.map +1 -1
  50. package/dist/{helpers → builders}/within.d.ts +2 -2
  51. package/dist/builders/within.d.ts.map +1 -0
  52. package/dist/{helpers → builders}/within.js +1 -1
  53. package/dist/builders/within.js.map +1 -0
  54. package/dist/cli/commands/baseline.d.ts +3 -2
  55. package/dist/cli/commands/baseline.d.ts.map +1 -1
  56. package/dist/cli/commands/baseline.js +68 -6
  57. package/dist/cli/commands/baseline.js.map +1 -1
  58. package/dist/cli/commands/check.d.ts +7 -2
  59. package/dist/cli/commands/check.d.ts.map +1 -1
  60. package/dist/cli/commands/check.js +241 -45
  61. package/dist/cli/commands/check.js.map +1 -1
  62. package/dist/cli/commands/doctor.d.ts +29 -0
  63. package/dist/cli/commands/doctor.d.ts.map +1 -0
  64. package/dist/cli/commands/doctor.js +224 -0
  65. package/dist/cli/commands/doctor.js.map +1 -0
  66. package/dist/cli/commands/explain.d.ts +2 -1
  67. package/dist/cli/commands/explain.d.ts.map +1 -1
  68. package/dist/cli/commands/explain.js +19 -10
  69. package/dist/cli/commands/explain.js.map +1 -1
  70. package/dist/cli/commands/init.d.ts +9 -3
  71. package/dist/cli/commands/init.d.ts.map +1 -1
  72. package/dist/cli/commands/init.js +162 -137
  73. package/dist/cli/commands/init.js.map +1 -1
  74. package/dist/cli/import-rule-module.d.ts +29 -0
  75. package/dist/cli/import-rule-module.d.ts.map +1 -0
  76. package/dist/cli/import-rule-module.js +60 -0
  77. package/dist/cli/import-rule-module.js.map +1 -0
  78. package/dist/cli/index.d.ts +2 -2
  79. package/dist/cli/index.d.ts.map +1 -1
  80. package/dist/cli/index.js +98 -33
  81. package/dist/cli/index.js.map +1 -1
  82. package/dist/cli/load-rules.d.ts +6 -11
  83. package/dist/cli/load-rules.d.ts.map +1 -1
  84. package/dist/cli/load-rules.js +21 -29
  85. package/dist/cli/load-rules.js.map +1 -1
  86. package/dist/cli/resolve-config.d.ts.map +1 -1
  87. package/dist/cli/resolve-config.js +24 -14
  88. package/dist/cli/resolve-config.js.map +1 -1
  89. package/dist/cli/rule-file-findings.d.ts +178 -0
  90. package/dist/cli/rule-file-findings.d.ts.map +1 -0
  91. package/dist/cli/rule-file-findings.js +293 -0
  92. package/dist/cli/rule-file-findings.js.map +1 -0
  93. package/dist/cli/watch.d.ts +20 -7
  94. package/dist/cli/watch.d.ts.map +1 -1
  95. package/dist/cli/watch.js +39 -14
  96. package/dist/cli/watch.js.map +1 -1
  97. package/dist/conditions/body-analysis-function.d.ts.map +1 -1
  98. package/dist/conditions/body-analysis-function.js +16 -7
  99. package/dist/conditions/body-analysis-function.js.map +1 -1
  100. package/dist/conditions/body-analysis-module.d.ts.map +1 -1
  101. package/dist/conditions/body-analysis-module.js +14 -9
  102. package/dist/conditions/body-analysis-module.js.map +1 -1
  103. package/dist/conditions/body-analysis.d.ts.map +1 -1
  104. package/dist/conditions/body-analysis.js +16 -7
  105. package/dist/conditions/body-analysis.js.map +1 -1
  106. package/dist/conditions/call.d.ts.map +1 -1
  107. package/dist/conditions/call.js +38 -17
  108. package/dist/conditions/call.js.map +1 -1
  109. package/dist/conditions/catch-analysis.d.ts +2 -1
  110. package/dist/conditions/catch-analysis.d.ts.map +1 -1
  111. package/dist/conditions/catch-analysis.js.map +1 -1
  112. package/dist/conditions/cross-layer.d.ts +2 -10
  113. package/dist/conditions/cross-layer.d.ts.map +1 -1
  114. package/dist/conditions/cross-layer.js +227 -23
  115. package/dist/conditions/cross-layer.js.map +1 -1
  116. package/dist/conditions/dependency.d.ts +35 -6
  117. package/dist/conditions/dependency.d.ts.map +1 -1
  118. package/dist/conditions/dependency.js +299 -45
  119. package/dist/conditions/dependency.js.map +1 -1
  120. package/dist/conditions/exports.d.ts.map +1 -1
  121. package/dist/conditions/exports.js +10 -0
  122. package/dist/conditions/exports.js.map +1 -1
  123. package/dist/conditions/function.d.ts.map +1 -1
  124. package/dist/conditions/function.js +19 -5
  125. package/dist/conditions/function.js.map +1 -1
  126. package/dist/conditions/helpers.d.ts +2 -1
  127. package/dist/conditions/helpers.d.ts.map +1 -1
  128. package/dist/conditions/helpers.js +4 -1
  129. package/dist/conditions/helpers.js.map +1 -1
  130. package/dist/conditions/jsx.d.ts.map +1 -1
  131. package/dist/conditions/jsx.js +7 -2
  132. package/dist/conditions/jsx.js.map +1 -1
  133. package/dist/conditions/match-identity.d.ts +43 -0
  134. package/dist/conditions/match-identity.d.ts.map +1 -0
  135. package/dist/conditions/match-identity.js +43 -0
  136. package/dist/conditions/match-identity.js.map +1 -0
  137. package/dist/conditions/members.d.ts.map +1 -1
  138. package/dist/conditions/members.js +17 -4
  139. package/dist/conditions/members.js.map +1 -1
  140. package/dist/conditions/reverse-dependency.d.ts +18 -5
  141. package/dist/conditions/reverse-dependency.d.ts.map +1 -1
  142. package/dist/conditions/reverse-dependency.js +109 -92
  143. package/dist/conditions/reverse-dependency.js.map +1 -1
  144. package/dist/conditions/slice.d.ts +86 -2
  145. package/dist/conditions/slice.d.ts.map +1 -1
  146. package/dist/conditions/slice.js +234 -53
  147. package/dist/conditions/slice.js.map +1 -1
  148. package/dist/conditions/structural.d.ts.map +1 -1
  149. package/dist/conditions/structural.js +16 -4
  150. package/dist/conditions/structural.js.map +1 -1
  151. package/dist/core/check-all.d.ts +19 -0
  152. package/dist/core/check-all.d.ts.map +1 -0
  153. package/dist/core/check-all.js +96 -0
  154. package/dist/core/check-all.js.map +1 -0
  155. package/dist/core/combinators.d.ts +48 -0
  156. package/dist/core/combinators.d.ts.map +1 -0
  157. package/dist/core/combinators.js +56 -0
  158. package/dist/core/combinators.js.map +1 -0
  159. package/dist/core/descendant-cache.d.ts +36 -0
  160. package/dist/core/descendant-cache.d.ts.map +1 -0
  161. package/dist/core/descendant-cache.js +119 -0
  162. package/dist/core/descendant-cache.js.map +1 -0
  163. package/dist/core/diagnose.d.ts +234 -0
  164. package/dist/core/diagnose.d.ts.map +1 -0
  165. package/dist/core/diagnose.js +382 -0
  166. package/dist/core/diagnose.js.map +1 -0
  167. package/dist/core/disk-set.d.ts +48 -0
  168. package/dist/core/disk-set.d.ts.map +1 -0
  169. package/dist/core/disk-set.js +218 -0
  170. package/dist/core/disk-set.js.map +1 -0
  171. package/dist/core/element-cache.d.ts +75 -0
  172. package/dist/core/element-cache.d.ts.map +1 -0
  173. package/dist/core/element-cache.js +32 -0
  174. package/dist/core/element-cache.js.map +1 -0
  175. package/dist/core/empty-project-advice.d.ts +75 -0
  176. package/dist/core/empty-project-advice.d.ts.map +1 -0
  177. package/dist/core/empty-project-advice.js +61 -0
  178. package/dist/core/empty-project-advice.js.map +1 -0
  179. package/dist/core/exclusion-comments.d.ts +54 -0
  180. package/dist/core/exclusion-comments.d.ts.map +1 -0
  181. package/dist/core/exclusion-comments.js +310 -0
  182. package/dist/core/exclusion-comments.js.map +1 -0
  183. package/dist/core/execute-rule.d.ts +150 -0
  184. package/dist/core/execute-rule.d.ts.map +1 -0
  185. package/dist/core/execute-rule.js +580 -0
  186. package/dist/core/execute-rule.js.map +1 -0
  187. package/dist/core/glob-diagnosis.d.ts +78 -0
  188. package/dist/core/glob-diagnosis.d.ts.map +1 -0
  189. package/dist/core/glob-diagnosis.js +134 -0
  190. package/dist/core/glob-diagnosis.js.map +1 -0
  191. package/dist/core/glob-evaluator.d.ts +48 -0
  192. package/dist/core/glob-evaluator.d.ts.map +1 -0
  193. package/dist/core/glob-evaluator.js +89 -0
  194. package/dist/core/glob-evaluator.js.map +1 -0
  195. package/dist/core/import-candidates.d.ts +60 -0
  196. package/dist/core/import-candidates.d.ts.map +1 -0
  197. package/dist/core/import-candidates.js +93 -0
  198. package/dist/core/import-candidates.js.map +1 -0
  199. package/dist/core/import-options.d.ts +55 -2
  200. package/dist/core/import-options.d.ts.map +1 -1
  201. package/dist/core/import-options.js +64 -0
  202. package/dist/core/import-options.js.map +1 -1
  203. package/dist/core/line-index.d.ts +3 -0
  204. package/dist/core/line-index.d.ts.map +1 -0
  205. package/dist/core/line-index.js +229 -0
  206. package/dist/core/line-index.js.map +1 -0
  207. package/dist/core/metric-violation.d.ts +86 -0
  208. package/dist/core/metric-violation.d.ts.map +1 -0
  209. package/dist/core/metric-violation.js +132 -0
  210. package/dist/core/metric-violation.js.map +1 -0
  211. package/dist/core/module-edges.d.ts +361 -0
  212. package/dist/core/module-edges.d.ts.map +1 -0
  213. package/dist/core/module-edges.js +592 -0
  214. package/dist/core/module-edges.js.map +1 -0
  215. package/dist/core/object-literal-functions.d.ts +42 -0
  216. package/dist/core/object-literal-functions.d.ts.map +1 -0
  217. package/dist/core/object-literal-functions.js +75 -0
  218. package/dist/core/object-literal-functions.js.map +1 -0
  219. package/dist/core/orphan-exclusions.d.ts +44 -0
  220. package/dist/core/orphan-exclusions.d.ts.map +1 -0
  221. package/dist/core/orphan-exclusions.js +214 -0
  222. package/dist/core/orphan-exclusions.js.map +1 -0
  223. package/dist/core/pair-condition.d.ts +32 -3
  224. package/dist/core/pair-condition.d.ts.map +1 -1
  225. package/dist/core/path-universe.d.ts +54 -0
  226. package/dist/core/path-universe.d.ts.map +1 -0
  227. package/dist/core/path-universe.js +65 -0
  228. package/dist/core/path-universe.js.map +1 -0
  229. package/dist/core/per-root-compiler-options.d.ts +20 -0
  230. package/dist/core/per-root-compiler-options.d.ts.map +1 -0
  231. package/dist/core/per-root-compiler-options.js +57 -0
  232. package/dist/core/per-root-compiler-options.js.map +1 -0
  233. package/dist/core/project-relative.d.ts +98 -0
  234. package/dist/core/project-relative.d.ts.map +1 -0
  235. package/dist/core/project-relative.js +185 -0
  236. package/dist/core/project-relative.js.map +1 -0
  237. package/dist/core/project.d.ts +7 -1
  238. package/dist/core/project.d.ts.map +1 -1
  239. package/dist/core/project.js +24 -0
  240. package/dist/core/project.js.map +1 -1
  241. package/dist/core/rule-builder.d.ts +282 -0
  242. package/dist/core/rule-builder.d.ts.map +1 -0
  243. package/dist/core/rule-builder.js +445 -0
  244. package/dist/core/rule-builder.js.map +1 -0
  245. package/dist/core/rule-declaration.d.ts +32 -0
  246. package/dist/core/rule-declaration.d.ts.map +1 -0
  247. package/dist/core/rule-declaration.js +126 -0
  248. package/dist/core/rule-declaration.js.map +1 -0
  249. package/dist/core/terminal-builder.d.ts +625 -0
  250. package/dist/core/terminal-builder.d.ts.map +1 -0
  251. package/dist/core/terminal-builder.js +787 -0
  252. package/dist/core/terminal-builder.js.map +1 -0
  253. package/dist/core/terminal-execution.d.ts +23 -0
  254. package/dist/core/terminal-execution.d.ts.map +1 -0
  255. package/dist/core/terminal-execution.js +71 -0
  256. package/dist/core/terminal-execution.js.map +1 -0
  257. package/dist/core/vacuity-diagnosis.d.ts +103 -0
  258. package/dist/core/vacuity-diagnosis.d.ts.map +1 -0
  259. package/dist/core/vacuity-diagnosis.js +415 -0
  260. package/dist/core/vacuity-diagnosis.js.map +1 -0
  261. package/dist/core/violation.d.ts +16 -11
  262. package/dist/core/violation.d.ts.map +1 -1
  263. package/dist/core/violation.js +33 -13
  264. package/dist/core/violation.js.map +1 -1
  265. package/dist/graphql/index.js +1 -1
  266. package/dist/graphql/index.js.map +1 -1
  267. package/dist/graphql/resolver-rule-builder.d.ts +98 -23
  268. package/dist/graphql/resolver-rule-builder.d.ts.map +1 -1
  269. package/dist/graphql/resolver-rule-builder.js +151 -21
  270. package/dist/graphql/resolver-rule-builder.js.map +1 -1
  271. package/dist/graphql/schema-loader.d.ts +21 -0
  272. package/dist/graphql/schema-loader.d.ts.map +1 -1
  273. package/dist/graphql/schema-loader.js +81 -12
  274. package/dist/graphql/schema-loader.js.map +1 -1
  275. package/dist/graphql/schema-rule-builder.d.ts +57 -20
  276. package/dist/graphql/schema-rule-builder.d.ts.map +1 -1
  277. package/dist/graphql/schema-rule-builder.js +101 -25
  278. package/dist/graphql/schema-rule-builder.js.map +1 -1
  279. package/dist/helpers/baseline-diagnostics.d.ts +45 -0
  280. package/dist/helpers/baseline-diagnostics.d.ts.map +1 -0
  281. package/dist/helpers/baseline-diagnostics.js +168 -0
  282. package/dist/helpers/baseline-diagnostics.js.map +1 -0
  283. package/dist/helpers/baseline-generator.d.ts +19 -0
  284. package/dist/helpers/baseline-generator.d.ts.map +1 -0
  285. package/dist/helpers/baseline-generator.js +18 -0
  286. package/dist/helpers/baseline-generator.js.map +1 -0
  287. package/dist/helpers/baseline.d.ts +336 -0
  288. package/dist/helpers/baseline.d.ts.map +1 -0
  289. package/dist/helpers/baseline.js +664 -0
  290. package/dist/helpers/baseline.js.map +1 -0
  291. package/dist/helpers/body-traversal.d.ts +27 -2
  292. package/dist/helpers/body-traversal.d.ts.map +1 -1
  293. package/dist/helpers/body-traversal.js +122 -16
  294. package/dist/helpers/body-traversal.js.map +1 -1
  295. package/dist/helpers/callback-extractor.d.ts.map +1 -1
  296. package/dist/helpers/callback-extractor.js +48 -47
  297. package/dist/helpers/callback-extractor.js.map +1 -1
  298. package/dist/helpers/complexity.d.ts +13 -5
  299. package/dist/helpers/complexity.d.ts.map +1 -1
  300. package/dist/helpers/complexity.js +15 -6
  301. package/dist/helpers/complexity.js.map +1 -1
  302. package/dist/helpers/diff-aware.d.ts +44 -0
  303. package/dist/helpers/diff-aware.d.ts.map +1 -0
  304. package/dist/helpers/diff-aware.js +84 -0
  305. package/dist/helpers/diff-aware.js.map +1 -0
  306. package/dist/helpers/matchers.d.ts +68 -7
  307. package/dist/helpers/matchers.d.ts.map +1 -1
  308. package/dist/helpers/matchers.js +114 -20
  309. package/dist/helpers/matchers.js.map +1 -1
  310. package/dist/helpers/slice-graph.d.ts +100 -8
  311. package/dist/helpers/slice-graph.d.ts.map +1 -1
  312. package/dist/helpers/slice-graph.js +126 -34
  313. package/dist/helpers/slice-graph.js.map +1 -1
  314. package/dist/helpers/tarjan.d.ts +0 -14
  315. package/dist/helpers/tarjan.d.ts.map +1 -1
  316. package/dist/helpers/tarjan.js +29 -16
  317. package/dist/helpers/tarjan.js.map +1 -1
  318. package/dist/index.d.ts +56 -17
  319. package/dist/index.d.ts.map +1 -1
  320. package/dist/index.js +57 -13
  321. package/dist/index.js.map +1 -1
  322. package/dist/models/arch-call.d.ts +3 -2
  323. package/dist/models/arch-call.d.ts.map +1 -1
  324. package/dist/models/arch-call.js.map +1 -1
  325. package/dist/models/arch-function.d.ts +28 -6
  326. package/dist/models/arch-function.d.ts.map +1 -1
  327. package/dist/models/arch-function.js +106 -3
  328. package/dist/models/arch-function.js.map +1 -1
  329. package/dist/models/arch-jsx-element.js +2 -2
  330. package/dist/models/arch-jsx-element.js.map +1 -1
  331. package/dist/models/slice.d.ts +33 -9
  332. package/dist/models/slice.d.ts.map +1 -1
  333. package/dist/models/slice.js +129 -19
  334. package/dist/models/slice.js.map +1 -1
  335. package/dist/predicates/call.d.ts.map +1 -1
  336. package/dist/predicates/call.js +5 -0
  337. package/dist/predicates/call.js.map +1 -1
  338. package/dist/predicates/identity.d.ts +21 -0
  339. package/dist/predicates/identity.d.ts.map +1 -1
  340. package/dist/predicates/identity.js +75 -3
  341. package/dist/predicates/identity.js.map +1 -1
  342. package/dist/predicates/index.d.ts +1 -1
  343. package/dist/predicates/index.d.ts.map +1 -1
  344. package/dist/predicates/index.js +1 -1
  345. package/dist/predicates/index.js.map +1 -1
  346. package/dist/predicates/metrics.d.ts +4 -2
  347. package/dist/predicates/metrics.d.ts.map +1 -1
  348. package/dist/predicates/metrics.js +4 -2
  349. package/dist/predicates/metrics.js.map +1 -1
  350. package/dist/predicates/module.d.ts +4 -12
  351. package/dist/predicates/module.d.ts.map +1 -1
  352. package/dist/predicates/module.js +57 -37
  353. package/dist/predicates/module.js.map +1 -1
  354. package/dist/presets/agent-guardrails.d.ts +22 -15
  355. package/dist/presets/agent-guardrails.d.ts.map +1 -1
  356. package/dist/presets/agent-guardrails.js +124 -19
  357. package/dist/presets/agent-guardrails.js.map +1 -1
  358. package/dist/presets/boundaries.d.ts +45 -2
  359. package/dist/presets/boundaries.d.ts.map +1 -1
  360. package/dist/presets/boundaries.js +132 -23
  361. package/dist/presets/boundaries.js.map +1 -1
  362. package/dist/presets/data-layer.d.ts +22 -2
  363. package/dist/presets/data-layer.d.ts.map +1 -1
  364. package/dist/presets/data-layer.js +58 -16
  365. package/dist/presets/data-layer.js.map +1 -1
  366. package/dist/presets/index.d.ts +7 -5
  367. package/dist/presets/index.d.ts.map +1 -1
  368. package/dist/presets/index.js +9 -3
  369. package/dist/presets/index.js.map +1 -1
  370. package/dist/presets/layered.d.ts +46 -2
  371. package/dist/presets/layered.d.ts.map +1 -1
  372. package/dist/presets/layered.js +66 -29
  373. package/dist/presets/layered.js.map +1 -1
  374. package/dist/presets/recommended.d.ts +80 -9
  375. package/dist/presets/recommended.d.ts.map +1 -1
  376. package/dist/presets/recommended.js +25 -23
  377. package/dist/presets/recommended.js.map +1 -1
  378. package/dist/presets/shared.d.ts +270 -2
  379. package/dist/presets/shared.d.ts.map +1 -1
  380. package/dist/presets/shared.js +338 -4
  381. package/dist/presets/shared.js.map +1 -1
  382. package/dist/rules/code-quality.d.ts.map +1 -1
  383. package/dist/rules/code-quality.js +15 -6
  384. package/dist/rules/code-quality.js.map +1 -1
  385. package/dist/rules/hygiene.d.ts +1 -1
  386. package/dist/rules/hygiene.js +1 -1
  387. package/dist/rules/metrics-function.d.ts +2 -1
  388. package/dist/rules/metrics-function.d.ts.map +1 -1
  389. package/dist/rules/metrics-function.js +33 -6
  390. package/dist/rules/metrics-function.js.map +1 -1
  391. package/dist/rules/metrics.d.ts +2 -1
  392. package/dist/rules/metrics.d.ts.map +1 -1
  393. package/dist/rules/metrics.js +39 -9
  394. package/dist/rules/metrics.js.map +1 -1
  395. package/dist/smells/duplicate-bodies.d.ts +58 -5
  396. package/dist/smells/duplicate-bodies.d.ts.map +1 -1
  397. package/dist/smells/duplicate-bodies.js +137 -56
  398. package/dist/smells/duplicate-bodies.js.map +1 -1
  399. package/dist/smells/fingerprint.d.ts +8 -1
  400. package/dist/smells/fingerprint.d.ts.map +1 -1
  401. package/dist/smells/fingerprint.js +21 -3
  402. package/dist/smells/fingerprint.js.map +1 -1
  403. package/dist/smells/inconsistent-siblings.d.ts +128 -7
  404. package/dist/smells/inconsistent-siblings.d.ts.map +1 -1
  405. package/dist/smells/inconsistent-siblings.js +288 -86
  406. package/dist/smells/inconsistent-siblings.js.map +1 -1
  407. package/dist/smells/sibling-files.d.ts +47 -0
  408. package/dist/smells/sibling-files.d.ts.map +1 -0
  409. package/dist/smells/sibling-files.js +104 -0
  410. package/dist/smells/sibling-files.js.map +1 -0
  411. package/dist/smells/similar-pairs.d.ts +27 -0
  412. package/dist/smells/similar-pairs.d.ts.map +1 -0
  413. package/dist/smells/similar-pairs.js +52 -0
  414. package/dist/smells/similar-pairs.js.map +1 -0
  415. package/dist/smells/smell-builder.d.ts +57 -12
  416. package/dist/smells/smell-builder.d.ts.map +1 -1
  417. package/dist/smells/smell-builder.js +111 -14
  418. package/dist/smells/smell-builder.js.map +1 -1
  419. package/dist/tsconfig/index.d.ts +19 -0
  420. package/dist/tsconfig/index.d.ts.map +1 -0
  421. package/dist/tsconfig/index.js +20 -0
  422. package/dist/tsconfig/index.js.map +1 -0
  423. package/dist/tsconfig/tsconfig-builder.d.ts +42 -9
  424. package/dist/tsconfig/tsconfig-builder.d.ts.map +1 -1
  425. package/dist/tsconfig/tsconfig-builder.js +64 -16
  426. package/dist/tsconfig/tsconfig-builder.js.map +1 -1
  427. package/package.json +3 -2
  428. package/dist/core/module-dependencies.d.ts +0 -28
  429. package/dist/core/module-dependencies.d.ts.map +0 -1
  430. package/dist/core/module-dependencies.js +0 -35
  431. package/dist/core/module-dependencies.js.map +0 -1
  432. package/dist/helpers/within.d.ts.map +0 -1
  433. package/dist/helpers/within.js.map +0 -1
@@ -1,10 +1,29 @@
1
- import { RuleBuilder } from '@nielspeter/eess';
1
+ import { RuleBuilder } from '../core/rule-builder.js';
2
2
  import { functionContain, functionNotContain, functionUseInsteadOf, functionNotHaveEmptyBody, } from '../conditions/body-analysis-function.js';
3
+ import { createElementCache, SOLE_POPULATION } from '../core/element-cache.js';
3
4
  import { collectFunctions } from '../models/arch-function.js';
4
5
  import { followPattern as followPatternCondition } from '../conditions/pattern.js';
5
6
  import { notExist as fnNotExist, beExported as fnBeExported, beAsync as fnBeAsync, haveNameMatching as fnConditionHaveNameMatching, acceptParameterOfType as fnAcceptParameterOfType, notAcceptParameterOfType as fnNotAcceptParameterOfType, haveReturnTypeMatching as fnHaveReturnTypeMatching, resideInFile as fnConditionResideInFile, resideInFolder as fnConditionResideInFolder, } from '../conditions/function.js';
6
7
  import { haveNameMatching as identityHaveNameMatching, haveNameStartingWith as identityHaveNameStartingWith, haveNameEndingWith as identityHaveNameEndingWith, resideInFile as identityResideInFile, resideInFolder as identityResideInFolder, areExported as identityAreExported, areNotExported as identityAreNotExported, } from '../predicates/identity.js';
7
8
  import { arePublic as fnArePublic, areProtected as fnAreProtected, arePrivate as fnArePrivate, areAsync as fnAreAsync, areNotAsync as fnAreNotAsync, haveParameterCount as fnHaveParameterCount, haveParameterCountGreaterThan as fnHaveParameterCountGreaterThan, haveParameterCountLessThan as fnHaveParameterCountLessThan, haveParameterNamed as fnHaveParameterNamed, haveReturnType as fnHaveReturnType, haveRestParameter as fnHaveRestParameter, haveOptionalParameter as fnHaveOptionalParameter, haveParameterOfType as fnHaveParameterOfType, haveParameterNameMatching as fnHaveParameterNameMatching, } from '../predicates/function.js';
9
+ /** One collection per (project, collection options), shared by every rule (plan 0075). */
10
+ const cache = createElementCache();
11
+ /**
12
+ * A canonical key for a collection-options object.
13
+ *
14
+ * Derived from the object's own entries, sorted — **not** `JSON.stringify`,
15
+ * which is key-order dependent, and not a hand-written list of the two fields,
16
+ * which would silently drop a third field added later and serve the wrong
17
+ * population under a colliding key.
18
+ */
19
+ function optionsKey(options) {
20
+ if (options === undefined)
21
+ return SOLE_POPULATION;
22
+ return Object.entries(options)
23
+ .sort(([a], [b]) => a.localeCompare(b))
24
+ .map(([name, value]) => `${name}=${String(value)}`)
25
+ .join('|');
26
+ }
8
27
  /**
9
28
  * Rule builder for function-level architecture rules.
10
29
  *
@@ -36,8 +55,20 @@ import { arePublic as fnArePublic, areProtected as fnAreProtected, arePrivate as
36
55
  * ```
37
56
  */
38
57
  export class FunctionRuleBuilder extends RuleBuilder {
58
+ _collectionOptions;
59
+ constructor(project, _collectionOptions) {
60
+ super(project);
61
+ this._collectionOptions = _collectionOptions;
62
+ }
39
63
  getElements() {
40
- return this.project.getSourceFiles().flatMap((sf) => collectFunctions(sf));
64
+ // _collectionOptions survives `.should()` forks via RuleBuilder.fork()'s
65
+ // shallowClone in TerminalBuilder.copy — verified by the named-selection test.
66
+ //
67
+ // The options are part of the cache key, not just the collection call:
68
+ // `functions(p)` and `functions(p, COLLECT_ALL)` are DIFFERENT populations
69
+ // of the same project, so a project-only key would serve one the other's
70
+ // elements (plan 0075).
71
+ return cache.get(this.project, optionsKey(this._collectionOptions), () => this.project.getSourceFiles().flatMap((sf) => collectFunctions(sf, this._collectionOptions)));
41
72
  }
42
73
  // --- Identity predicates (delegated to plan 0003 generics) ---
43
74
  /**
@@ -51,11 +82,25 @@ export class FunctionRuleBuilder extends RuleBuilder {
51
82
  }
52
83
  return this.addPredicate(identityHaveNameMatching(pattern));
53
84
  }
54
- /** Filter to functions whose name starts with the given prefix. */
85
+ /**
86
+ * Narrows the selection to functions that have a name starting with `prefix`.
87
+ *
88
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
89
+ * becomes an assertion. Written after `.should()` it still filters, and the
90
+ * assertion gate reports it as a misplaced predicate rather than letting the
91
+ * rule pass having asserted nothing.
92
+ */
55
93
  haveNameStartingWith(prefix) {
56
94
  return this.addPredicate(identityHaveNameStartingWith(prefix));
57
95
  }
58
- /** Filter to functions whose name ends with the given suffix. */
96
+ /**
97
+ * Narrows the selection to functions that have a name ending with `suffix`.
98
+ *
99
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
100
+ * becomes an assertion. Written after `.should()` it still filters, and the
101
+ * assertion gate reports it as a misplaced predicate rather than letting the
102
+ * rule pass having asserted nothing.
103
+ */
59
104
  haveNameEndingWith(suffix) {
60
105
  return this.addPredicate(identityHaveNameEndingWith(suffix));
61
106
  }
@@ -79,79 +124,181 @@ export class FunctionRuleBuilder extends RuleBuilder {
79
124
  }
80
125
  return this.addPredicate(identityResideInFolder(glob));
81
126
  }
82
- /** Filter to functions that are exported from their module. */
127
+ /**
128
+ * Narrows the selection to functions that are exported.
129
+ *
130
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
131
+ * becomes an assertion. Written after `.should()` it still filters, and the
132
+ * assertion gate reports it as a misplaced predicate rather than letting the
133
+ * rule pass having asserted nothing.
134
+ */
83
135
  areExported() {
84
136
  return this.addPredicate(identityAreExported());
85
137
  }
86
- /** Filter to functions that are NOT exported from their module. */
138
+ /**
139
+ * Narrows the selection to functions that are not exported.
140
+ *
141
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
142
+ * becomes an assertion. Written after `.should()` it still filters, and the
143
+ * assertion gate reports it as a misplaced predicate rather than letting the
144
+ * rule pass having asserted nothing.
145
+ */
87
146
  areNotExported() {
88
147
  return this.addPredicate(identityAreNotExported());
89
148
  }
90
149
  // --- Visibility predicates (plan 0032) ---
91
150
  /**
92
- * Filter to public functions. Class methods match when `public` or
93
- * unmarked; standalone and arrow functions are always public.
151
+ * Narrows the selection to functions that are public.
152
+ *
153
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
154
+ * becomes an assertion. Written after `.should()` it still filters, and the
155
+ * assertion gate reports it as a misplaced predicate rather than letting the
156
+ * rule pass having asserted nothing.
94
157
  */
95
158
  arePublic() {
96
159
  return this.addPredicate(fnArePublic());
97
160
  }
98
- /** Filter to `protected` class methods (standalone functions never match). */
161
+ /**
162
+ * Narrows the selection to functions that are protected.
163
+ *
164
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
165
+ * becomes an assertion. Written after `.should()` it still filters, and the
166
+ * assertion gate reports it as a misplaced predicate rather than letting the
167
+ * rule pass having asserted nothing.
168
+ */
99
169
  areProtected() {
100
170
  return this.addPredicate(fnAreProtected());
101
171
  }
102
- /** Filter to `private` class methods (standalone functions never match). */
172
+ /**
173
+ * Narrows the selection to functions that are private.
174
+ *
175
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
176
+ * becomes an assertion. Written after `.should()` it still filters, and the
177
+ * assertion gate reports it as a misplaced predicate rather than letting the
178
+ * rule pass having asserted nothing.
179
+ */
103
180
  arePrivate() {
104
181
  return this.addPredicate(fnArePrivate());
105
182
  }
106
183
  // --- Function-specific predicates ---
107
- /** Filter to functions declared with the `async` keyword. */
184
+ /**
185
+ * Narrows the selection to functions that are async.
186
+ *
187
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
188
+ * becomes an assertion. Written after `.should()` it still filters, and the
189
+ * assertion gate reports it as a misplaced predicate rather than letting the
190
+ * rule pass having asserted nothing.
191
+ */
108
192
  areAsync() {
109
193
  return this.addPredicate(fnAreAsync());
110
194
  }
111
- /** Filter to functions NOT declared `async`. */
195
+ /**
196
+ * Narrows the selection to functions that are not async.
197
+ *
198
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
199
+ * becomes an assertion. Written after `.should()` it still filters, and the
200
+ * assertion gate reports it as a misplaced predicate rather than letting the
201
+ * rule pass having asserted nothing.
202
+ */
112
203
  areNotAsync() {
113
204
  return this.addPredicate(fnAreNotAsync());
114
205
  }
115
- /** Filter to functions that declare exactly `n` parameters. */
206
+ /**
207
+ * Narrows the selection to functions that have exactly `n` parameters.
208
+ *
209
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
210
+ * becomes an assertion. Written after `.should()` it still filters, and the
211
+ * assertion gate reports it as a misplaced predicate rather than letting the
212
+ * rule pass having asserted nothing.
213
+ */
116
214
  haveParameterCount(n) {
117
215
  return this.addPredicate(fnHaveParameterCount(n));
118
216
  }
119
- /** Filter to functions that declare more than `n` parameters. */
217
+ /**
218
+ * Narrows the selection to functions that have more than `n` parameters.
219
+ *
220
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
221
+ * becomes an assertion. Written after `.should()` it still filters, and the
222
+ * assertion gate reports it as a misplaced predicate rather than letting the
223
+ * rule pass having asserted nothing.
224
+ */
120
225
  haveParameterCountGreaterThan(n) {
121
226
  return this.addPredicate(fnHaveParameterCountGreaterThan(n));
122
227
  }
123
- /** Filter to functions that declare fewer than `n` parameters. */
228
+ /**
229
+ * Narrows the selection to functions that have fewer than `n` parameters.
230
+ *
231
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
232
+ * becomes an assertion. Written after `.should()` it still filters, and the
233
+ * assertion gate reports it as a misplaced predicate rather than letting the
234
+ * rule pass having asserted nothing.
235
+ */
124
236
  haveParameterCountLessThan(n) {
125
237
  return this.addPredicate(fnHaveParameterCountLessThan(n));
126
238
  }
127
- /** Filter to functions that declare a parameter with the given exact name. */
239
+ /**
240
+ * Narrows the selection to functions that have a parameter named `name`.
241
+ *
242
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
243
+ * becomes an assertion. Written after `.should()` it still filters, and the
244
+ * assertion gate reports it as a misplaced predicate rather than letting the
245
+ * rule pass having asserted nothing.
246
+ */
128
247
  haveParameterNamed(name) {
129
248
  return this.addPredicate(fnHaveParameterNamed(name));
130
249
  }
131
250
  /**
132
- * Filter to functions whose return type text matches the pattern
133
- * (e.g. `/Promise</`, `'void'`). A string is compiled to a RegExp.
251
+ * Narrows the selection to functions that have a return type matching `pattern`.
252
+ *
253
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
254
+ * becomes an assertion. Written after `.should()` it still filters, and the
255
+ * assertion gate reports it as a misplaced predicate rather than letting the
256
+ * rule pass having asserted nothing.
134
257
  */
135
258
  haveReturnType(pattern) {
136
259
  return this.addPredicate(fnHaveReturnType(pattern));
137
260
  }
138
- /** Filter to functions that declare a rest parameter (`...args`). */
261
+ /**
262
+ * Narrows the selection to functions that have a rest parameter.
263
+ *
264
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
265
+ * becomes an assertion. Written after `.should()` it still filters, and the
266
+ * assertion gate reports it as a misplaced predicate rather than letting the
267
+ * rule pass having asserted nothing.
268
+ */
139
269
  haveRestParameter() {
140
270
  return this.addPredicate(fnHaveRestParameter());
141
271
  }
142
- /** Filter to functions with at least one optional (`x?`) or default-valued parameter. */
272
+ /**
273
+ * Narrows the selection to functions that have an optional parameter.
274
+ *
275
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
276
+ * becomes an assertion. Written after `.should()` it still filters, and the
277
+ * assertion gate reports it as a misplaced predicate rather than letting the
278
+ * rule pass having asserted nothing.
279
+ */
143
280
  haveOptionalParameter() {
144
281
  return this.addPredicate(fnHaveOptionalParameter());
145
282
  }
146
283
  /**
147
- * Filter to functions whose parameter at `index` has a type satisfying
148
- * the matcher. Out-of-bounds indices never match; for a rest parameter
149
- * the type is the array type (e.g. `string[]`).
284
+ * Narrows the selection to functions that have parameter `index` of a type matching `matcher`.
285
+ *
286
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
287
+ * becomes an assertion. Written after `.should()` it still filters, and the
288
+ * assertion gate reports it as a misplaced predicate rather than letting the
289
+ * rule pass having asserted nothing.
150
290
  */
151
291
  haveParameterOfType(index, matcher) {
152
292
  return this.addPredicate(fnHaveParameterOfType(index, matcher));
153
293
  }
154
- /** Filter to functions with at least one parameter whose name matches the regex. */
294
+ /**
295
+ * Narrows the selection to functions that have a parameter name matching `pattern`.
296
+ *
297
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
298
+ * becomes an assertion. Written after `.should()` it still filters, and the
299
+ * assertion gate reports it as a misplaced predicate rather than letting the
300
+ * rule pass having asserted nothing.
301
+ */
155
302
  haveParameterNameMatching(pattern) {
156
303
  return this.addPredicate(fnHaveParameterNameMatching(pattern));
157
304
  }
@@ -281,7 +428,7 @@ export class FunctionRuleBuilder extends RuleBuilder {
281
428
  * .check()
282
429
  * ```
283
430
  */
284
- export function functions(p) {
285
- return new FunctionRuleBuilder(p);
431
+ export function functions(p, options) {
432
+ return new FunctionRuleBuilder(p, options);
286
433
  }
287
434
  //# sourceMappingURL=function-rule-builder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"function-rule-builder.js","sourceRoot":"","sources":["../../src/builders/function-rule-builder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAElF,OAAO,EACL,QAAQ,IAAI,UAAU,EACtB,UAAU,IAAI,YAAY,EAC1B,OAAO,IAAI,SAAS,EACpB,gBAAgB,IAAI,2BAA2B,EAC/C,qBAAqB,IAAI,uBAAuB,EAChD,wBAAwB,IAAI,0BAA0B,EACtD,sBAAsB,IAAI,wBAAwB,EAClD,YAAY,IAAI,uBAAuB,EACvC,cAAc,IAAI,yBAAyB,GAC5C,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,gBAAgB,IAAI,wBAAwB,EAC5C,oBAAoB,IAAI,4BAA4B,EACp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AAO,CAAC,CAAC,CAAA;IACpD,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,OAA0B;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;IACvD,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,GAAsB,EAAE,IAAuB;QAC1D,OAAO,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;IAC3D,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,CAAC,CAAA;IACtD,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,OAAoB;QAChC,OAAO,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAA;IAC3D,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,SAAS,CAAC,CAAc;IACtC,OAAO,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAA;AACnC,CAAC"}
1
+ {"version":3,"file":"function-rule-builder.js","sourceRoot":"","sources":["../../src/builders/function-rule-builder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAAE,gBAAgB,EAAkC,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAElF,OAAO,EACL,QAAQ,IAAI,UAAU,EACtB,UAAU,IAAI,YAAY,EAC1B,OAAO,IAAI,SAAS,EACpB,gBAAgB,IAAI,2BAA2B,EAC/C,qBAAqB,IAAI,uBAAuB,E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AAO,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAA;IACvD,CAAC;IAED;;;OAGG;IACH,YAAY,CAAC,GAAsB,EAAE,IAAuB;QAC1D,OAAO,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAA;IAC3D,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,YAAY,CAAC,wBAAwB,EAAE,CAAC,CAAA;IACtD,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,OAAoB;QAChC,OAAO,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAA;IAC3D,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,SAAS,CACvB,CAAc,EACd,OAAmC;IAEnC,OAAO,IAAI,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;AAC5C,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ArchProject } from '../core/project.js';
2
- import { RuleBuilder } from '@nielspeter/eess';
2
+ import { RuleBuilder } from '../core/rule-builder.js';
3
3
  import type { ArchJsxElement } from '../models/arch-jsx-element.js';
4
4
  /**
5
5
  * Rule builder for JSX element architecture rules.
@@ -35,32 +35,88 @@ import type { ArchJsxElement } from '../models/arch-jsx-element.js';
35
35
  * .check()
36
36
  * ```
37
37
  */
38
- export declare class JsxRuleBuilder extends RuleBuilder<ArchJsxElement, ArchProject> {
38
+ export declare class JsxRuleBuilder extends RuleBuilder<ArchJsxElement> {
39
39
  protected getElements(): ArchJsxElement[];
40
- /** Filter to JSX elements whose tag/component name matches the pattern. */
40
+ /**
41
+ * Narrows the selection to JSX elements that have a name matching `pattern`.
42
+ *
43
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
44
+ * becomes an assertion. Written after `.should()` it still filters, and the
45
+ * assertion gate reports it as a misplaced predicate rather than letting the
46
+ * rule pass having asserted nothing.
47
+ */
41
48
  haveNameMatching(pattern: RegExp | string): this;
42
- /** Filter to JSX elements whose tag/component name starts with the prefix. */
49
+ /**
50
+ * Narrows the selection to JSX elements that have a name starting with `prefix`.
51
+ *
52
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
53
+ * becomes an assertion. Written after `.should()` it still filters, and the
54
+ * assertion gate reports it as a misplaced predicate rather than letting the
55
+ * rule pass having asserted nothing.
56
+ */
43
57
  haveNameStartingWith(prefix: string): this;
44
- /** Filter to JSX elements whose tag/component name ends with the suffix. */
58
+ /**
59
+ * Narrows the selection to JSX elements that have a name ending with `suffix`.
60
+ *
61
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
62
+ * becomes an assertion. Written after `.should()` it still filters, and the
63
+ * assertion gate reports it as a misplaced predicate rather than letting the
64
+ * rule pass having asserted nothing.
65
+ */
45
66
  haveNameEndingWith(suffix: string): this;
46
- /** Filter to JSX elements in a file whose absolute path matches the glob. */
67
+ /**
68
+ * Narrows the selection to JSX elements that reside in a file matching `glob`.
69
+ *
70
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
71
+ * becomes an assertion. Written after `.should()` it still filters, and the
72
+ * assertion gate reports it as a misplaced predicate rather than letting the
73
+ * rule pass having asserted nothing.
74
+ */
47
75
  resideInFile(glob: string): this;
48
- /** Filter to JSX elements in a folder whose path matches the glob. */
76
+ /**
77
+ * Narrows the selection to JSX elements that reside in a folder matching `glob`.
78
+ *
79
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
80
+ * becomes an assertion. Written after `.should()` it still filters, and the
81
+ * assertion gate reports it as a misplaced predicate rather than letting the
82
+ * rule pass having asserted nothing.
83
+ */
49
84
  resideInFolder(glob: string): this;
50
85
  /**
51
- * Filter to intrinsic HTML elements with any of the given lowercase tags
52
- * (e.g. `areHtmlElements('button', 'input')`). Requires at least one tag.
86
+ * Narrows the selection to JSX elements that are the HTML elements named in `tags`.
87
+ *
88
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
89
+ * becomes an assertion. Written after `.should()` it still filters, and the
90
+ * assertion gate reports it as a misplaced predicate rather than letting the
91
+ * rule pass having asserted nothing.
53
92
  */
54
93
  areHtmlElements(...tags: string[]): this;
55
94
  /**
56
- * Filter to component elements (uppercase or dotted names). With no
57
- * arguments matches all components; with names, only those (use the full
58
- * dotted name for namespaced components, e.g. `'Icons.Check'`).
95
+ * Narrows the selection to JSX elements that are the components named in `names`.
96
+ *
97
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
98
+ * becomes an assertion. Written after `.should()` it still filters, and the
99
+ * assertion gate reports it as a misplaced predicate rather than letting the
100
+ * rule pass having asserted nothing.
59
101
  */
60
102
  areComponents(...names: string[]): this;
61
- /** Filter to elements that have the named attribute, regardless of value. */
103
+ /**
104
+ * Narrows the selection to JSX elements that have the attribute `name`.
105
+ *
106
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
107
+ * becomes an assertion. Written after `.should()` it still filters, and the
108
+ * assertion gate reports it as a misplaced predicate rather than letting the
109
+ * rule pass having asserted nothing.
110
+ */
62
111
  withAttribute(name: string): this;
63
- /** Filter to elements whose named attribute value equals the string or matches the regex. */
112
+ /**
113
+ * Narrows the selection to JSX elements that have attribute `name` with a value matching `value`.
114
+ *
115
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
116
+ * becomes an assertion. Written after `.should()` it still filters, and the
117
+ * assertion gate reports it as a misplaced predicate rather than letting the
118
+ * rule pass having asserted nothing.
119
+ */
64
120
  withAttributeMatching(name: string, value: string | RegExp): this;
65
121
  /**
66
122
  * The filtered JSX element set must be empty.
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-rule-builder.d.ts","sourceRoot":"","sources":["../../src/builders/jsx-rule-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,EAAE,cAAc,EAA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,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIjC;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIpC;;OAEG;IACH,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIjE;;OAEG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAGrE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,WAAW,GAAG,cAAc,CAE1D"}
@@ -1,8 +1,11 @@
1
- import { RuleBuilder } from '@nielspeter/eess';
1
+ import { RuleBuilder } from '../core/rule-builder.js';
2
+ import { createElementCache, SOLE_POPULATION } from '../core/element-cache.js';
2
3
  import { collectJsxElements } from '../models/arch-jsx-element.js';
3
4
  import { haveNameMatching as identityHaveNameMatching, haveNameStartingWith as identityHaveNameStartingWith, haveNameEndingWith as identityHaveNameEndingWith, resideInFile as identityResideInFile, resideInFolder as identityResideInFolder, } from '../predicates/identity.js';
4
5
  import { areHtmlElements as jsxAreHtmlElements, areComponents as jsxAreComponents, withAttribute as jsxWithAttribute, withAttributeMatching as jsxWithAttributeMatching, } from '../predicates/jsx.js';
5
6
  import { notExist as jsxNotExist, haveAttribute as conditionHaveAttribute, notHaveAttribute as conditionNotHaveAttribute, haveAttributeMatching as conditionHaveAttributeMatching, notHaveAttributeMatching as conditionNotHaveAttributeMatching, } from '../conditions/jsx.js';
7
+ /** One collection per project, shared by every rule built from it (plan 0075). */
8
+ const cache = createElementCache();
6
9
  /**
7
10
  * Rule builder for JSX element architecture rules.
8
11
  *
@@ -39,50 +42,106 @@ import { notExist as jsxNotExist, haveAttribute as conditionHaveAttribute, notHa
39
42
  */
40
43
  export class JsxRuleBuilder extends RuleBuilder {
41
44
  getElements() {
42
- return this.project.getSourceFiles().flatMap(collectJsxElements);
45
+ return cache.get(this.project, SOLE_POPULATION, () => this.project.getSourceFiles().flatMap(collectJsxElements));
43
46
  }
44
47
  // --- Identity predicates (predicate-only, following CallRuleBuilder pattern) ---
45
- /** Filter to JSX elements whose tag/component name matches the pattern. */
48
+ /**
49
+ * Narrows the selection to JSX elements that have a name matching `pattern`.
50
+ *
51
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
52
+ * becomes an assertion. Written after `.should()` it still filters, and the
53
+ * assertion gate reports it as a misplaced predicate rather than letting the
54
+ * rule pass having asserted nothing.
55
+ */
46
56
  haveNameMatching(pattern) {
47
57
  return this.addPredicate(identityHaveNameMatching(pattern));
48
58
  }
49
- /** Filter to JSX elements whose tag/component name starts with the prefix. */
59
+ /**
60
+ * Narrows the selection to JSX elements that have a name starting with `prefix`.
61
+ *
62
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
63
+ * becomes an assertion. Written after `.should()` it still filters, and the
64
+ * assertion gate reports it as a misplaced predicate rather than letting the
65
+ * rule pass having asserted nothing.
66
+ */
50
67
  haveNameStartingWith(prefix) {
51
68
  return this.addPredicate(identityHaveNameStartingWith(prefix));
52
69
  }
53
- /** Filter to JSX elements whose tag/component name ends with the suffix. */
70
+ /**
71
+ * Narrows the selection to JSX elements that have a name ending with `suffix`.
72
+ *
73
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
74
+ * becomes an assertion. Written after `.should()` it still filters, and the
75
+ * assertion gate reports it as a misplaced predicate rather than letting the
76
+ * rule pass having asserted nothing.
77
+ */
54
78
  haveNameEndingWith(suffix) {
55
79
  return this.addPredicate(identityHaveNameEndingWith(suffix));
56
80
  }
57
- /** Filter to JSX elements in a file whose absolute path matches the glob. */
81
+ /**
82
+ * Narrows the selection to JSX elements that reside in a file matching `glob`.
83
+ *
84
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
85
+ * becomes an assertion. Written after `.should()` it still filters, and the
86
+ * assertion gate reports it as a misplaced predicate rather than letting the
87
+ * rule pass having asserted nothing.
88
+ */
58
89
  resideInFile(glob) {
59
90
  return this.addPredicate(identityResideInFile(glob));
60
91
  }
61
- /** Filter to JSX elements in a folder whose path matches the glob. */
92
+ /**
93
+ * Narrows the selection to JSX elements that reside in a folder matching `glob`.
94
+ *
95
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
96
+ * becomes an assertion. Written after `.should()` it still filters, and the
97
+ * assertion gate reports it as a misplaced predicate rather than letting the
98
+ * rule pass having asserted nothing.
99
+ */
62
100
  resideInFolder(glob) {
63
101
  return this.addPredicate(identityResideInFolder(glob));
64
102
  }
65
103
  // --- JSX-specific predicates ---
66
104
  /**
67
- * Filter to intrinsic HTML elements with any of the given lowercase tags
68
- * (e.g. `areHtmlElements('button', 'input')`). Requires at least one tag.
105
+ * Narrows the selection to JSX elements that are the HTML elements named in `tags`.
106
+ *
107
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
108
+ * becomes an assertion. Written after `.should()` it still filters, and the
109
+ * assertion gate reports it as a misplaced predicate rather than letting the
110
+ * rule pass having asserted nothing.
69
111
  */
70
112
  areHtmlElements(...tags) {
71
113
  return this.addPredicate(jsxAreHtmlElements(...tags));
72
114
  }
73
115
  /**
74
- * Filter to component elements (uppercase or dotted names). With no
75
- * arguments matches all components; with names, only those (use the full
76
- * dotted name for namespaced components, e.g. `'Icons.Check'`).
116
+ * Narrows the selection to JSX elements that are the components named in `names`.
117
+ *
118
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
119
+ * becomes an assertion. Written after `.should()` it still filters, and the
120
+ * assertion gate reports it as a misplaced predicate rather than letting the
121
+ * rule pass having asserted nothing.
77
122
  */
78
123
  areComponents(...names) {
79
124
  return this.addPredicate(jsxAreComponents(...names));
80
125
  }
81
- /** Filter to elements that have the named attribute, regardless of value. */
126
+ /**
127
+ * Narrows the selection to JSX elements that have the attribute `name`.
128
+ *
129
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
130
+ * becomes an assertion. Written after `.should()` it still filters, and the
131
+ * assertion gate reports it as a misplaced predicate rather than letting the
132
+ * rule pass having asserted nothing.
133
+ */
82
134
  withAttribute(name) {
83
135
  return this.addPredicate(jsxWithAttribute(name));
84
136
  }
85
- /** Filter to elements whose named attribute value equals the string or matches the regex. */
137
+ /**
138
+ * Narrows the selection to JSX elements that have attribute `name` with a value matching `value`.
139
+ *
140
+ * **Predicate only**, unlike the dual-use methods on this builder: it never
141
+ * becomes an assertion. Written after `.should()` it still filters, and the
142
+ * assertion gate reports it as a misplaced predicate rather than letting the
143
+ * rule pass having asserted nothing.
144
+ */
86
145
  withAttributeMatching(name, value) {
87
146
  return this.addPredicate(jsxWithAttributeMatching(name, value));
88
147
  }
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-rule-builder.js","sourceRoot":"","sources":["../../src/builders/jsx-rule-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EACL,gBAAgB,IAAI,wBAAwB,EAC5C,oBAAoB,IAAI,4BAA4B,EACpD,kBAAkB,IAAI,0BAA0B,EAChD,YAAY,IAAI,oBAAoB,EACpC,cAAc,IAAI,sBAAsB,GACzC,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,aAAa,IAAI,gBAAgB,EACjC,aAAa,IAAI,gBAAgB,EACjC,qBAAqB,IAAI,wBAAwB,GAClD,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,QAAQ,IAAI,WAAW,EACvB,aAAa,IAAI,sBAAsB,EACvC,gBAAgB,IAAI,yBAAyB,EAC7C,qBAAqB,IAAI,8BAA8B,EACvD,wBAAwB,IAAI,iCAAiC,GAC9D,MAAM,sBAAsB,CAAA;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAwC;IAChE,WAAW;QACn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AC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;IACvE,CAAC;IAED;;OAEG;IACH,wBAAwB,CAAC,IAAY,EAAE,KAAsB;QAC3D,OAAO,IAAI,CAAC,YAAY,CAAC,iCAAiC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA;IAC1E,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,WAAW,CAAC,CAAc;IACxC,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,CAAA;AAC9B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { SourceFile } from 'ts-morph';
2
- import { RuleBuilder } from '@nielspeter/eess';
2
+ import { RuleBuilder } from '../core/rule-builder.js';
3
3
  import type { ArchProject } from '../core/project.js';
4
4
  import type { ImportOptions } from '../core/import-options.js';
5
5
  import type { ExpressionMatcher } from '../helpers/matchers.js';
@@ -17,7 +17,7 @@ import type { ModuleBodyOptions } from '../helpers/body-traversal.js';
17
17
  * .because('domain must not depend on infrastructure')
18
18
  * .check()
19
19
  */
20
- export declare class ModuleRuleBuilder extends RuleBuilder<SourceFile, ArchProject> {
20
+ export declare class ModuleRuleBuilder extends RuleBuilder<SourceFile> {
21
21
  protected getElements(): SourceFile[];
22
22
  /**
23
23
  * Filter modules whose file name matches the given regex.
@@ -1 +1 @@
1
- {"version":3,"file":"module-rule-builder.d.ts","sourceRoot":"","sources":["../../src/builders/module-rule-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAiBrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAM9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,iBAAi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