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 @@
1
+ {"version":3,"file":"impact-scorer.js","sourceRoot":"","sources":["../../../src/simulation/scorers/impact-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAA6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B,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAA0B;IAC3D,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Simulation Scorers
3
+ *
4
+ * Exports all scorer implementations for the speculative execution engine.
5
+ *
6
+ * @module simulation/scorers
7
+ */
8
+ export { FrictionScorer, createFrictionScorer, type FrictionScorerConfig, } from './friction-scorer.js';
9
+ export { ImpactScorer, createImpactScorer, type ImpactScorerConfig, } from './impact-scorer.js';
10
+ export { PatternAlignmentScorer, createPatternAlignmentScorer, type PatternAlignmentScorerConfig, } from './pattern-alignment-scorer.js';
11
+ export { SecurityScorer, createSecurityScorer, type SecurityScorerConfig, } from './security-scorer.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simulation/scorers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,KAAK,4BAA4B,GAClC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Simulation Scorers
3
+ *
4
+ * Exports all scorer implementations for the speculative execution engine.
5
+ *
6
+ * @module simulation/scorers
7
+ */
8
+ export { FrictionScorer, createFrictionScorer, } from './friction-scorer.js';
9
+ export { ImpactScorer, createImpactScorer, } from './impact-scorer.js';
10
+ export { PatternAlignmentScorer, createPatternAlignmentScorer, } from './pattern-alignment-scorer.js';
11
+ export { SecurityScorer, createSecurityScorer, } from './security-scorer.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simulation/scorers/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,EACd,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,YAAY,EACZ,kBAAkB,GAEnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAE7B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,cAAc,EACd,oBAAoB,GAErB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Pattern Alignment Scorer
3
+ *
4
+ * Calculates how well an approach aligns with existing codebase patterns:
5
+ * - Alignment score
6
+ * - Aligned patterns
7
+ * - Conflicting patterns
8
+ * - Whether it creates new patterns
9
+ * - Whether it would be an outlier
10
+ *
11
+ * @module simulation/scorers/pattern-alignment-scorer
12
+ */
13
+ import type { IPatternService } from '../../patterns/service.js';
14
+ import type { SimulationApproach, PatternAlignmentMetrics, TaskCategory } from '../types.js';
15
+ export interface PatternAlignmentScorerConfig {
16
+ projectRoot: string;
17
+ patternService?: IPatternService | undefined;
18
+ minPatternConfidence?: number | undefined;
19
+ }
20
+ /**
21
+ * Scores how well an approach aligns with existing patterns
22
+ */
23
+ export declare class PatternAlignmentScorer {
24
+ private readonly config;
25
+ constructor(config: PatternAlignmentScorerConfig);
26
+ /**
27
+ * Calculate pattern alignment metrics for an approach
28
+ */
29
+ score(approach: SimulationApproach, taskCategory: TaskCategory): Promise<PatternAlignmentMetrics>;
30
+ /**
31
+ * Get patterns relevant to the task category
32
+ */
33
+ private getRelevantPatterns;
34
+ /**
35
+ * Find patterns that align with the approach
36
+ */
37
+ private findAlignedPatterns;
38
+ /**
39
+ * Calculate alignment between approach and pattern
40
+ */
41
+ private calculatePatternAlignment;
42
+ /**
43
+ * Get keywords for a strategy
44
+ */
45
+ private getStrategyKeywords;
46
+ /**
47
+ * Get reason for alignment
48
+ */
49
+ private getAlignmentReason;
50
+ /**
51
+ * Find patterns that conflict with the approach
52
+ */
53
+ private findConflictingPatterns;
54
+ /**
55
+ * Detect if approach conflicts with a pattern
56
+ */
57
+ private detectConflict;
58
+ /**
59
+ * Calculate overall alignment score
60
+ */
61
+ private calculateAlignmentScore;
62
+ /**
63
+ * Determine if approach would create a new pattern
64
+ */
65
+ private wouldCreateNewPattern;
66
+ /**
67
+ * Determine if approach would be an outlier
68
+ */
69
+ private wouldBeOutlier;
70
+ /**
71
+ * Suggest patterns to follow
72
+ */
73
+ private suggestPatterns;
74
+ /**
75
+ * Get default metrics when pattern service is not available
76
+ */
77
+ private getDefaultMetrics;
78
+ }
79
+ /**
80
+ * Create a pattern alignment scorer
81
+ */
82
+ export declare function createPatternAlignmentScorer(config: PatternAlignmentScorerConfig): PatternAlignmentScorer;
83
+ //# sourceMappingURL=pattern-alignment-scorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern-alignment-scorer.d.ts","sourceRoot":"","sources":["../../../src/simulation/scorers/pattern-alignment-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EAGvB,YAAY,EACb,MAAM,aAAa,CAAC;AAMrB,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IAC7C,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AA2BD;;GAEG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+B;gBAE1C,MAAM,EAAE,4BAA4B;IAIhD;;OAEG;IACG,KAAK,CACT,QAAQ,EAAE,kBAAkB,EAC5B,YAAY,EAAE,YAAY,GACzB,OAAO,CAAC,uBAAuB,CAAC;IA6CnC;;OAEG;YACW,mBAAmB;IAkCjC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA4B3B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA8BjC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAgB/B;;OAEG;IACH,OAAO,CAAC,cAAc;IAuDtB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAkC/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkB7B;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;OAEG;IACH,OAAO,CAAC,eAAe;IAoBvB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAU1B;AAMD;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,4BAA4B,GACnC,sBAAsB,CAExB"}
@@ -0,0 +1,367 @@
1
+ /**
2
+ * Pattern Alignment Scorer
3
+ *
4
+ * Calculates how well an approach aligns with existing codebase patterns:
5
+ * - Alignment score
6
+ * - Aligned patterns
7
+ * - Conflicting patterns
8
+ * - Whether it creates new patterns
9
+ * - Whether it would be an outlier
10
+ *
11
+ * @module simulation/scorers/pattern-alignment-scorer
12
+ */
13
+ // ============================================================================
14
+ // Category Mapping
15
+ // ============================================================================
16
+ // Map task categories to pattern categories (using string to avoid type issues)
17
+ const TASK_TO_PATTERN_CATEGORY = {
18
+ 'rate-limiting': ['api'],
19
+ 'authentication': ['auth', 'security'],
20
+ 'authorization': ['auth', 'security'],
21
+ 'api-endpoint': ['api', 'structural'],
22
+ 'data-access': ['data-access', 'structural'],
23
+ 'error-handling': ['errors', 'structural'],
24
+ 'caching': ['performance', 'data-access'],
25
+ 'logging': ['logging', 'structural'],
26
+ 'testing': ['testing'],
27
+ 'validation': ['api', 'types'],
28
+ 'middleware': ['structural'],
29
+ 'refactoring': ['structural'],
30
+ 'generic': ['structural'],
31
+ };
32
+ // ============================================================================
33
+ // Pattern Alignment Scorer
34
+ // ============================================================================
35
+ /**
36
+ * Scores how well an approach aligns with existing patterns
37
+ */
38
+ export class PatternAlignmentScorer {
39
+ config;
40
+ constructor(config) {
41
+ this.config = config;
42
+ }
43
+ /**
44
+ * Calculate pattern alignment metrics for an approach
45
+ */
46
+ async score(approach, taskCategory) {
47
+ // If no pattern service, return default metrics
48
+ if (!this.config.patternService) {
49
+ return this.getDefaultMetrics(approach);
50
+ }
51
+ // Get relevant patterns for the task category
52
+ const relevantPatterns = await this.getRelevantPatterns(taskCategory);
53
+ // Find aligned patterns
54
+ const alignedPatterns = this.findAlignedPatterns(approach, relevantPatterns);
55
+ // Find conflicting patterns
56
+ const conflictingPatterns = this.findConflictingPatterns(approach, relevantPatterns);
57
+ // Calculate alignment score
58
+ const alignmentScore = this.calculateAlignmentScore(alignedPatterns, conflictingPatterns, relevantPatterns.length);
59
+ // Determine if this creates a new pattern
60
+ const createsNewPattern = this.wouldCreateNewPattern(approach, relevantPatterns);
61
+ // Determine if this would be an outlier
62
+ const wouldBeOutlier = this.wouldBeOutlier(approach, relevantPatterns);
63
+ // Suggest patterns to follow
64
+ const suggestedPatterns = this.suggestPatterns(approach, relevantPatterns);
65
+ return {
66
+ alignmentScore,
67
+ alignedPatterns,
68
+ conflictingPatterns,
69
+ createsNewPattern,
70
+ wouldBeOutlier,
71
+ suggestedPatterns,
72
+ };
73
+ }
74
+ // ==========================================================================
75
+ // Pattern Retrieval
76
+ // ==========================================================================
77
+ /**
78
+ * Get patterns relevant to the task category
79
+ */
80
+ async getRelevantPatterns(taskCategory) {
81
+ if (!this.config.patternService) {
82
+ return [];
83
+ }
84
+ const patternCategories = TASK_TO_PATTERN_CATEGORY[taskCategory] ?? ['structural'];
85
+ const patterns = [];
86
+ for (const category of patternCategories) {
87
+ try {
88
+ const result = await this.config.patternService.listByCategory(category, { limit: 20 });
89
+ // Get full pattern details
90
+ for (const summary of result.items) {
91
+ const pattern = await this.config.patternService.getPattern(summary.id);
92
+ if (pattern && pattern.confidence >= (this.config.minPatternConfidence ?? 0.5)) {
93
+ patterns.push(pattern);
94
+ }
95
+ }
96
+ }
97
+ catch {
98
+ // Ignore errors
99
+ }
100
+ }
101
+ return patterns;
102
+ }
103
+ // ==========================================================================
104
+ // Alignment Analysis
105
+ // ==========================================================================
106
+ /**
107
+ * Find patterns that align with the approach
108
+ */
109
+ findAlignedPatterns(approach, patterns) {
110
+ const aligned = [];
111
+ for (const pattern of patterns) {
112
+ const alignmentScore = this.calculatePatternAlignment(approach, pattern);
113
+ if (alignmentScore >= 0.5) {
114
+ const alignedPattern = {
115
+ id: pattern.id,
116
+ name: pattern.name,
117
+ category: pattern.category,
118
+ alignmentScore,
119
+ reason: this.getAlignmentReason(approach, pattern, alignmentScore),
120
+ };
121
+ if (pattern.locations[0]?.file) {
122
+ alignedPattern.exampleFile = pattern.locations[0].file;
123
+ }
124
+ aligned.push(alignedPattern);
125
+ }
126
+ }
127
+ // Sort by alignment score
128
+ return aligned.sort((a, b) => b.alignmentScore - a.alignmentScore);
129
+ }
130
+ /**
131
+ * Calculate alignment between approach and pattern
132
+ */
133
+ calculatePatternAlignment(approach, pattern) {
134
+ let score = 0;
135
+ let factors = 0;
136
+ // Check if approach targets files with this pattern
137
+ const patternFiles = new Set(pattern.locations.map(l => l.file));
138
+ const targetOverlap = approach.targetFiles.filter(f => patternFiles.has(f)).length;
139
+ if (targetOverlap > 0) {
140
+ score += 0.3 * Math.min(1, targetOverlap / approach.targetFiles.length);
141
+ factors++;
142
+ }
143
+ // Check if approach follows this pattern (by ID)
144
+ if (approach.followsPatterns?.includes(pattern.id)) {
145
+ score += 0.4;
146
+ factors++;
147
+ }
148
+ // Check strategy alignment with pattern name/description
149
+ const patternText = `${pattern.name} ${pattern.description ?? ''}`.toLowerCase();
150
+ const strategyKeywords = this.getStrategyKeywords(approach.strategy);
151
+ const keywordMatches = strategyKeywords.filter(k => patternText.includes(k)).length;
152
+ if (keywordMatches > 0) {
153
+ score += 0.3 * Math.min(1, keywordMatches / strategyKeywords.length);
154
+ factors++;
155
+ }
156
+ return factors > 0 ? score / factors * factors : 0;
157
+ }
158
+ /**
159
+ * Get keywords for a strategy
160
+ */
161
+ getStrategyKeywords(strategy) {
162
+ const keywords = {
163
+ middleware: ['middleware', 'pipe', 'chain', 'handler'],
164
+ decorator: ['decorator', 'annotation', 'attribute'],
165
+ wrapper: ['wrapper', 'wrap', 'proxy'],
166
+ 'per-route': ['route', 'endpoint', 'controller'],
167
+ 'per-function': ['function', 'method', 'handler'],
168
+ centralized: ['central', 'single', 'unified'],
169
+ distributed: ['distributed', 'spread', 'multiple'],
170
+ aspect: ['aspect', 'aop', 'cross-cutting'],
171
+ filter: ['filter', 'pipe'],
172
+ interceptor: ['interceptor', 'intercept'],
173
+ guard: ['guard', 'protect', 'check'],
174
+ policy: ['policy', 'rule', 'authorize'],
175
+ dependency: ['inject', 'dependency', 'di'],
176
+ mixin: ['mixin', 'trait', 'compose'],
177
+ custom: [],
178
+ };
179
+ return keywords[strategy] ?? [];
180
+ }
181
+ /**
182
+ * Get reason for alignment
183
+ */
184
+ getAlignmentReason(approach, pattern, score) {
185
+ if (approach.followsPatterns?.includes(pattern.id)) {
186
+ return 'Explicitly follows this pattern';
187
+ }
188
+ if (score >= 0.8) {
189
+ return 'Highly aligned with pattern structure and location';
190
+ }
191
+ if (score >= 0.6) {
192
+ return 'Good alignment with pattern approach';
193
+ }
194
+ return 'Partial alignment with pattern';
195
+ }
196
+ // ==========================================================================
197
+ // Conflict Detection
198
+ // ==========================================================================
199
+ /**
200
+ * Find patterns that conflict with the approach
201
+ */
202
+ findConflictingPatterns(approach, patterns) {
203
+ const conflicts = [];
204
+ for (const pattern of patterns) {
205
+ const conflict = this.detectConflict(approach, pattern);
206
+ if (conflict) {
207
+ conflicts.push(conflict);
208
+ }
209
+ }
210
+ return conflicts;
211
+ }
212
+ /**
213
+ * Detect if approach conflicts with a pattern
214
+ */
215
+ detectConflict(approach, pattern) {
216
+ // Check for strategy conflicts
217
+ const conflictingStrategies = {
218
+ centralized: ['distributed', 'per-route', 'per-function'],
219
+ distributed: ['centralized'],
220
+ middleware: ['per-function'],
221
+ decorator: ['wrapper'],
222
+ };
223
+ const patternText = `${pattern.name} ${pattern.description ?? ''}`.toLowerCase();
224
+ const approachConflicts = conflictingStrategies[approach.strategy] ?? [];
225
+ for (const conflictStrategy of approachConflicts) {
226
+ const conflictKeywords = this.getStrategyKeywords(conflictStrategy);
227
+ if (conflictKeywords.some(k => patternText.includes(k))) {
228
+ return {
229
+ id: pattern.id,
230
+ name: pattern.name,
231
+ category: pattern.category,
232
+ conflictReason: `Pattern uses ${conflictStrategy} approach, but approach uses ${approach.strategy}`,
233
+ severity: 'warning',
234
+ };
235
+ }
236
+ }
237
+ // Check for file overlap with different approach
238
+ const patternFiles = new Set(pattern.locations.map(l => l.file));
239
+ const overlappingFiles = approach.targetFiles.filter(f => patternFiles.has(f));
240
+ if (overlappingFiles.length > 0 && pattern.outliers.length > 0) {
241
+ // Pattern has outliers in overlapping files - potential conflict
242
+ const outlierFiles = new Set(pattern.outliers.map(o => o.file));
243
+ const conflictFiles = overlappingFiles.filter(f => outlierFiles.has(f));
244
+ if (conflictFiles.length > 0) {
245
+ return {
246
+ id: pattern.id,
247
+ name: pattern.name,
248
+ category: pattern.category,
249
+ conflictReason: `Files ${conflictFiles.join(', ')} already have pattern outliers`,
250
+ severity: 'info',
251
+ };
252
+ }
253
+ }
254
+ return null;
255
+ }
256
+ // ==========================================================================
257
+ // Score Calculation
258
+ // ==========================================================================
259
+ /**
260
+ * Calculate overall alignment score
261
+ */
262
+ calculateAlignmentScore(aligned, conflicts, totalPatterns) {
263
+ if (totalPatterns === 0) {
264
+ return 50; // Neutral when no patterns exist
265
+ }
266
+ // Base score from aligned patterns
267
+ let score = 0;
268
+ for (const pattern of aligned) {
269
+ score += pattern.alignmentScore * 20;
270
+ }
271
+ // Penalty for conflicts
272
+ for (const conflict of conflicts) {
273
+ if (conflict.severity === 'error') {
274
+ score -= 30;
275
+ }
276
+ else if (conflict.severity === 'warning') {
277
+ score -= 15;
278
+ }
279
+ else {
280
+ score -= 5;
281
+ }
282
+ }
283
+ // Normalize to 0-100
284
+ return Math.max(0, Math.min(100, 50 + score));
285
+ }
286
+ // ==========================================================================
287
+ // Pattern Prediction
288
+ // ==========================================================================
289
+ /**
290
+ * Determine if approach would create a new pattern
291
+ */
292
+ wouldCreateNewPattern(approach, patterns) {
293
+ // If no similar patterns exist, this would create a new one
294
+ if (patterns.length === 0) {
295
+ return true;
296
+ }
297
+ // Check if any pattern matches the approach strategy
298
+ const strategyKeywords = this.getStrategyKeywords(approach.strategy);
299
+ for (const pattern of patterns) {
300
+ const patternText = `${pattern.name} ${pattern.description ?? ''}`.toLowerCase();
301
+ if (strategyKeywords.some(k => patternText.includes(k))) {
302
+ return false;
303
+ }
304
+ }
305
+ return true;
306
+ }
307
+ /**
308
+ * Determine if approach would be an outlier
309
+ */
310
+ wouldBeOutlier(approach, patterns) {
311
+ // If creating new pattern, not an outlier
312
+ if (this.wouldCreateNewPattern(approach, patterns)) {
313
+ return false;
314
+ }
315
+ // Check if approach deviates from existing patterns
316
+ for (const pattern of patterns) {
317
+ const alignment = this.calculatePatternAlignment(approach, pattern);
318
+ if (alignment >= 0.3 && alignment < 0.7) {
319
+ // Partial alignment suggests potential outlier
320
+ return true;
321
+ }
322
+ }
323
+ return false;
324
+ }
325
+ /**
326
+ * Suggest patterns to follow
327
+ */
328
+ suggestPatterns(approach, patterns) {
329
+ const suggestions = [];
330
+ // Find high-confidence patterns that could apply
331
+ for (const pattern of patterns) {
332
+ if (pattern.confidence >= 0.8 && pattern.status === 'approved') {
333
+ const alignment = this.calculatePatternAlignment(approach, pattern);
334
+ if (alignment < 0.5) {
335
+ suggestions.push(`Consider following "${pattern.name}" pattern`);
336
+ }
337
+ }
338
+ }
339
+ return suggestions.slice(0, 3);
340
+ }
341
+ // ==========================================================================
342
+ // Default Metrics
343
+ // ==========================================================================
344
+ /**
345
+ * Get default metrics when pattern service is not available
346
+ */
347
+ getDefaultMetrics(_approach) {
348
+ return {
349
+ alignmentScore: 50, // Neutral
350
+ alignedPatterns: [],
351
+ conflictingPatterns: [],
352
+ createsNewPattern: true,
353
+ wouldBeOutlier: false,
354
+ suggestedPatterns: [],
355
+ };
356
+ }
357
+ }
358
+ // ============================================================================
359
+ // Factory Function
360
+ // ============================================================================
361
+ /**
362
+ * Create a pattern alignment scorer
363
+ */
364
+ export function createPatternAlignmentScorer(config) {
365
+ return new PatternAlignmentScorer(config);
366
+ }
367
+ //# sourceMappingURL=pattern-alignment-scorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern-alignment-scorer.js","sourceRoot":"","sources":["../../../src/simulation/scorers/pattern-alignment-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAsBH,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,gFAAgF;AAChF,MAAM,wBAAwB,GAAmC;IAC/D,eAAe,EAAE,CAAC,KAAK,CAAC;IACxB,gBAAgB,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;IACtC,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;IACrC,cAAc,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC;IACrC,aAAa,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;IAC5C,gBAAgB,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;IAC1C,SAAS,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;IACzC,SAAS,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;IACpC,SAAS,EAAE,CAAC,SAAS,CAAC;IACtB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;IAC9B,YAAY,EAAE,CAAC,YAAY,CAAC;IAC5B,aAAa,EAAE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E,kBAAkB;IAClB,6EAA6E;IAE7E;;OAEG;IACK,iBAAiB,CAAC,SAA6B;QACrD,OAAO;YACL,cAAc,EAAE,EAAE,EAAE,UAAU;YAC9B,eAAe,EAAE,EAAE;YACnB,mBAAmB,EAAE,EAAE;YACvB,iBAAiB,EAAE,IAAI;YACvB,cAAc,EAAE,KAAK;YACrB,iBAAiB,EAAE,EAAE;SACtB,CAAC;IACJ,CAAC;CACF;AAED,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAoC;IAEpC,OAAO,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Security Scorer
3
+ *
4
+ * Calculates security metrics for an approach using reachability analysis:
5
+ * - Security risk score
6
+ * - Data access implications
7
+ * - Auth implications
8
+ * - Security warnings
9
+ *
10
+ * @module simulation/scorers/security-scorer
11
+ */
12
+ import type { CallGraph } from '../../call-graph/types.js';
13
+ import type { SimulationApproach, SecurityMetrics } from '../types.js';
14
+ export interface SecurityScorerConfig {
15
+ projectRoot: string;
16
+ callGraph?: CallGraph | undefined;
17
+ maxDepth?: number | undefined;
18
+ }
19
+ /**
20
+ * Scores the security implications of an approach
21
+ */
22
+ export declare class SecurityScorer {
23
+ private readonly config;
24
+ private reachabilityEngine;
25
+ constructor(config: SecurityScorerConfig);
26
+ /**
27
+ * Calculate security metrics for an approach
28
+ */
29
+ score(approach: SimulationApproach): Promise<SecurityMetrics>;
30
+ /**
31
+ * Analyze data access implications of the approach
32
+ */
33
+ private analyzeDataAccess;
34
+ /**
35
+ * Get function IDs in a file
36
+ */
37
+ private getFunctionsInFile;
38
+ /**
39
+ * Classify sensitivity of data access
40
+ */
41
+ private classifySensitivity;
42
+ /**
43
+ * Analyze authentication/authorization implications
44
+ */
45
+ private analyzeAuthImplications;
46
+ /**
47
+ * Generate security warnings
48
+ */
49
+ private generateWarnings;
50
+ /**
51
+ * Calculate overall security risk score (0-100)
52
+ */
53
+ private calculateSecurityRisk;
54
+ /**
55
+ * Estimate security when call graph is not available
56
+ */
57
+ private estimateSecurity;
58
+ }
59
+ /**
60
+ * Create a security scorer
61
+ */
62
+ export declare function createSecurityScorer(config: SecurityScorerConfig): SecurityScorer;
63
+ //# sourceMappingURL=security-scorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-scorer.d.ts","sourceRoot":"","sources":["../../../src/simulation/scorers/security-scorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAGhB,MAAM,aAAa,CAAC;AAMrB,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAMD;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAC9C,OAAO,CAAC,kBAAkB,CAAmC;gBAEjD,MAAM,EAAE,oBAAoB;IAOxC;;OAEG;IACG,KAAK,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IAkCnE;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA+CzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA0B3B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAqC/B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAyFxB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAqD7B;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAmDzB;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAEjF"}