driftdetect-core 0.4.6 → 0.6.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 (644) hide show
  1. package/dist/boundaries/types.d.ts +1 -1
  2. package/dist/boundaries/types.d.ts.map +1 -1
  3. package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
  4. package/dist/call-graph/analysis/graph-builder.js +1 -0
  5. package/dist/call-graph/analysis/graph-builder.js.map +1 -1
  6. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +8 -0
  7. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
  8. package/dist/call-graph/extractors/csharp-data-access-extractor.js +8 -0
  9. package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
  10. package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
  11. package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
  12. package/dist/call-graph/extractors/csharp-extractor.js +362 -4
  13. package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
  14. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
  15. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
  16. package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
  17. package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
  18. package/dist/call-graph/extractors/go-data-access-extractor.d.ts +80 -0
  19. package/dist/call-graph/extractors/go-data-access-extractor.d.ts.map +1 -0
  20. package/dist/call-graph/extractors/go-data-access-extractor.js +457 -0
  21. package/dist/call-graph/extractors/go-data-access-extractor.js.map +1 -0
  22. package/dist/call-graph/extractors/go-extractor.d.ts +103 -0
  23. package/dist/call-graph/extractors/go-extractor.d.ts.map +1 -0
  24. package/dist/call-graph/extractors/go-extractor.js +509 -0
  25. package/dist/call-graph/extractors/go-extractor.js.map +1 -0
  26. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts +97 -0
  27. package/dist/call-graph/extractors/go-hybrid-extractor.d.ts.map +1 -0
  28. package/dist/call-graph/extractors/go-hybrid-extractor.js +496 -0
  29. package/dist/call-graph/extractors/go-hybrid-extractor.js.map +1 -0
  30. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts +102 -0
  31. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
  32. package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
  33. package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
  34. package/dist/call-graph/extractors/index.d.ts +17 -13
  35. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  36. package/dist/call-graph/extractors/index.js +24 -23
  37. package/dist/call-graph/extractors/index.js.map +1 -1
  38. package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
  39. package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
  40. package/dist/call-graph/extractors/java-data-access-extractor.js +8 -0
  41. package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
  42. package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
  43. package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
  44. package/dist/call-graph/extractors/java-extractor.js +120 -4
  45. package/dist/call-graph/extractors/java-extractor.js.map +1 -1
  46. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
  47. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
  48. package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
  49. package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
  50. package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
  51. package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
  52. package/dist/call-graph/extractors/php-data-access-extractor.js +8 -0
  53. package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
  54. package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
  55. package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
  56. package/dist/call-graph/extractors/php-extractor.js +460 -6
  57. package/dist/call-graph/extractors/php-extractor.js.map +1 -1
  58. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
  59. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
  60. package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
  61. package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
  62. package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
  63. package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
  64. package/dist/call-graph/extractors/python-data-access-extractor.js +8 -0
  65. package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
  66. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
  67. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
  68. package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
  69. package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
  70. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
  71. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
  72. package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
  73. package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
  74. package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
  75. package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
  76. package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
  77. package/dist/call-graph/extractors/regex/csharp-regex.js.map +1 -0
  78. package/dist/call-graph/extractors/regex/go-regex.d.ts +51 -0
  79. package/dist/call-graph/extractors/regex/go-regex.d.ts.map +1 -0
  80. package/dist/call-graph/extractors/regex/go-regex.js +435 -0
  81. package/dist/call-graph/extractors/regex/go-regex.js.map +1 -0
  82. package/dist/call-graph/extractors/regex/index.d.ts +26 -0
  83. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
  84. package/dist/call-graph/extractors/regex/index.js +74 -0
  85. package/dist/call-graph/extractors/regex/index.js.map +1 -0
  86. package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
  87. package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
  88. package/dist/call-graph/extractors/regex/java-regex.js +327 -0
  89. package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
  90. package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
  91. package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
  92. package/dist/call-graph/extractors/regex/php-regex.js +333 -0
  93. package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
  94. package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
  95. package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
  96. package/dist/call-graph/extractors/regex/python-regex.js +380 -0
  97. package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
  98. package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
  99. package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
  100. package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
  101. package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
  102. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +7 -0
  103. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
  104. package/dist/call-graph/extractors/semantic-data-access-scanner.js +7 -0
  105. package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
  106. package/dist/call-graph/extractors/types.d.ts +111 -0
  107. package/dist/call-graph/extractors/types.d.ts.map +1 -0
  108. package/dist/call-graph/extractors/types.js +68 -0
  109. package/dist/call-graph/extractors/types.js.map +1 -0
  110. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
  111. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
  112. package/dist/call-graph/extractors/typescript-data-access-extractor.js +8 -0
  113. package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
  114. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
  115. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
  116. package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
  117. package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
  118. package/dist/call-graph/index.d.ts +3 -0
  119. package/dist/call-graph/index.d.ts.map +1 -1
  120. package/dist/call-graph/index.js +5 -0
  121. package/dist/call-graph/index.js.map +1 -1
  122. package/dist/call-graph/types.d.ts +1 -1
  123. package/dist/call-graph/types.d.ts.map +1 -1
  124. package/dist/constraints/extraction/constraint-synthesizer.d.ts +72 -0
  125. package/dist/constraints/extraction/constraint-synthesizer.d.ts.map +1 -0
  126. package/dist/constraints/extraction/constraint-synthesizer.js +336 -0
  127. package/dist/constraints/extraction/constraint-synthesizer.js.map +1 -0
  128. package/dist/constraints/extraction/index.d.ts +10 -0
  129. package/dist/constraints/extraction/index.d.ts.map +1 -0
  130. package/dist/constraints/extraction/index.js +10 -0
  131. package/dist/constraints/extraction/index.js.map +1 -0
  132. package/dist/constraints/extraction/invariant-detector.d.ts +109 -0
  133. package/dist/constraints/extraction/invariant-detector.d.ts.map +1 -0
  134. package/dist/constraints/extraction/invariant-detector.js +979 -0
  135. package/dist/constraints/extraction/invariant-detector.js.map +1 -0
  136. package/dist/constraints/index.d.ts +15 -0
  137. package/dist/constraints/index.d.ts.map +1 -0
  138. package/dist/constraints/index.js +16 -0
  139. package/dist/constraints/index.js.map +1 -0
  140. package/dist/constraints/store/constraint-store.d.ts +110 -0
  141. package/dist/constraints/store/constraint-store.d.ts.map +1 -0
  142. package/dist/constraints/store/constraint-store.js +584 -0
  143. package/dist/constraints/store/constraint-store.js.map +1 -0
  144. package/dist/constraints/types.d.ts +605 -0
  145. package/dist/constraints/types.d.ts.map +1 -0
  146. package/dist/constraints/types.js +57 -0
  147. package/dist/constraints/types.js.map +1 -0
  148. package/dist/constraints/verification/constraint-verifier.d.ts +100 -0
  149. package/dist/constraints/verification/constraint-verifier.d.ts.map +1 -0
  150. package/dist/constraints/verification/constraint-verifier.js +638 -0
  151. package/dist/constraints/verification/constraint-verifier.js.map +1 -0
  152. package/dist/constraints/verification/index.d.ts +8 -0
  153. package/dist/constraints/verification/index.d.ts.map +1 -0
  154. package/dist/constraints/verification/index.js +8 -0
  155. package/dist/constraints/verification/index.js.map +1 -0
  156. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts +121 -0
  157. package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -0
  158. package/dist/decisions/analyzer/decision-mining-analyzer.js +904 -0
  159. package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -0
  160. package/dist/decisions/analyzer/index.d.ts +5 -0
  161. package/dist/decisions/analyzer/index.d.ts.map +1 -0
  162. package/dist/decisions/analyzer/index.js +5 -0
  163. package/dist/decisions/analyzer/index.js.map +1 -0
  164. package/dist/decisions/extractors/base-commit-extractor.d.ts +104 -0
  165. package/dist/decisions/extractors/base-commit-extractor.d.ts.map +1 -0
  166. package/dist/decisions/extractors/base-commit-extractor.js +305 -0
  167. package/dist/decisions/extractors/base-commit-extractor.js.map +1 -0
  168. package/dist/decisions/extractors/csharp-commit-extractor.d.ts +18 -0
  169. package/dist/decisions/extractors/csharp-commit-extractor.d.ts.map +1 -0
  170. package/dist/decisions/extractors/csharp-commit-extractor.js +281 -0
  171. package/dist/decisions/extractors/csharp-commit-extractor.js.map +1 -0
  172. package/dist/decisions/extractors/index.d.ts +31 -0
  173. package/dist/decisions/extractors/index.d.ts.map +1 -0
  174. package/dist/decisions/extractors/index.js +63 -0
  175. package/dist/decisions/extractors/index.js.map +1 -0
  176. package/dist/decisions/extractors/java-commit-extractor.d.ts +18 -0
  177. package/dist/decisions/extractors/java-commit-extractor.d.ts.map +1 -0
  178. package/dist/decisions/extractors/java-commit-extractor.js +248 -0
  179. package/dist/decisions/extractors/java-commit-extractor.js.map +1 -0
  180. package/dist/decisions/extractors/php-commit-extractor.d.ts +18 -0
  181. package/dist/decisions/extractors/php-commit-extractor.d.ts.map +1 -0
  182. package/dist/decisions/extractors/php-commit-extractor.js +280 -0
  183. package/dist/decisions/extractors/php-commit-extractor.js.map +1 -0
  184. package/dist/decisions/extractors/python-commit-extractor.d.ts +18 -0
  185. package/dist/decisions/extractors/python-commit-extractor.d.ts.map +1 -0
  186. package/dist/decisions/extractors/python-commit-extractor.js +248 -0
  187. package/dist/decisions/extractors/python-commit-extractor.js.map +1 -0
  188. package/dist/decisions/extractors/typescript-commit-extractor.d.ts +37 -0
  189. package/dist/decisions/extractors/typescript-commit-extractor.d.ts.map +1 -0
  190. package/dist/decisions/extractors/typescript-commit-extractor.js +229 -0
  191. package/dist/decisions/extractors/typescript-commit-extractor.js.map +1 -0
  192. package/dist/decisions/git/commit-parser.d.ts +58 -0
  193. package/dist/decisions/git/commit-parser.d.ts.map +1 -0
  194. package/dist/decisions/git/commit-parser.js +344 -0
  195. package/dist/decisions/git/commit-parser.js.map +1 -0
  196. package/dist/decisions/git/diff-analyzer.d.ts +30 -0
  197. package/dist/decisions/git/diff-analyzer.d.ts.map +1 -0
  198. package/dist/decisions/git/diff-analyzer.js +492 -0
  199. package/dist/decisions/git/diff-analyzer.js.map +1 -0
  200. package/dist/decisions/git/git-walker.d.ts +64 -0
  201. package/dist/decisions/git/git-walker.d.ts.map +1 -0
  202. package/dist/decisions/git/git-walker.js +441 -0
  203. package/dist/decisions/git/git-walker.js.map +1 -0
  204. package/dist/decisions/git/index.d.ts +11 -0
  205. package/dist/decisions/git/index.d.ts.map +1 -0
  206. package/dist/decisions/git/index.js +13 -0
  207. package/dist/decisions/git/index.js.map +1 -0
  208. package/dist/decisions/git/types.d.ts +223 -0
  209. package/dist/decisions/git/types.d.ts.map +1 -0
  210. package/dist/decisions/git/types.js +7 -0
  211. package/dist/decisions/git/types.js.map +1 -0
  212. package/dist/decisions/index.d.ts +27 -0
  213. package/dist/decisions/index.d.ts.map +1 -0
  214. package/dist/decisions/index.js +45 -0
  215. package/dist/decisions/index.js.map +1 -0
  216. package/dist/decisions/types.d.ts +530 -0
  217. package/dist/decisions/types.d.ts.map +1 -0
  218. package/dist/decisions/types.js +8 -0
  219. package/dist/decisions/types.js.map +1 -0
  220. package/dist/error-handling/error-handling-analyzer.d.ts +73 -0
  221. package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
  222. package/dist/error-handling/error-handling-analyzer.js +706 -0
  223. package/dist/error-handling/error-handling-analyzer.js.map +1 -0
  224. package/dist/error-handling/index.d.ts +8 -0
  225. package/dist/error-handling/index.d.ts.map +1 -0
  226. package/dist/error-handling/index.js +8 -0
  227. package/dist/error-handling/index.js.map +1 -0
  228. package/dist/error-handling/types.d.ts +307 -0
  229. package/dist/error-handling/types.d.ts.map +1 -0
  230. package/dist/error-handling/types.js +7 -0
  231. package/dist/error-handling/types.js.map +1 -0
  232. package/dist/go/go-analyzer.d.ts +203 -0
  233. package/dist/go/go-analyzer.d.ts.map +1 -0
  234. package/dist/go/go-analyzer.js +509 -0
  235. package/dist/go/go-analyzer.js.map +1 -0
  236. package/dist/go/index.d.ts +7 -0
  237. package/dist/go/index.d.ts.map +1 -0
  238. package/dist/go/index.js +8 -0
  239. package/dist/go/index.js.map +1 -0
  240. package/dist/index.d.ts +25 -0
  241. package/dist/index.d.ts.map +1 -1
  242. package/dist/index.js +85 -0
  243. package/dist/index.js.map +1 -1
  244. package/dist/lake/pattern-shard-store.d.ts +6 -0
  245. package/dist/lake/pattern-shard-store.d.ts.map +1 -1
  246. package/dist/lake/pattern-shard-store.js +6 -0
  247. package/dist/lake/pattern-shard-store.js.map +1 -1
  248. package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
  249. package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
  250. package/dist/module-coupling/coupling-analyzer.js +668 -0
  251. package/dist/module-coupling/coupling-analyzer.js.map +1 -0
  252. package/dist/module-coupling/index.d.ts +9 -0
  253. package/dist/module-coupling/index.d.ts.map +1 -0
  254. package/dist/module-coupling/index.js +9 -0
  255. package/dist/module-coupling/index.js.map +1 -0
  256. package/dist/module-coupling/types.d.ts +273 -0
  257. package/dist/module-coupling/types.d.ts.map +1 -0
  258. package/dist/module-coupling/types.js +8 -0
  259. package/dist/module-coupling/types.js.map +1 -0
  260. package/dist/parsers/tree-sitter/go-loader.d.ts +50 -0
  261. package/dist/parsers/tree-sitter/go-loader.d.ts.map +1 -0
  262. package/dist/parsers/tree-sitter/go-loader.js +161 -0
  263. package/dist/parsers/tree-sitter/go-loader.js.map +1 -0
  264. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts +250 -0
  265. package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts.map +1 -0
  266. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js +707 -0
  267. package/dist/parsers/tree-sitter/tree-sitter-go-parser.js.map +1 -0
  268. package/dist/parsers/types.d.ts +1 -1
  269. package/dist/parsers/types.d.ts.map +1 -1
  270. package/dist/patterns/adapters/index.d.ts +11 -0
  271. package/dist/patterns/adapters/index.d.ts.map +1 -0
  272. package/dist/patterns/adapters/index.js +11 -0
  273. package/dist/patterns/adapters/index.js.map +1 -0
  274. package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
  275. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
  276. package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
  277. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
  278. package/dist/patterns/adapters/service-factory.d.ts +40 -0
  279. package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
  280. package/dist/patterns/adapters/service-factory.js +144 -0
  281. package/dist/patterns/adapters/service-factory.js.map +1 -0
  282. package/dist/patterns/errors.d.ts +32 -0
  283. package/dist/patterns/errors.d.ts.map +1 -0
  284. package/dist/patterns/errors.js +45 -0
  285. package/dist/patterns/errors.js.map +1 -0
  286. package/dist/patterns/impl/cached-repository.d.ts +79 -0
  287. package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
  288. package/dist/patterns/impl/cached-repository.js +296 -0
  289. package/dist/patterns/impl/cached-repository.js.map +1 -0
  290. package/dist/patterns/impl/file-repository.d.ts +75 -0
  291. package/dist/patterns/impl/file-repository.d.ts.map +1 -0
  292. package/dist/patterns/impl/file-repository.js +507 -0
  293. package/dist/patterns/impl/file-repository.js.map +1 -0
  294. package/dist/patterns/impl/index.d.ts +16 -0
  295. package/dist/patterns/impl/index.d.ts.map +1 -0
  296. package/dist/patterns/impl/index.js +21 -0
  297. package/dist/patterns/impl/index.js.map +1 -0
  298. package/dist/patterns/impl/memory-repository.d.ts +56 -0
  299. package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
  300. package/dist/patterns/impl/memory-repository.js +323 -0
  301. package/dist/patterns/impl/memory-repository.js.map +1 -0
  302. package/dist/patterns/impl/pattern-service.d.ts +52 -0
  303. package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
  304. package/dist/patterns/impl/pattern-service.js +382 -0
  305. package/dist/patterns/impl/pattern-service.js.map +1 -0
  306. package/dist/patterns/impl/repository-factory.d.ts +44 -0
  307. package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
  308. package/dist/patterns/impl/repository-factory.js +140 -0
  309. package/dist/patterns/impl/repository-factory.js.map +1 -0
  310. package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
  311. package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
  312. package/dist/patterns/impl/unified-file-repository.js +677 -0
  313. package/dist/patterns/impl/unified-file-repository.js.map +1 -0
  314. package/dist/patterns/index.d.ts +23 -0
  315. package/dist/patterns/index.d.ts.map +1 -0
  316. package/dist/patterns/index.js +41 -0
  317. package/dist/patterns/index.js.map +1 -0
  318. package/dist/patterns/repository.d.ts +241 -0
  319. package/dist/patterns/repository.d.ts.map +1 -0
  320. package/dist/patterns/repository.js +23 -0
  321. package/dist/patterns/repository.js.map +1 -0
  322. package/dist/patterns/service.d.ts +245 -0
  323. package/dist/patterns/service.d.ts.map +1 -0
  324. package/dist/patterns/service.js +25 -0
  325. package/dist/patterns/service.js.map +1 -0
  326. package/dist/patterns/types.d.ts +227 -0
  327. package/dist/patterns/types.d.ts.map +1 -0
  328. package/dist/patterns/types.js +117 -0
  329. package/dist/patterns/types.js.map +1 -0
  330. package/dist/simulation/approach-generator.d.ts +73 -0
  331. package/dist/simulation/approach-generator.d.ts.map +1 -0
  332. package/dist/simulation/approach-generator.js +371 -0
  333. package/dist/simulation/approach-generator.js.map +1 -0
  334. package/dist/simulation/index.d.ts +14 -0
  335. package/dist/simulation/index.d.ts.map +1 -0
  336. package/dist/simulation/index.js +19 -0
  337. package/dist/simulation/index.js.map +1 -0
  338. package/dist/simulation/language-strategies/csharp-strategies.d.ts +17 -0
  339. package/dist/simulation/language-strategies/csharp-strategies.d.ts.map +1 -0
  340. package/dist/simulation/language-strategies/csharp-strategies.js +118 -0
  341. package/dist/simulation/language-strategies/csharp-strategies.js.map +1 -0
  342. package/dist/simulation/language-strategies/index.d.ts +41 -0
  343. package/dist/simulation/language-strategies/index.d.ts.map +1 -0
  344. package/dist/simulation/language-strategies/index.js +92 -0
  345. package/dist/simulation/language-strategies/index.js.map +1 -0
  346. package/dist/simulation/language-strategies/java-strategies.d.ts +17 -0
  347. package/dist/simulation/language-strategies/java-strategies.d.ts.map +1 -0
  348. package/dist/simulation/language-strategies/java-strategies.js +119 -0
  349. package/dist/simulation/language-strategies/java-strategies.js.map +1 -0
  350. package/dist/simulation/language-strategies/php-strategies.d.ts +17 -0
  351. package/dist/simulation/language-strategies/php-strategies.d.ts.map +1 -0
  352. package/dist/simulation/language-strategies/php-strategies.js +129 -0
  353. package/dist/simulation/language-strategies/php-strategies.js.map +1 -0
  354. package/dist/simulation/language-strategies/python-strategies.d.ts +17 -0
  355. package/dist/simulation/language-strategies/python-strategies.d.ts.map +1 -0
  356. package/dist/simulation/language-strategies/python-strategies.js +208 -0
  357. package/dist/simulation/language-strategies/python-strategies.js.map +1 -0
  358. package/dist/simulation/language-strategies/types.d.ts +67 -0
  359. package/dist/simulation/language-strategies/types.d.ts.map +1 -0
  360. package/dist/simulation/language-strategies/types.js +23 -0
  361. package/dist/simulation/language-strategies/types.js.map +1 -0
  362. package/dist/simulation/language-strategies/typescript-strategies.d.ts +17 -0
  363. package/dist/simulation/language-strategies/typescript-strategies.d.ts.map +1 -0
  364. package/dist/simulation/language-strategies/typescript-strategies.js +251 -0
  365. package/dist/simulation/language-strategies/typescript-strategies.js.map +1 -0
  366. package/dist/simulation/scorers/friction-scorer.d.ts +45 -0
  367. package/dist/simulation/scorers/friction-scorer.d.ts.map +1 -0
  368. package/dist/simulation/scorers/friction-scorer.js +336 -0
  369. package/dist/simulation/scorers/friction-scorer.js.map +1 -0
  370. package/dist/simulation/scorers/impact-scorer.d.ts +56 -0
  371. package/dist/simulation/scorers/impact-scorer.d.ts.map +1 -0
  372. package/dist/simulation/scorers/impact-scorer.js +273 -0
  373. package/dist/simulation/scorers/impact-scorer.js.map +1 -0
  374. package/dist/simulation/scorers/index.d.ts +12 -0
  375. package/dist/simulation/scorers/index.d.ts.map +1 -0
  376. package/dist/simulation/scorers/index.js +12 -0
  377. package/dist/simulation/scorers/index.js.map +1 -0
  378. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts +83 -0
  379. package/dist/simulation/scorers/pattern-alignment-scorer.d.ts.map +1 -0
  380. package/dist/simulation/scorers/pattern-alignment-scorer.js +367 -0
  381. package/dist/simulation/scorers/pattern-alignment-scorer.js.map +1 -0
  382. package/dist/simulation/scorers/security-scorer.d.ts +63 -0
  383. package/dist/simulation/scorers/security-scorer.d.ts.map +1 -0
  384. package/dist/simulation/scorers/security-scorer.js +346 -0
  385. package/dist/simulation/scorers/security-scorer.js.map +1 -0
  386. package/dist/simulation/simulation-engine.d.ts +89 -0
  387. package/dist/simulation/simulation-engine.d.ts.map +1 -0
  388. package/dist/simulation/simulation-engine.js +480 -0
  389. package/dist/simulation/simulation-engine.js.map +1 -0
  390. package/dist/simulation/types.d.ts +200 -0
  391. package/dist/simulation/types.d.ts.map +1 -0
  392. package/dist/simulation/types.js +23 -0
  393. package/dist/simulation/types.js.map +1 -0
  394. package/dist/speculative/approach-generator.d.ts +2 -0
  395. package/dist/speculative/approach-generator.d.ts.map +1 -0
  396. package/dist/speculative/approach-generator.js +2 -0
  397. package/dist/speculative/approach-generator.js.map +1 -0
  398. package/dist/speculative/templates/types.d.ts +133 -0
  399. package/dist/speculative/templates/types.d.ts.map +1 -0
  400. package/dist/speculative/templates/types.js +208 -0
  401. package/dist/speculative/templates/types.js.map +1 -0
  402. package/dist/speculative/types.d.ts +523 -0
  403. package/dist/speculative/types.d.ts.map +1 -0
  404. package/dist/speculative/types.js +71 -0
  405. package/dist/speculative/types.js.map +1 -0
  406. package/dist/store/pattern-store.d.ts +6 -0
  407. package/dist/store/pattern-store.d.ts.map +1 -1
  408. package/dist/store/pattern-store.js +6 -0
  409. package/dist/store/pattern-store.js.map +1 -1
  410. package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
  411. package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
  412. package/dist/test-topology/extractors/base-test-extractor.js +187 -0
  413. package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
  414. package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
  415. package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
  416. package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
  417. package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
  418. package/dist/test-topology/extractors/go-test-extractor.d.ts +33 -0
  419. package/dist/test-topology/extractors/go-test-extractor.d.ts.map +1 -0
  420. package/dist/test-topology/extractors/go-test-extractor.js +436 -0
  421. package/dist/test-topology/extractors/go-test-extractor.js.map +1 -0
  422. package/dist/test-topology/extractors/index.d.ts +13 -0
  423. package/dist/test-topology/extractors/index.d.ts.map +1 -0
  424. package/dist/test-topology/extractors/index.js +13 -0
  425. package/dist/test-topology/extractors/index.js.map +1 -0
  426. package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
  427. package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
  428. package/dist/test-topology/extractors/java-test-extractor.js +275 -0
  429. package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
  430. package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
  431. package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
  432. package/dist/test-topology/extractors/php-test-extractor.js +409 -0
  433. package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
  434. package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
  435. package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
  436. package/dist/test-topology/extractors/python-test-extractor.js +342 -0
  437. package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
  438. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
  439. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
  440. package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
  441. package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
  442. package/dist/test-topology/extractors/regex/go-test-regex.d.ts +62 -0
  443. package/dist/test-topology/extractors/regex/go-test-regex.d.ts.map +1 -0
  444. package/dist/test-topology/extractors/regex/go-test-regex.js +528 -0
  445. package/dist/test-topology/extractors/regex/go-test-regex.js.map +1 -0
  446. package/dist/test-topology/extractors/regex/index.d.ts +19 -0
  447. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
  448. package/dist/test-topology/extractors/regex/index.js +47 -0
  449. package/dist/test-topology/extractors/regex/index.js.map +1 -0
  450. package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
  451. package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
  452. package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
  453. package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
  454. package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
  455. package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
  456. package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
  457. package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
  458. package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
  459. package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
  460. package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
  461. package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
  462. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
  463. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
  464. package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
  465. package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
  466. package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
  467. package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
  468. package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
  469. package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
  470. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
  471. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
  472. package/dist/test-topology/hybrid-test-topology-analyzer.js +556 -0
  473. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
  474. package/dist/test-topology/index.d.ts +16 -0
  475. package/dist/test-topology/index.d.ts.map +1 -0
  476. package/dist/test-topology/index.js +19 -0
  477. package/dist/test-topology/index.js.map +1 -0
  478. package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
  479. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
  480. package/dist/test-topology/test-topology-analyzer.js +539 -0
  481. package/dist/test-topology/test-topology-analyzer.js.map +1 -0
  482. package/dist/test-topology/types.d.ts +300 -0
  483. package/dist/test-topology/types.d.ts.map +1 -0
  484. package/dist/test-topology/types.js +7 -0
  485. package/dist/test-topology/types.js.map +1 -0
  486. package/dist/unified-provider/matching/database-sql-matcher.d.ts +42 -0
  487. package/dist/unified-provider/matching/database-sql-matcher.d.ts.map +1 -0
  488. package/dist/unified-provider/matching/database-sql-matcher.js +282 -0
  489. package/dist/unified-provider/matching/database-sql-matcher.js.map +1 -0
  490. package/dist/unified-provider/matching/gorm-matcher.d.ts +41 -0
  491. package/dist/unified-provider/matching/gorm-matcher.d.ts.map +1 -0
  492. package/dist/unified-provider/matching/gorm-matcher.js +222 -0
  493. package/dist/unified-provider/matching/gorm-matcher.js.map +1 -0
  494. package/dist/unified-provider/matching/index.d.ts +3 -0
  495. package/dist/unified-provider/matching/index.d.ts.map +1 -1
  496. package/dist/unified-provider/matching/index.js +4 -0
  497. package/dist/unified-provider/matching/index.js.map +1 -1
  498. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
  499. package/dist/unified-provider/matching/matcher-registry.js +7 -0
  500. package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
  501. package/dist/unified-provider/matching/sqlx-matcher.d.ts +40 -0
  502. package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -0
  503. package/dist/unified-provider/matching/sqlx-matcher.js +214 -0
  504. package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -0
  505. package/dist/unified-provider/normalization/go-normalizer.d.ts +62 -0
  506. package/dist/unified-provider/normalization/go-normalizer.d.ts.map +1 -0
  507. package/dist/unified-provider/normalization/go-normalizer.js +608 -0
  508. package/dist/unified-provider/normalization/go-normalizer.js.map +1 -0
  509. package/dist/unified-provider/normalization/index.d.ts +1 -0
  510. package/dist/unified-provider/normalization/index.d.ts.map +1 -1
  511. package/dist/unified-provider/normalization/index.js +6 -1
  512. package/dist/unified-provider/normalization/index.js.map +1 -1
  513. package/dist/unified-provider/types.d.ts +1 -1
  514. package/dist/unified-provider/types.d.ts.map +1 -1
  515. package/dist/wpf/extractors/binding-error-detector.d.ts +75 -0
  516. package/dist/wpf/extractors/binding-error-detector.d.ts.map +1 -0
  517. package/dist/wpf/extractors/binding-error-detector.js +290 -0
  518. package/dist/wpf/extractors/binding-error-detector.js.map +1 -0
  519. package/dist/wpf/extractors/code-behind-linker.d.ts +70 -0
  520. package/dist/wpf/extractors/code-behind-linker.d.ts.map +1 -0
  521. package/dist/wpf/extractors/code-behind-linker.js +172 -0
  522. package/dist/wpf/extractors/code-behind-linker.js.map +1 -0
  523. package/dist/wpf/extractors/dependency-property-extractor.d.ts +61 -0
  524. package/dist/wpf/extractors/dependency-property-extractor.d.ts.map +1 -0
  525. package/dist/wpf/extractors/dependency-property-extractor.js +201 -0
  526. package/dist/wpf/extractors/dependency-property-extractor.js.map +1 -0
  527. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts +82 -0
  528. package/dist/wpf/extractors/regex/viewmodel-regex.d.ts.map +1 -0
  529. package/dist/wpf/extractors/regex/viewmodel-regex.js +412 -0
  530. package/dist/wpf/extractors/regex/viewmodel-regex.js.map +1 -0
  531. package/dist/wpf/extractors/regex/xaml-regex.d.ts +77 -0
  532. package/dist/wpf/extractors/regex/xaml-regex.d.ts.map +1 -0
  533. package/dist/wpf/extractors/regex/xaml-regex.js +353 -0
  534. package/dist/wpf/extractors/regex/xaml-regex.js.map +1 -0
  535. package/dist/wpf/extractors/resource-dictionary-parser.d.ts +103 -0
  536. package/dist/wpf/extractors/resource-dictionary-parser.d.ts.map +1 -0
  537. package/dist/wpf/extractors/resource-dictionary-parser.js +296 -0
  538. package/dist/wpf/extractors/resource-dictionary-parser.js.map +1 -0
  539. package/dist/wpf/extractors/value-converter-extractor.d.ts +128 -0
  540. package/dist/wpf/extractors/value-converter-extractor.d.ts.map +1 -0
  541. package/dist/wpf/extractors/value-converter-extractor.js +312 -0
  542. package/dist/wpf/extractors/value-converter-extractor.js.map +1 -0
  543. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts +104 -0
  544. package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts.map +1 -0
  545. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js +513 -0
  546. package/dist/wpf/extractors/viewmodel-hybrid-extractor.js.map +1 -0
  547. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts +98 -0
  548. package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts.map +1 -0
  549. package/dist/wpf/extractors/xaml-hybrid-extractor.js +444 -0
  550. package/dist/wpf/extractors/xaml-hybrid-extractor.js.map +1 -0
  551. package/dist/wpf/index.d.ts +25 -0
  552. package/dist/wpf/index.d.ts.map +1 -0
  553. package/dist/wpf/index.js +31 -0
  554. package/dist/wpf/index.js.map +1 -0
  555. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts +82 -0
  556. package/dist/wpf/integration/wpf-callgraph-adapter.d.ts.map +1 -0
  557. package/dist/wpf/integration/wpf-callgraph-adapter.js +311 -0
  558. package/dist/wpf/integration/wpf-callgraph-adapter.js.map +1 -0
  559. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts +129 -0
  560. package/dist/wpf/integration/wpf-data-flow-tracer.d.ts.map +1 -0
  561. package/dist/wpf/integration/wpf-data-flow-tracer.js +367 -0
  562. package/dist/wpf/integration/wpf-data-flow-tracer.js.map +1 -0
  563. package/dist/wpf/linkers/datacontext-resolver.d.ts +66 -0
  564. package/dist/wpf/linkers/datacontext-resolver.d.ts.map +1 -0
  565. package/dist/wpf/linkers/datacontext-resolver.js +240 -0
  566. package/dist/wpf/linkers/datacontext-resolver.js.map +1 -0
  567. package/dist/wpf/linkers/viewmodel-linker.d.ts +71 -0
  568. package/dist/wpf/linkers/viewmodel-linker.d.ts.map +1 -0
  569. package/dist/wpf/linkers/viewmodel-linker.js +268 -0
  570. package/dist/wpf/linkers/viewmodel-linker.js.map +1 -0
  571. package/dist/wpf/types.d.ts +451 -0
  572. package/dist/wpf/types.d.ts.map +1 -0
  573. package/dist/wpf/types.js +8 -0
  574. package/dist/wpf/types.js.map +1 -0
  575. package/dist/wpf/wpf-analyzer.d.ts +114 -0
  576. package/dist/wpf/wpf-analyzer.d.ts.map +1 -0
  577. package/dist/wpf/wpf-analyzer.js +332 -0
  578. package/dist/wpf/wpf-analyzer.js.map +1 -0
  579. package/dist/wrappers/clustering/clusterer.d.ts +43 -0
  580. package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
  581. package/dist/wrappers/clustering/clusterer.js +374 -0
  582. package/dist/wrappers/clustering/clusterer.js.map +1 -0
  583. package/dist/wrappers/clustering/exclusions.d.ts +47 -0
  584. package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
  585. package/dist/wrappers/clustering/exclusions.js +318 -0
  586. package/dist/wrappers/clustering/exclusions.js.map +1 -0
  587. package/dist/wrappers/clustering/index.d.ts +6 -0
  588. package/dist/wrappers/clustering/index.d.ts.map +1 -0
  589. package/dist/wrappers/clustering/index.js +6 -0
  590. package/dist/wrappers/clustering/index.js.map +1 -0
  591. package/dist/wrappers/detection/detector.d.ts +69 -0
  592. package/dist/wrappers/detection/detector.d.ts.map +1 -0
  593. package/dist/wrappers/detection/detector.js +279 -0
  594. package/dist/wrappers/detection/detector.js.map +1 -0
  595. package/dist/wrappers/detection/index.d.ts +5 -0
  596. package/dist/wrappers/detection/index.d.ts.map +1 -0
  597. package/dist/wrappers/detection/index.js +5 -0
  598. package/dist/wrappers/detection/index.js.map +1 -0
  599. package/dist/wrappers/export/index.d.ts +5 -0
  600. package/dist/wrappers/export/index.d.ts.map +1 -0
  601. package/dist/wrappers/export/index.js +5 -0
  602. package/dist/wrappers/export/index.js.map +1 -0
  603. package/dist/wrappers/export/json.d.ts +127 -0
  604. package/dist/wrappers/export/json.d.ts.map +1 -0
  605. package/dist/wrappers/export/json.js +160 -0
  606. package/dist/wrappers/export/json.js.map +1 -0
  607. package/dist/wrappers/index.d.ts +56 -0
  608. package/dist/wrappers/index.d.ts.map +1 -0
  609. package/dist/wrappers/index.js +159 -0
  610. package/dist/wrappers/index.js.map +1 -0
  611. package/dist/wrappers/integration/adapter.d.ts +52 -0
  612. package/dist/wrappers/integration/adapter.d.ts.map +1 -0
  613. package/dist/wrappers/integration/adapter.js +210 -0
  614. package/dist/wrappers/integration/adapter.js.map +1 -0
  615. package/dist/wrappers/integration/index.d.ts +9 -0
  616. package/dist/wrappers/integration/index.d.ts.map +1 -0
  617. package/dist/wrappers/integration/index.js +12 -0
  618. package/dist/wrappers/integration/index.js.map +1 -0
  619. package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
  620. package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
  621. package/dist/wrappers/integration/pattern-adapter.js +192 -0
  622. package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
  623. package/dist/wrappers/integration/scanner.d.ts +85 -0
  624. package/dist/wrappers/integration/scanner.d.ts.map +1 -0
  625. package/dist/wrappers/integration/scanner.js +367 -0
  626. package/dist/wrappers/integration/scanner.js.map +1 -0
  627. package/dist/wrappers/primitives/discovery.d.ts +57 -0
  628. package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
  629. package/dist/wrappers/primitives/discovery.js +389 -0
  630. package/dist/wrappers/primitives/discovery.js.map +1 -0
  631. package/dist/wrappers/primitives/index.d.ts +6 -0
  632. package/dist/wrappers/primitives/index.d.ts.map +1 -0
  633. package/dist/wrappers/primitives/index.js +6 -0
  634. package/dist/wrappers/primitives/index.js.map +1 -0
  635. package/dist/wrappers/primitives/registry.d.ts +63 -0
  636. package/dist/wrappers/primitives/registry.d.ts.map +1 -0
  637. package/dist/wrappers/primitives/registry.js +447 -0
  638. package/dist/wrappers/primitives/registry.js.map +1 -0
  639. package/dist/wrappers/types.d.ts +137 -0
  640. package/dist/wrappers/types.d.ts.map +1 -0
  641. package/dist/wrappers/types.js +7 -0
  642. package/dist/wrappers/types.js.map +1 -0
  643. package/package.json +33 -18
  644. package/LICENSE +0 -21
@@ -0,0 +1,368 @@
1
+ /**
2
+ * TypeScript/JavaScript Test Regex Extractor
3
+ *
4
+ * Regex-based fallback for extracting test information when tree-sitter is unavailable.
5
+ * Supports Jest, Vitest, Mocha, and other JS test frameworks.
6
+ */
7
+ // ============================================================================
8
+ // Patterns
9
+ // ============================================================================
10
+ const FRAMEWORK_PATTERNS = {
11
+ 'vitest': 'vitest',
12
+ '@jest/globals': 'jest',
13
+ 'jest': 'jest',
14
+ 'mocha': 'mocha',
15
+ 'chai': 'mocha',
16
+ 'ava': 'ava',
17
+ 'tape': 'tape',
18
+ };
19
+ // ============================================================================
20
+ // Extractor
21
+ // ============================================================================
22
+ export class TypeScriptTestRegexExtractor {
23
+ language = 'typescript';
24
+ extensions = ['.ts', '.tsx', '.js', '.jsx', '.mts', '.cts', '.mjs', '.cjs'];
25
+ /**
26
+ * Extract test information using regex patterns
27
+ */
28
+ extract(content, filePath) {
29
+ const framework = this.detectFramework(content);
30
+ const testCases = this.extractTestCases(content, filePath);
31
+ const mocks = this.extractMocks(content, framework);
32
+ const setupBlocks = this.extractSetupBlocks(content);
33
+ // Enrich test cases with quality
34
+ for (const test of testCases) {
35
+ const testMocks = mocks.filter(m => m.line >= test.line && m.line <= test.line + 100);
36
+ test.quality = this.calculateQuality(test.assertions, testMocks, test.directCalls);
37
+ }
38
+ return {
39
+ file: filePath,
40
+ framework,
41
+ language: this.getLanguageFromPath(filePath),
42
+ testCases,
43
+ mocks,
44
+ setupBlocks,
45
+ };
46
+ }
47
+ getLanguageFromPath(filePath) {
48
+ return filePath.endsWith('.ts') || filePath.endsWith('.tsx') ? 'typescript' : 'javascript';
49
+ }
50
+ /**
51
+ * Detect test framework from imports
52
+ */
53
+ detectFramework(content) {
54
+ // Check imports
55
+ const importPattern = /import\s+.*?from\s+['"]([^'"]+)['"]/g;
56
+ let match;
57
+ while ((match = importPattern.exec(content)) !== null) {
58
+ const source = match[1];
59
+ const framework = FRAMEWORK_PATTERNS[source];
60
+ if (framework)
61
+ return framework;
62
+ }
63
+ // Check require
64
+ const requirePattern = /require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
65
+ while ((match = requirePattern.exec(content)) !== null) {
66
+ const source = match[1];
67
+ const framework = FRAMEWORK_PATTERNS[source];
68
+ if (framework)
69
+ return framework;
70
+ }
71
+ // Check for global usage
72
+ if (/\bvi\.(mock|spyOn|fn)\b/.test(content))
73
+ return 'vitest';
74
+ if (/\bjest\.(mock|spyOn|fn)\b/.test(content))
75
+ return 'jest';
76
+ // Default to jest if we see test/describe/it
77
+ if (/\b(describe|it|test)\s*\(/.test(content))
78
+ return 'jest';
79
+ return 'unknown';
80
+ }
81
+ /**
82
+ * Extract test cases using regex
83
+ */
84
+ extractTestCases(content, filePath) {
85
+ const testCases = [];
86
+ const lines = content.split('\n');
87
+ // Track describe blocks for qualified names
88
+ const describeStack = [];
89
+ // Pattern for describe blocks
90
+ const describePattern = /^\s*(describe|context)\s*\(\s*['"`]([^'"`]+)['"`]/;
91
+ // Pattern for test blocks
92
+ const testPattern = /^\s*(it|test)\s*\(\s*['"`]([^'"`]+)['"`]/;
93
+ // Pattern for closing braces (simplified)
94
+ const closePattern = /^\s*\}\s*\)/;
95
+ for (let i = 0; i < lines.length; i++) {
96
+ const line = lines[i];
97
+ const lineNum = i + 1;
98
+ // Check for describe
99
+ const describeMatch = line.match(describePattern);
100
+ if (describeMatch) {
101
+ describeStack.push({ name: describeMatch[2], line: lineNum });
102
+ continue;
103
+ }
104
+ // Check for test
105
+ const testMatch = line.match(testPattern);
106
+ if (testMatch) {
107
+ const testName = testMatch[2];
108
+ const parentBlock = describeStack.length > 0
109
+ ? describeStack[describeStack.length - 1].name
110
+ : undefined;
111
+ const qualifiedName = describeStack.length > 0
112
+ ? `${describeStack.map(d => d.name).join(' > ')} > ${testName}`
113
+ : testName;
114
+ // Find the test body (rough approximation)
115
+ const testBody = this.extractTestBody(lines, i);
116
+ const directCalls = this.extractFunctionCalls(testBody);
117
+ const assertions = this.extractAssertions(testBody, lineNum);
118
+ testCases.push({
119
+ id: `${filePath}:${testName}:${lineNum}`,
120
+ name: testName,
121
+ parentBlock,
122
+ qualifiedName,
123
+ file: filePath,
124
+ line: lineNum,
125
+ directCalls,
126
+ transitiveCalls: [],
127
+ assertions,
128
+ quality: {
129
+ assertionCount: assertions.length,
130
+ hasErrorCases: false,
131
+ hasEdgeCases: false,
132
+ mockRatio: 0,
133
+ setupRatio: 0,
134
+ score: 50,
135
+ },
136
+ });
137
+ continue;
138
+ }
139
+ // Check for closing (pop describe stack)
140
+ if (closePattern.test(line) && describeStack.length > 0) {
141
+ // This is a rough heuristic - we pop when we see }); at the right indentation
142
+ const indent = line.search(/\S/);
143
+ const lastDescribe = describeStack[describeStack.length - 1];
144
+ if (lastDescribe) {
145
+ const describeIndent = (lines[lastDescribe.line - 1] ?? '').search(/\S/);
146
+ if (indent <= describeIndent) {
147
+ describeStack.pop();
148
+ }
149
+ }
150
+ }
151
+ }
152
+ return testCases;
153
+ }
154
+ /**
155
+ * Extract the body of a test (rough approximation)
156
+ */
157
+ extractTestBody(lines, startIndex) {
158
+ const bodyLines = [];
159
+ let braceCount = 0;
160
+ let started = false;
161
+ for (let i = startIndex; i < Math.min(startIndex + 100, lines.length); i++) {
162
+ const line = lines[i];
163
+ for (const char of line) {
164
+ if (char === '{' || char === '(') {
165
+ braceCount++;
166
+ started = true;
167
+ }
168
+ else if (char === '}' || char === ')') {
169
+ braceCount--;
170
+ }
171
+ }
172
+ bodyLines.push(line);
173
+ if (started && braceCount <= 0) {
174
+ break;
175
+ }
176
+ }
177
+ return bodyLines.join('\n');
178
+ }
179
+ /**
180
+ * Extract function calls from test body
181
+ */
182
+ extractFunctionCalls(body) {
183
+ const calls = [];
184
+ const seen = new Set();
185
+ // Pattern for function calls: identifier(
186
+ const callPattern = /\b([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/g;
187
+ let match;
188
+ while ((match = callPattern.exec(body)) !== null) {
189
+ const name = match[1];
190
+ // Skip test framework calls
191
+ if (this.isTestFrameworkCall(name))
192
+ continue;
193
+ if (!seen.has(name)) {
194
+ seen.add(name);
195
+ calls.push(name);
196
+ }
197
+ }
198
+ // Pattern for method calls: obj.method(
199
+ const methodPattern = /\.([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/g;
200
+ while ((match = methodPattern.exec(body)) !== null) {
201
+ const name = match[1];
202
+ if (this.isTestFrameworkCall(name))
203
+ continue;
204
+ if (!seen.has(name)) {
205
+ seen.add(name);
206
+ calls.push(name);
207
+ }
208
+ }
209
+ return calls;
210
+ }
211
+ /**
212
+ * Extract assertions from test body
213
+ */
214
+ extractAssertions(body, baseLineNum) {
215
+ const assertions = [];
216
+ const lines = body.split('\n');
217
+ // Pattern for expect(...).matcher
218
+ const expectPattern = /expect\s*\([^)]*\)\s*\.(\w+)/g;
219
+ for (let i = 0; i < lines.length; i++) {
220
+ const line = lines[i];
221
+ let match;
222
+ while ((match = expectPattern.exec(line)) !== null) {
223
+ const matcher = match[1];
224
+ assertions.push({
225
+ matcher,
226
+ line: baseLineNum + i,
227
+ isErrorAssertion: this.isErrorMatcher(matcher),
228
+ isEdgeCaseAssertion: this.isEdgeCaseMatcher(matcher),
229
+ });
230
+ }
231
+ }
232
+ return assertions;
233
+ }
234
+ /**
235
+ * Extract mock statements
236
+ */
237
+ extractMocks(content, framework) {
238
+ const mocks = [];
239
+ const lines = content.split('\n');
240
+ const mockObj = framework === 'vitest' ? 'vi' : 'jest';
241
+ // Pattern for jest.mock() or vi.mock()
242
+ const mockPattern = new RegExp(`${mockObj}\\.mock\\s*\\(\\s*['"\`]([^'"\`]+)['"\`]`, 'g');
243
+ // Pattern for jest.spyOn() or vi.spyOn()
244
+ const spyPattern = new RegExp(`${mockObj}\\.spyOn\\s*\\(\\s*(\\w+)\\s*,\\s*['"\`]([^'"\`]+)['"\`]`, 'g');
245
+ for (let i = 0; i < lines.length; i++) {
246
+ const line = lines[i];
247
+ const lineNum = i + 1;
248
+ let match;
249
+ // Check for mock
250
+ while ((match = mockPattern.exec(line)) !== null) {
251
+ const target = match[1];
252
+ mocks.push({
253
+ target,
254
+ mockType: `${mockObj}.mock`,
255
+ line: lineNum,
256
+ isExternal: this.isExternalModule(target),
257
+ hasImplementation: line.includes(','),
258
+ });
259
+ }
260
+ // Check for spyOn
261
+ while ((match = spyPattern.exec(line)) !== null) {
262
+ const obj = match[1];
263
+ const method = match[2];
264
+ mocks.push({
265
+ target: `${obj}.${method}`,
266
+ mockType: `${mockObj}.spyOn`,
267
+ line: lineNum,
268
+ isExternal: false,
269
+ });
270
+ }
271
+ }
272
+ return mocks;
273
+ }
274
+ /**
275
+ * Extract setup blocks
276
+ */
277
+ extractSetupBlocks(content) {
278
+ const blocks = [];
279
+ const lines = content.split('\n');
280
+ const setupFns = ['beforeEach', 'afterEach', 'beforeAll', 'afterAll'];
281
+ for (let i = 0; i < lines.length; i++) {
282
+ const line = lines[i];
283
+ const lineNum = i + 1;
284
+ for (const fn of setupFns) {
285
+ const pattern = new RegExp(`^\\s*${fn}\\s*\\(`);
286
+ if (pattern.test(line)) {
287
+ const body = this.extractTestBody(lines, i);
288
+ const calls = this.extractFunctionCalls(body);
289
+ blocks.push({
290
+ type: fn,
291
+ line: lineNum,
292
+ calls,
293
+ });
294
+ break;
295
+ }
296
+ }
297
+ }
298
+ return blocks;
299
+ }
300
+ /**
301
+ * Check if a call is a test framework call
302
+ */
303
+ isTestFrameworkCall(name) {
304
+ const frameworkCalls = [
305
+ 'describe', 'it', 'test', 'expect', 'beforeEach', 'afterEach',
306
+ 'beforeAll', 'afterAll', 'jest', 'vi', 'mock', 'spyOn', 'fn',
307
+ 'toBe', 'toEqual', 'toHaveBeenCalled', 'toThrow', 'toMatch',
308
+ 'toContain', 'toBeTruthy', 'toBeFalsy', 'toBeNull', 'toBeUndefined',
309
+ 'toHaveLength', 'toHaveProperty', 'toMatchSnapshot', 'toMatchInlineSnapshot',
310
+ ];
311
+ return frameworkCalls.includes(name);
312
+ }
313
+ isErrorMatcher(matcher) {
314
+ const errorMatchers = ['toThrow', 'toThrowError', 'toThrowErrorMatchingSnapshot', 'rejects', 'toReject'];
315
+ return errorMatchers.some(m => matcher.includes(m));
316
+ }
317
+ isEdgeCaseMatcher(matcher) {
318
+ const edgeCaseMatchers = ['toBeNull', 'toBeUndefined', 'toBeFalsy', 'toBeNaN', 'toHaveLength', 'toBeEmpty'];
319
+ return edgeCaseMatchers.some(m => matcher.includes(m));
320
+ }
321
+ isExternalModule(modulePath) {
322
+ if (modulePath.startsWith('.') || modulePath.startsWith('/'))
323
+ return false;
324
+ if (modulePath.startsWith('@/') || modulePath.startsWith('~/'))
325
+ return false;
326
+ return true;
327
+ }
328
+ /**
329
+ * Calculate test quality signals
330
+ */
331
+ calculateQuality(assertions, mocks, directCalls) {
332
+ const assertionCount = assertions.length;
333
+ const hasErrorCases = assertions.some(a => a.isErrorAssertion);
334
+ const hasEdgeCases = assertions.some(a => a.isEdgeCaseAssertion);
335
+ const totalCalls = mocks.length + directCalls.length;
336
+ const mockRatio = totalCalls > 0 ? mocks.length / totalCalls : 0;
337
+ let score = 50;
338
+ if (assertionCount >= 1)
339
+ score += 10;
340
+ if (assertionCount >= 3)
341
+ score += 10;
342
+ if (hasErrorCases)
343
+ score += 15;
344
+ if (hasEdgeCases)
345
+ score += 10;
346
+ if (mockRatio > 0.7)
347
+ score -= 15;
348
+ else if (mockRatio > 0.5)
349
+ score -= 5;
350
+ if (assertionCount === 0)
351
+ score -= 20;
352
+ return {
353
+ assertionCount,
354
+ hasErrorCases,
355
+ hasEdgeCases,
356
+ mockRatio: Math.round(mockRatio * 100) / 100,
357
+ setupRatio: 0,
358
+ score: Math.max(0, Math.min(100, score)),
359
+ };
360
+ }
361
+ }
362
+ /**
363
+ * Factory function
364
+ */
365
+ export function createTypeScriptTestRegexExtractor() {
366
+ return new TypeScriptTestRegexExtractor();
367
+ }
368
+ //# sourceMappingURL=typescript-test-regex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript-test-regex.js","sourceRoot":"","sources":["../../../../src/test-topology/extractors/regex/typescript-test-regex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAE/E,MAAM,kBAAkB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CAAC,CAAC,CAAC,CAAC;QAEjE,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,cAAc,IAAI,CAAC;YAAE,KAAK,IAAI,EAAE,CAAC;QACrC,IAAI,cAAc,IAAI,CAAC;YAAE,KAAK,IAAI,EAAE,CAAC;QACrC,IAAI,aAAa;YAAE,KAAK,IAAI,EAAE,CAAC;QAC/B,IAAI,YAAY;YAAE,KAAK,IAAI,EAAE,CAAC;QAC9B,IAAI,SAAS,GAAG,GAAG;YAAE,KAAK,IAAI,EAAE,CAAC;aAC5B,IAAI,SAAS,GAAG,GAAG;YAAE,KAAK,IAAI,CAAC,CAAC;QACrC,IAAI,cAAc,KAAK,CAAC;YAAE,KAAK,IAAI,EAAE,CAAC;QAEtC,OAAO;YACL,cAAc;YACd,aAAa;YACb,YAAY;YACZ,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,GAAG;YAC5C,UAAU,EAAE,CAAC;YACb,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SACzC,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,kCAAkC;IAChD,OAAO,IAAI,4BAA4B,EAAE,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * TypeScript/JavaScript Test Extractor
3
+ *
4
+ * Extracts test information from Jest, Vitest, Mocha, and other JS test frameworks.
5
+ */
6
+ import type Parser from 'tree-sitter';
7
+ import { BaseTestExtractor } from './base-test-extractor.js';
8
+ import type { TestExtraction, TestCase, MockStatement, SetupBlock, TestFramework } from '../types.js';
9
+ export declare class TypeScriptTestExtractor extends BaseTestExtractor {
10
+ constructor(parser: Parser);
11
+ extract(content: string, filePath: string): TestExtraction;
12
+ detectFramework(root: Parser.SyntaxNode): TestFramework;
13
+ extractTestCases(root: Parser.SyntaxNode): TestCase[];
14
+ private walkTestTree;
15
+ extractMocks(root: Parser.SyntaxNode, framework: TestFramework): MockStatement[];
16
+ extractSetupBlocks(root: Parser.SyntaxNode): SetupBlock[];
17
+ protected findImports(root: Parser.SyntaxNode): string[];
18
+ private extractAssertions;
19
+ private isErrorMatcher;
20
+ private isEdgeCaseMatcher;
21
+ private extractStringValue;
22
+ }
23
+ export declare function createTypeScriptTestExtractor(parser: Parser): TypeScriptTestExtractor;
24
+ //# sourceMappingURL=typescript-test-extractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript-test-extractor.d.ts","sourceRoot":"","sources":["../../../src/test-topology/extractors/typescript-test-extractor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EACV,cAAc,EACd,QAAQ,EACR,aAAa,EACb,UAAU,EAEV,aAAa,EACd,MAAM,aAAa,CAAC;AAoBrB,qBAAa,uBAAwB,SAAQ,iBAAiB;gBAChD,MAAM,EAAE,MAAM;IAI1B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc;IA2B1D,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,aAAa;IAoBvD,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,QAAQ,EAAE;IAUrD,OAAO,CAAC,YAAY;IA2EpB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,GAAG,aAAa,EAAE;IAmDhF,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,UAAU,EAAE;IA0BzD,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,EAAE;IAexD,OAAO,CAAC,iBAAiB;IA+BzB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,kBAAkB;CAU3B;AAMD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAErF"}