driftdetect-core 0.4.5 → 0.5.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 (578) hide show
  1. package/LICENSE +21 -0
  2. package/dist/boundaries/boundary-scanner.d.ts.map +1 -1
  3. package/dist/boundaries/boundary-scanner.js +184 -18
  4. package/dist/boundaries/boundary-scanner.js.map +1 -1
  5. package/dist/boundaries/types.d.ts +34 -2
  6. package/dist/boundaries/types.d.ts.map +1 -1
  7. package/dist/call-graph/analysis/graph-builder.d.ts +3 -0
  8. package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
  9. package/dist/call-graph/analysis/graph-builder.js +81 -18
  10. package/dist/call-graph/analysis/graph-builder.js.map +1 -1
  11. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +8 -0
  12. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -1
  13. package/dist/call-graph/extractors/csharp-data-access-extractor.js +18 -5
  14. package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -1
  15. package/dist/call-graph/extractors/csharp-extractor.d.ts +35 -0
  16. package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -1
  17. package/dist/call-graph/extractors/csharp-extractor.js +362 -4
  18. package/dist/call-graph/extractors/csharp-extractor.js.map +1 -1
  19. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts +37 -0
  20. package/dist/call-graph/extractors/csharp-hybrid-extractor.d.ts.map +1 -0
  21. package/dist/call-graph/extractors/csharp-hybrid-extractor.js +408 -0
  22. package/dist/call-graph/extractors/csharp-hybrid-extractor.js.map +1 -0
  23. package/dist/call-graph/extractors/data-access-extractor.d.ts +16 -2
  24. package/dist/call-graph/extractors/data-access-extractor.d.ts.map +1 -1
  25. package/dist/call-graph/extractors/data-access-extractor.js +114 -5
  26. package/dist/call-graph/extractors/data-access-extractor.js.map +1 -1
  27. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts +102 -0
  28. package/dist/call-graph/extractors/hybrid-extractor-base.d.ts.map +1 -0
  29. package/dist/call-graph/extractors/hybrid-extractor-base.js +289 -0
  30. package/dist/call-graph/extractors/hybrid-extractor-base.js.map +1 -0
  31. package/dist/call-graph/extractors/index.d.ts +17 -13
  32. package/dist/call-graph/extractors/index.d.ts.map +1 -1
  33. package/dist/call-graph/extractors/index.js +24 -23
  34. package/dist/call-graph/extractors/index.js.map +1 -1
  35. package/dist/call-graph/extractors/java-data-access-extractor.d.ts +8 -0
  36. package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -1
  37. package/dist/call-graph/extractors/java-data-access-extractor.js +20 -6
  38. package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -1
  39. package/dist/call-graph/extractors/java-extractor.d.ts +15 -0
  40. package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -1
  41. package/dist/call-graph/extractors/java-extractor.js +120 -4
  42. package/dist/call-graph/extractors/java-extractor.js.map +1 -1
  43. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts +36 -0
  44. package/dist/call-graph/extractors/java-hybrid-extractor.d.ts.map +1 -0
  45. package/dist/call-graph/extractors/java-hybrid-extractor.js +426 -0
  46. package/dist/call-graph/extractors/java-hybrid-extractor.js.map +1 -0
  47. package/dist/call-graph/extractors/php-data-access-extractor.d.ts +8 -0
  48. package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -1
  49. package/dist/call-graph/extractors/php-data-access-extractor.js +20 -6
  50. package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -1
  51. package/dist/call-graph/extractors/php-extractor.d.ts +48 -1
  52. package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -1
  53. package/dist/call-graph/extractors/php-extractor.js +460 -6
  54. package/dist/call-graph/extractors/php-extractor.js.map +1 -1
  55. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts +35 -0
  56. package/dist/call-graph/extractors/php-hybrid-extractor.d.ts.map +1 -0
  57. package/dist/call-graph/extractors/php-hybrid-extractor.js +393 -0
  58. package/dist/call-graph/extractors/php-hybrid-extractor.js.map +1 -0
  59. package/dist/call-graph/extractors/python-data-access-extractor.d.ts +8 -0
  60. package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -1
  61. package/dist/call-graph/extractors/python-data-access-extractor.js +20 -6
  62. package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -1
  63. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts +85 -0
  64. package/dist/call-graph/extractors/python-hybrid-extractor.d.ts.map +1 -0
  65. package/dist/call-graph/extractors/python-hybrid-extractor.js +462 -0
  66. package/dist/call-graph/extractors/python-hybrid-extractor.js.map +1 -0
  67. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts +154 -0
  68. package/dist/call-graph/extractors/regex/base-regex-extractor.d.ts.map +1 -0
  69. package/dist/call-graph/extractors/regex/base-regex-extractor.js +346 -0
  70. package/dist/call-graph/extractors/regex/base-regex-extractor.js.map +1 -0
  71. package/dist/call-graph/extractors/regex/csharp-regex.d.ts +34 -0
  72. package/dist/call-graph/extractors/regex/csharp-regex.d.ts.map +1 -0
  73. package/dist/call-graph/extractors/regex/csharp-regex.js +393 -0
  74. package/dist/call-graph/extractors/regex/csharp-regex.js.map +1 -0
  75. package/dist/call-graph/extractors/regex/index.d.ts +25 -0
  76. package/dist/call-graph/extractors/regex/index.d.ts.map +1 -0
  77. package/dist/call-graph/extractors/regex/index.js +66 -0
  78. package/dist/call-graph/extractors/regex/index.js.map +1 -0
  79. package/dist/call-graph/extractors/regex/java-regex.d.ts +34 -0
  80. package/dist/call-graph/extractors/regex/java-regex.d.ts.map +1 -0
  81. package/dist/call-graph/extractors/regex/java-regex.js +327 -0
  82. package/dist/call-graph/extractors/regex/java-regex.js.map +1 -0
  83. package/dist/call-graph/extractors/regex/php-regex.d.ts +30 -0
  84. package/dist/call-graph/extractors/regex/php-regex.d.ts.map +1 -0
  85. package/dist/call-graph/extractors/regex/php-regex.js +333 -0
  86. package/dist/call-graph/extractors/regex/php-regex.js.map +1 -0
  87. package/dist/call-graph/extractors/regex/python-regex.d.ts +46 -0
  88. package/dist/call-graph/extractors/regex/python-regex.d.ts.map +1 -0
  89. package/dist/call-graph/extractors/regex/python-regex.js +380 -0
  90. package/dist/call-graph/extractors/regex/python-regex.js.map +1 -0
  91. package/dist/call-graph/extractors/regex/typescript-regex.d.ts +27 -0
  92. package/dist/call-graph/extractors/regex/typescript-regex.d.ts.map +1 -0
  93. package/dist/call-graph/extractors/regex/typescript-regex.js +349 -0
  94. package/dist/call-graph/extractors/regex/typescript-regex.js.map +1 -0
  95. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +11 -0
  96. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -1
  97. package/dist/call-graph/extractors/semantic-data-access-scanner.js +53 -2
  98. package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -1
  99. package/dist/call-graph/extractors/types.d.ts +111 -0
  100. package/dist/call-graph/extractors/types.d.ts.map +1 -0
  101. package/dist/call-graph/extractors/types.js +68 -0
  102. package/dist/call-graph/extractors/types.js.map +1 -0
  103. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +8 -0
  104. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -1
  105. package/dist/call-graph/extractors/typescript-data-access-extractor.js +31 -10
  106. package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -1
  107. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts +116 -0
  108. package/dist/call-graph/extractors/typescript-hybrid-extractor.d.ts.map +1 -0
  109. package/dist/call-graph/extractors/typescript-hybrid-extractor.js +635 -0
  110. package/dist/call-graph/extractors/typescript-hybrid-extractor.js.map +1 -0
  111. package/dist/call-graph/index.d.ts +2 -4
  112. package/dist/call-graph/index.d.ts.map +1 -1
  113. package/dist/call-graph/index.js +5 -6
  114. package/dist/call-graph/index.js.map +1 -1
  115. package/dist/error-handling/error-handling-analyzer.d.ts +73 -0
  116. package/dist/error-handling/error-handling-analyzer.d.ts.map +1 -0
  117. package/dist/error-handling/error-handling-analyzer.js +706 -0
  118. package/dist/error-handling/error-handling-analyzer.js.map +1 -0
  119. package/dist/error-handling/index.d.ts +8 -0
  120. package/dist/error-handling/index.d.ts.map +1 -0
  121. package/dist/error-handling/index.js +8 -0
  122. package/dist/error-handling/index.js.map +1 -0
  123. package/dist/error-handling/types.d.ts +307 -0
  124. package/dist/error-handling/types.d.ts.map +1 -0
  125. package/dist/error-handling/types.js +7 -0
  126. package/dist/error-handling/types.js.map +1 -0
  127. package/dist/index.d.ts +18 -2
  128. package/dist/index.d.ts.map +1 -1
  129. package/dist/index.js +44 -5
  130. package/dist/index.js.map +1 -1
  131. package/dist/lake/pattern-shard-store.d.ts +6 -0
  132. package/dist/lake/pattern-shard-store.d.ts.map +1 -1
  133. package/dist/lake/pattern-shard-store.js +6 -0
  134. package/dist/lake/pattern-shard-store.js.map +1 -1
  135. package/dist/language-intelligence/base-normalizer.d.ts +68 -0
  136. package/dist/language-intelligence/base-normalizer.d.ts.map +1 -0
  137. package/dist/language-intelligence/base-normalizer.js +210 -0
  138. package/dist/language-intelligence/base-normalizer.js.map +1 -0
  139. package/dist/language-intelligence/framework-registry.d.ts +89 -0
  140. package/dist/language-intelligence/framework-registry.d.ts.map +1 -0
  141. package/dist/language-intelligence/framework-registry.js +165 -0
  142. package/dist/language-intelligence/framework-registry.js.map +1 -0
  143. package/dist/language-intelligence/frameworks/aspnet.d.ts +11 -0
  144. package/dist/language-intelligence/frameworks/aspnet.d.ts.map +1 -0
  145. package/dist/language-intelligence/frameworks/aspnet.js +325 -0
  146. package/dist/language-intelligence/frameworks/aspnet.js.map +1 -0
  147. package/dist/language-intelligence/frameworks/fastapi.d.ts +11 -0
  148. package/dist/language-intelligence/frameworks/fastapi.d.ts.map +1 -0
  149. package/dist/language-intelligence/frameworks/fastapi.js +188 -0
  150. package/dist/language-intelligence/frameworks/fastapi.js.map +1 -0
  151. package/dist/language-intelligence/frameworks/index.d.ts +32 -0
  152. package/dist/language-intelligence/frameworks/index.d.ts.map +1 -0
  153. package/dist/language-intelligence/frameworks/index.js +51 -0
  154. package/dist/language-intelligence/frameworks/index.js.map +1 -0
  155. package/dist/language-intelligence/frameworks/laravel.d.ts +12 -0
  156. package/dist/language-intelligence/frameworks/laravel.d.ts.map +1 -0
  157. package/dist/language-intelligence/frameworks/laravel.js +194 -0
  158. package/dist/language-intelligence/frameworks/laravel.js.map +1 -0
  159. package/dist/language-intelligence/frameworks/nestjs.d.ts +11 -0
  160. package/dist/language-intelligence/frameworks/nestjs.d.ts.map +1 -0
  161. package/dist/language-intelligence/frameworks/nestjs.js +307 -0
  162. package/dist/language-intelligence/frameworks/nestjs.js.map +1 -0
  163. package/dist/language-intelligence/frameworks/spring.d.ts +11 -0
  164. package/dist/language-intelligence/frameworks/spring.d.ts.map +1 -0
  165. package/dist/language-intelligence/frameworks/spring.js +369 -0
  166. package/dist/language-intelligence/frameworks/spring.js.map +1 -0
  167. package/dist/language-intelligence/index.d.ts +33 -0
  168. package/dist/language-intelligence/index.d.ts.map +1 -0
  169. package/dist/language-intelligence/index.js +37 -0
  170. package/dist/language-intelligence/index.js.map +1 -0
  171. package/dist/language-intelligence/language-intelligence.d.ts +99 -0
  172. package/dist/language-intelligence/language-intelligence.d.ts.map +1 -0
  173. package/dist/language-intelligence/language-intelligence.js +239 -0
  174. package/dist/language-intelligence/language-intelligence.js.map +1 -0
  175. package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts +39 -0
  176. package/dist/language-intelligence/normalizers/csharp-normalizer.d.ts.map +1 -0
  177. package/dist/language-intelligence/normalizers/csharp-normalizer.js +86 -0
  178. package/dist/language-intelligence/normalizers/csharp-normalizer.js.map +1 -0
  179. package/dist/language-intelligence/normalizers/index.d.ts +25 -0
  180. package/dist/language-intelligence/normalizers/index.d.ts.map +1 -0
  181. package/dist/language-intelligence/normalizers/index.js +60 -0
  182. package/dist/language-intelligence/normalizers/index.js.map +1 -0
  183. package/dist/language-intelligence/normalizers/java-normalizer.d.ts +39 -0
  184. package/dist/language-intelligence/normalizers/java-normalizer.d.ts.map +1 -0
  185. package/dist/language-intelligence/normalizers/java-normalizer.js +96 -0
  186. package/dist/language-intelligence/normalizers/java-normalizer.js.map +1 -0
  187. package/dist/language-intelligence/normalizers/php-normalizer.d.ts +39 -0
  188. package/dist/language-intelligence/normalizers/php-normalizer.d.ts.map +1 -0
  189. package/dist/language-intelligence/normalizers/php-normalizer.js +86 -0
  190. package/dist/language-intelligence/normalizers/php-normalizer.js.map +1 -0
  191. package/dist/language-intelligence/normalizers/python-normalizer.d.ts +39 -0
  192. package/dist/language-intelligence/normalizers/python-normalizer.d.ts.map +1 -0
  193. package/dist/language-intelligence/normalizers/python-normalizer.js +95 -0
  194. package/dist/language-intelligence/normalizers/python-normalizer.js.map +1 -0
  195. package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts +39 -0
  196. package/dist/language-intelligence/normalizers/typescript-normalizer.d.ts.map +1 -0
  197. package/dist/language-intelligence/normalizers/typescript-normalizer.js +84 -0
  198. package/dist/language-intelligence/normalizers/typescript-normalizer.js.map +1 -0
  199. package/dist/language-intelligence/types.d.ts +270 -0
  200. package/dist/language-intelligence/types.d.ts.map +1 -0
  201. package/dist/language-intelligence/types.js +9 -0
  202. package/dist/language-intelligence/types.js.map +1 -0
  203. package/dist/module-coupling/coupling-analyzer.d.ts +73 -0
  204. package/dist/module-coupling/coupling-analyzer.d.ts.map +1 -0
  205. package/dist/module-coupling/coupling-analyzer.js +668 -0
  206. package/dist/module-coupling/coupling-analyzer.js.map +1 -0
  207. package/dist/module-coupling/index.d.ts +9 -0
  208. package/dist/module-coupling/index.d.ts.map +1 -0
  209. package/dist/module-coupling/index.js +9 -0
  210. package/dist/module-coupling/index.js.map +1 -0
  211. package/dist/module-coupling/types.d.ts +273 -0
  212. package/dist/module-coupling/types.d.ts.map +1 -0
  213. package/dist/module-coupling/types.js +8 -0
  214. package/dist/module-coupling/types.js.map +1 -0
  215. package/dist/patterns/adapters/index.d.ts +11 -0
  216. package/dist/patterns/adapters/index.d.ts.map +1 -0
  217. package/dist/patterns/adapters/index.js +11 -0
  218. package/dist/patterns/adapters/index.js.map +1 -0
  219. package/dist/patterns/adapters/pattern-store-adapter.d.ts +59 -0
  220. package/dist/patterns/adapters/pattern-store-adapter.d.ts.map +1 -0
  221. package/dist/patterns/adapters/pattern-store-adapter.js +468 -0
  222. package/dist/patterns/adapters/pattern-store-adapter.js.map +1 -0
  223. package/dist/patterns/adapters/service-factory.d.ts +40 -0
  224. package/dist/patterns/adapters/service-factory.d.ts.map +1 -0
  225. package/dist/patterns/adapters/service-factory.js +144 -0
  226. package/dist/patterns/adapters/service-factory.js.map +1 -0
  227. package/dist/patterns/errors.d.ts +32 -0
  228. package/dist/patterns/errors.d.ts.map +1 -0
  229. package/dist/patterns/errors.js +45 -0
  230. package/dist/patterns/errors.js.map +1 -0
  231. package/dist/patterns/impl/cached-repository.d.ts +79 -0
  232. package/dist/patterns/impl/cached-repository.d.ts.map +1 -0
  233. package/dist/patterns/impl/cached-repository.js +296 -0
  234. package/dist/patterns/impl/cached-repository.js.map +1 -0
  235. package/dist/patterns/impl/file-repository.d.ts +75 -0
  236. package/dist/patterns/impl/file-repository.d.ts.map +1 -0
  237. package/dist/patterns/impl/file-repository.js +507 -0
  238. package/dist/patterns/impl/file-repository.js.map +1 -0
  239. package/dist/patterns/impl/index.d.ts +16 -0
  240. package/dist/patterns/impl/index.d.ts.map +1 -0
  241. package/dist/patterns/impl/index.js +21 -0
  242. package/dist/patterns/impl/index.js.map +1 -0
  243. package/dist/patterns/impl/memory-repository.d.ts +56 -0
  244. package/dist/patterns/impl/memory-repository.d.ts.map +1 -0
  245. package/dist/patterns/impl/memory-repository.js +323 -0
  246. package/dist/patterns/impl/memory-repository.js.map +1 -0
  247. package/dist/patterns/impl/pattern-service.d.ts +52 -0
  248. package/dist/patterns/impl/pattern-service.d.ts.map +1 -0
  249. package/dist/patterns/impl/pattern-service.js +382 -0
  250. package/dist/patterns/impl/pattern-service.js.map +1 -0
  251. package/dist/patterns/impl/repository-factory.d.ts +44 -0
  252. package/dist/patterns/impl/repository-factory.d.ts.map +1 -0
  253. package/dist/patterns/impl/repository-factory.js +140 -0
  254. package/dist/patterns/impl/repository-factory.js.map +1 -0
  255. package/dist/patterns/impl/unified-file-repository.d.ts +111 -0
  256. package/dist/patterns/impl/unified-file-repository.d.ts.map +1 -0
  257. package/dist/patterns/impl/unified-file-repository.js +677 -0
  258. package/dist/patterns/impl/unified-file-repository.js.map +1 -0
  259. package/dist/patterns/index.d.ts +23 -0
  260. package/dist/patterns/index.d.ts.map +1 -0
  261. package/dist/patterns/index.js +41 -0
  262. package/dist/patterns/index.js.map +1 -0
  263. package/dist/patterns/repository.d.ts +241 -0
  264. package/dist/patterns/repository.d.ts.map +1 -0
  265. package/dist/patterns/repository.js +23 -0
  266. package/dist/patterns/repository.js.map +1 -0
  267. package/dist/patterns/service.d.ts +245 -0
  268. package/dist/patterns/service.d.ts.map +1 -0
  269. package/dist/patterns/service.js +25 -0
  270. package/dist/patterns/service.js.map +1 -0
  271. package/dist/patterns/types.d.ts +227 -0
  272. package/dist/patterns/types.d.ts.map +1 -0
  273. package/dist/patterns/types.js +117 -0
  274. package/dist/patterns/types.js.map +1 -0
  275. package/dist/scanner/file-processor-worker.d.ts +66 -0
  276. package/dist/scanner/file-processor-worker.d.ts.map +1 -0
  277. package/dist/scanner/file-processor-worker.js +189 -0
  278. package/dist/scanner/file-processor-worker.js.map +1 -0
  279. package/dist/scanner/index.d.ts +2 -0
  280. package/dist/scanner/index.d.ts.map +1 -1
  281. package/dist/scanner/index.js +2 -0
  282. package/dist/scanner/index.js.map +1 -1
  283. package/dist/scanner/threaded-worker-pool.d.ts +182 -0
  284. package/dist/scanner/threaded-worker-pool.d.ts.map +1 -0
  285. package/dist/scanner/threaded-worker-pool.js +243 -0
  286. package/dist/scanner/threaded-worker-pool.js.map +1 -0
  287. package/dist/store/pattern-store.d.ts +6 -0
  288. package/dist/store/pattern-store.d.ts.map +1 -1
  289. package/dist/store/pattern-store.js +6 -0
  290. package/dist/store/pattern-store.js.map +1 -1
  291. package/dist/store/types.d.ts +6 -3
  292. package/dist/store/types.d.ts.map +1 -1
  293. package/dist/store/types.js.map +1 -1
  294. package/dist/test-topology/extractors/base-test-extractor.d.ts +89 -0
  295. package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -0
  296. package/dist/test-topology/extractors/base-test-extractor.js +187 -0
  297. package/dist/test-topology/extractors/base-test-extractor.js.map +1 -0
  298. package/dist/test-topology/extractors/csharp-test-extractor.d.ts +23 -0
  299. package/dist/test-topology/extractors/csharp-test-extractor.d.ts.map +1 -0
  300. package/dist/test-topology/extractors/csharp-test-extractor.js +367 -0
  301. package/dist/test-topology/extractors/csharp-test-extractor.js.map +1 -0
  302. package/dist/test-topology/extractors/index.d.ts +12 -0
  303. package/dist/test-topology/extractors/index.d.ts.map +1 -0
  304. package/dist/test-topology/extractors/index.js +12 -0
  305. package/dist/test-topology/extractors/index.js.map +1 -0
  306. package/dist/test-topology/extractors/java-test-extractor.d.ts +20 -0
  307. package/dist/test-topology/extractors/java-test-extractor.d.ts.map +1 -0
  308. package/dist/test-topology/extractors/java-test-extractor.js +275 -0
  309. package/dist/test-topology/extractors/java-test-extractor.js.map +1 -0
  310. package/dist/test-topology/extractors/php-test-extractor.d.ts +24 -0
  311. package/dist/test-topology/extractors/php-test-extractor.d.ts.map +1 -0
  312. package/dist/test-topology/extractors/php-test-extractor.js +409 -0
  313. package/dist/test-topology/extractors/php-test-extractor.js.map +1 -0
  314. package/dist/test-topology/extractors/python-test-extractor.d.ts +23 -0
  315. package/dist/test-topology/extractors/python-test-extractor.d.ts.map +1 -0
  316. package/dist/test-topology/extractors/python-test-extractor.js +342 -0
  317. package/dist/test-topology/extractors/python-test-extractor.js.map +1 -0
  318. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts +51 -0
  319. package/dist/test-topology/extractors/regex/csharp-test-regex.d.ts.map +1 -0
  320. package/dist/test-topology/extractors/regex/csharp-test-regex.js +383 -0
  321. package/dist/test-topology/extractors/regex/csharp-test-regex.js.map +1 -0
  322. package/dist/test-topology/extractors/regex/index.d.ts +18 -0
  323. package/dist/test-topology/extractors/regex/index.d.ts.map +1 -0
  324. package/dist/test-topology/extractors/regex/index.js +43 -0
  325. package/dist/test-topology/extractors/regex/index.js.map +1 -0
  326. package/dist/test-topology/extractors/regex/java-test-regex.d.ts +50 -0
  327. package/dist/test-topology/extractors/regex/java-test-regex.d.ts.map +1 -0
  328. package/dist/test-topology/extractors/regex/java-test-regex.js +370 -0
  329. package/dist/test-topology/extractors/regex/java-test-regex.js.map +1 -0
  330. package/dist/test-topology/extractors/regex/php-test-regex.d.ts +56 -0
  331. package/dist/test-topology/extractors/regex/php-test-regex.d.ts.map +1 -0
  332. package/dist/test-topology/extractors/regex/php-test-regex.js +503 -0
  333. package/dist/test-topology/extractors/regex/php-test-regex.js.map +1 -0
  334. package/dist/test-topology/extractors/regex/python-test-regex.d.ts +57 -0
  335. package/dist/test-topology/extractors/regex/python-test-regex.d.ts.map +1 -0
  336. package/dist/test-topology/extractors/regex/python-test-regex.js +381 -0
  337. package/dist/test-topology/extractors/regex/python-test-regex.js.map +1 -0
  338. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts +60 -0
  339. package/dist/test-topology/extractors/regex/typescript-test-regex.d.ts.map +1 -0
  340. package/dist/test-topology/extractors/regex/typescript-test-regex.js +368 -0
  341. package/dist/test-topology/extractors/regex/typescript-test-regex.js.map +1 -0
  342. package/dist/test-topology/extractors/typescript-test-extractor.d.ts +24 -0
  343. package/dist/test-topology/extractors/typescript-test-extractor.d.ts.map +1 -0
  344. package/dist/test-topology/extractors/typescript-test-extractor.js +266 -0
  345. package/dist/test-topology/extractors/typescript-test-extractor.js.map +1 -0
  346. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts +98 -0
  347. package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -0
  348. package/dist/test-topology/hybrid-test-topology-analyzer.js +555 -0
  349. package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -0
  350. package/dist/test-topology/index.d.ts +16 -0
  351. package/dist/test-topology/index.d.ts.map +1 -0
  352. package/dist/test-topology/index.js +19 -0
  353. package/dist/test-topology/index.js.map +1 -0
  354. package/dist/test-topology/test-topology-analyzer.d.ts +85 -0
  355. package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -0
  356. package/dist/test-topology/test-topology-analyzer.js +538 -0
  357. package/dist/test-topology/test-topology-analyzer.js.map +1 -0
  358. package/dist/test-topology/types.d.ts +300 -0
  359. package/dist/test-topology/types.d.ts.map +1 -0
  360. package/dist/test-topology/types.js +7 -0
  361. package/dist/test-topology/types.js.map +1 -0
  362. package/dist/unified-provider/compat/index.d.ts +11 -0
  363. package/dist/unified-provider/compat/index.d.ts.map +1 -0
  364. package/dist/unified-provider/compat/index.js +13 -0
  365. package/dist/unified-provider/compat/index.js.map +1 -0
  366. package/dist/unified-provider/compat/legacy-extractors.d.ts +63 -0
  367. package/dist/unified-provider/compat/legacy-extractors.d.ts.map +1 -0
  368. package/dist/unified-provider/compat/legacy-extractors.js +80 -0
  369. package/dist/unified-provider/compat/legacy-extractors.js.map +1 -0
  370. package/dist/unified-provider/compat/legacy-scanner.d.ts +28 -0
  371. package/dist/unified-provider/compat/legacy-scanner.d.ts.map +1 -0
  372. package/dist/unified-provider/compat/legacy-scanner.js +31 -0
  373. package/dist/unified-provider/compat/legacy-scanner.js.map +1 -0
  374. package/dist/unified-provider/index.d.ts +28 -0
  375. package/dist/unified-provider/index.d.ts.map +1 -0
  376. package/dist/unified-provider/index.js +47 -0
  377. package/dist/unified-provider/index.js.map +1 -0
  378. package/dist/unified-provider/integration/index.d.ts +9 -0
  379. package/dist/unified-provider/integration/index.d.ts.map +1 -0
  380. package/dist/unified-provider/integration/index.js +11 -0
  381. package/dist/unified-provider/integration/index.js.map +1 -0
  382. package/dist/unified-provider/integration/unified-data-access-adapter.d.ts +75 -0
  383. package/dist/unified-provider/integration/unified-data-access-adapter.d.ts.map +1 -0
  384. package/dist/unified-provider/integration/unified-data-access-adapter.js +210 -0
  385. package/dist/unified-provider/integration/unified-data-access-adapter.js.map +1 -0
  386. package/dist/unified-provider/integration/unified-scanner.d.ts +90 -0
  387. package/dist/unified-provider/integration/unified-scanner.d.ts.map +1 -0
  388. package/dist/unified-provider/integration/unified-scanner.js +369 -0
  389. package/dist/unified-provider/integration/unified-scanner.js.map +1 -0
  390. package/dist/unified-provider/matching/base-matcher.d.ts +80 -0
  391. package/dist/unified-provider/matching/base-matcher.d.ts.map +1 -0
  392. package/dist/unified-provider/matching/base-matcher.js +196 -0
  393. package/dist/unified-provider/matching/base-matcher.js.map +1 -0
  394. package/dist/unified-provider/matching/django-matcher.d.ts +32 -0
  395. package/dist/unified-provider/matching/django-matcher.d.ts.map +1 -0
  396. package/dist/unified-provider/matching/django-matcher.js +107 -0
  397. package/dist/unified-provider/matching/django-matcher.js.map +1 -0
  398. package/dist/unified-provider/matching/drizzle-matcher.d.ts +25 -0
  399. package/dist/unified-provider/matching/drizzle-matcher.d.ts.map +1 -0
  400. package/dist/unified-provider/matching/drizzle-matcher.js +123 -0
  401. package/dist/unified-provider/matching/drizzle-matcher.js.map +1 -0
  402. package/dist/unified-provider/matching/efcore-matcher.d.ts +27 -0
  403. package/dist/unified-provider/matching/efcore-matcher.d.ts.map +1 -0
  404. package/dist/unified-provider/matching/efcore-matcher.js +88 -0
  405. package/dist/unified-provider/matching/efcore-matcher.js.map +1 -0
  406. package/dist/unified-provider/matching/eloquent-matcher.d.ts +32 -0
  407. package/dist/unified-provider/matching/eloquent-matcher.d.ts.map +1 -0
  408. package/dist/unified-provider/matching/eloquent-matcher.js +162 -0
  409. package/dist/unified-provider/matching/eloquent-matcher.js.map +1 -0
  410. package/dist/unified-provider/matching/index.d.ts +19 -0
  411. package/dist/unified-provider/matching/index.d.ts.map +1 -0
  412. package/dist/unified-provider/matching/index.js +24 -0
  413. package/dist/unified-provider/matching/index.js.map +1 -0
  414. package/dist/unified-provider/matching/knex-matcher.d.ts +26 -0
  415. package/dist/unified-provider/matching/knex-matcher.d.ts.map +1 -0
  416. package/dist/unified-provider/matching/knex-matcher.js +109 -0
  417. package/dist/unified-provider/matching/knex-matcher.js.map +1 -0
  418. package/dist/unified-provider/matching/matcher-registry.d.ts +55 -0
  419. package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -0
  420. package/dist/unified-provider/matching/matcher-registry.js +130 -0
  421. package/dist/unified-provider/matching/matcher-registry.js.map +1 -0
  422. package/dist/unified-provider/matching/mongoose-matcher.d.ts +30 -0
  423. package/dist/unified-provider/matching/mongoose-matcher.d.ts.map +1 -0
  424. package/dist/unified-provider/matching/mongoose-matcher.js +132 -0
  425. package/dist/unified-provider/matching/mongoose-matcher.js.map +1 -0
  426. package/dist/unified-provider/matching/prisma-matcher.d.ts +31 -0
  427. package/dist/unified-provider/matching/prisma-matcher.d.ts.map +1 -0
  428. package/dist/unified-provider/matching/prisma-matcher.js +123 -0
  429. package/dist/unified-provider/matching/prisma-matcher.js.map +1 -0
  430. package/dist/unified-provider/matching/raw-sql-matcher.d.ts +31 -0
  431. package/dist/unified-provider/matching/raw-sql-matcher.d.ts.map +1 -0
  432. package/dist/unified-provider/matching/raw-sql-matcher.js +173 -0
  433. package/dist/unified-provider/matching/raw-sql-matcher.js.map +1 -0
  434. package/dist/unified-provider/matching/sequelize-matcher.d.ts +28 -0
  435. package/dist/unified-provider/matching/sequelize-matcher.d.ts.map +1 -0
  436. package/dist/unified-provider/matching/sequelize-matcher.js +132 -0
  437. package/dist/unified-provider/matching/sequelize-matcher.js.map +1 -0
  438. package/dist/unified-provider/matching/spring-data-matcher.d.ts +32 -0
  439. package/dist/unified-provider/matching/spring-data-matcher.d.ts.map +1 -0
  440. package/dist/unified-provider/matching/spring-data-matcher.js +112 -0
  441. package/dist/unified-provider/matching/spring-data-matcher.js.map +1 -0
  442. package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts +32 -0
  443. package/dist/unified-provider/matching/sqlalchemy-matcher.d.ts.map +1 -0
  444. package/dist/unified-provider/matching/sqlalchemy-matcher.js +201 -0
  445. package/dist/unified-provider/matching/sqlalchemy-matcher.js.map +1 -0
  446. package/dist/unified-provider/matching/supabase-matcher.d.ts +27 -0
  447. package/dist/unified-provider/matching/supabase-matcher.d.ts.map +1 -0
  448. package/dist/unified-provider/matching/supabase-matcher.js +122 -0
  449. package/dist/unified-provider/matching/supabase-matcher.js.map +1 -0
  450. package/dist/unified-provider/matching/typeorm-matcher.d.ts +32 -0
  451. package/dist/unified-provider/matching/typeorm-matcher.d.ts.map +1 -0
  452. package/dist/unified-provider/matching/typeorm-matcher.js +169 -0
  453. package/dist/unified-provider/matching/typeorm-matcher.js.map +1 -0
  454. package/dist/unified-provider/migration/deprecated-extractors.d.ts +104 -0
  455. package/dist/unified-provider/migration/deprecated-extractors.d.ts.map +1 -0
  456. package/dist/unified-provider/migration/deprecated-extractors.js +129 -0
  457. package/dist/unified-provider/migration/deprecated-extractors.js.map +1 -0
  458. package/dist/unified-provider/migration/deprecated-scanner.d.ts +40 -0
  459. package/dist/unified-provider/migration/deprecated-scanner.d.ts.map +1 -0
  460. package/dist/unified-provider/migration/deprecated-scanner.js +49 -0
  461. package/dist/unified-provider/migration/deprecated-scanner.js.map +1 -0
  462. package/dist/unified-provider/migration/index.d.ts +41 -0
  463. package/dist/unified-provider/migration/index.d.ts.map +1 -0
  464. package/dist/unified-provider/migration/index.js +43 -0
  465. package/dist/unified-provider/migration/index.js.map +1 -0
  466. package/dist/unified-provider/normalization/base-normalizer.d.ts +188 -0
  467. package/dist/unified-provider/normalization/base-normalizer.d.ts.map +1 -0
  468. package/dist/unified-provider/normalization/base-normalizer.js +339 -0
  469. package/dist/unified-provider/normalization/base-normalizer.js.map +1 -0
  470. package/dist/unified-provider/normalization/csharp-normalizer.d.ts +58 -0
  471. package/dist/unified-provider/normalization/csharp-normalizer.d.ts.map +1 -0
  472. package/dist/unified-provider/normalization/csharp-normalizer.js +467 -0
  473. package/dist/unified-provider/normalization/csharp-normalizer.js.map +1 -0
  474. package/dist/unified-provider/normalization/index.d.ts +23 -0
  475. package/dist/unified-provider/normalization/index.d.ts.map +1 -0
  476. package/dist/unified-provider/normalization/index.js +62 -0
  477. package/dist/unified-provider/normalization/index.js.map +1 -0
  478. package/dist/unified-provider/normalization/java-normalizer.d.ts +54 -0
  479. package/dist/unified-provider/normalization/java-normalizer.d.ts.map +1 -0
  480. package/dist/unified-provider/normalization/java-normalizer.js +453 -0
  481. package/dist/unified-provider/normalization/java-normalizer.js.map +1 -0
  482. package/dist/unified-provider/normalization/php-normalizer.d.ts +54 -0
  483. package/dist/unified-provider/normalization/php-normalizer.d.ts.map +1 -0
  484. package/dist/unified-provider/normalization/php-normalizer.js +489 -0
  485. package/dist/unified-provider/normalization/php-normalizer.js.map +1 -0
  486. package/dist/unified-provider/normalization/python-normalizer.d.ts +61 -0
  487. package/dist/unified-provider/normalization/python-normalizer.d.ts.map +1 -0
  488. package/dist/unified-provider/normalization/python-normalizer.js +548 -0
  489. package/dist/unified-provider/normalization/python-normalizer.js.map +1 -0
  490. package/dist/unified-provider/normalization/typescript-normalizer.d.ts +60 -0
  491. package/dist/unified-provider/normalization/typescript-normalizer.d.ts.map +1 -0
  492. package/dist/unified-provider/normalization/typescript-normalizer.js +608 -0
  493. package/dist/unified-provider/normalization/typescript-normalizer.js.map +1 -0
  494. package/dist/unified-provider/parsing/index.d.ts +5 -0
  495. package/dist/unified-provider/parsing/index.d.ts.map +1 -0
  496. package/dist/unified-provider/parsing/index.js +5 -0
  497. package/dist/unified-provider/parsing/index.js.map +1 -0
  498. package/dist/unified-provider/parsing/parser-registry.d.ts +70 -0
  499. package/dist/unified-provider/parsing/parser-registry.d.ts.map +1 -0
  500. package/dist/unified-provider/parsing/parser-registry.js +260 -0
  501. package/dist/unified-provider/parsing/parser-registry.js.map +1 -0
  502. package/dist/unified-provider/provider/index.d.ts +5 -0
  503. package/dist/unified-provider/provider/index.d.ts.map +1 -0
  504. package/dist/unified-provider/provider/index.js +5 -0
  505. package/dist/unified-provider/provider/index.js.map +1 -0
  506. package/dist/unified-provider/provider/unified-language-provider.d.ts +56 -0
  507. package/dist/unified-provider/provider/unified-language-provider.d.ts.map +1 -0
  508. package/dist/unified-provider/provider/unified-language-provider.js +212 -0
  509. package/dist/unified-provider/provider/unified-language-provider.js.map +1 -0
  510. package/dist/unified-provider/types.d.ts +389 -0
  511. package/dist/unified-provider/types.d.ts.map +1 -0
  512. package/dist/unified-provider/types.js +9 -0
  513. package/dist/unified-provider/types.js.map +1 -0
  514. package/dist/wrappers/clustering/clusterer.d.ts +43 -0
  515. package/dist/wrappers/clustering/clusterer.d.ts.map +1 -0
  516. package/dist/wrappers/clustering/clusterer.js +374 -0
  517. package/dist/wrappers/clustering/clusterer.js.map +1 -0
  518. package/dist/wrappers/clustering/exclusions.d.ts +47 -0
  519. package/dist/wrappers/clustering/exclusions.d.ts.map +1 -0
  520. package/dist/wrappers/clustering/exclusions.js +318 -0
  521. package/dist/wrappers/clustering/exclusions.js.map +1 -0
  522. package/dist/wrappers/clustering/index.d.ts +6 -0
  523. package/dist/wrappers/clustering/index.d.ts.map +1 -0
  524. package/dist/wrappers/clustering/index.js +6 -0
  525. package/dist/wrappers/clustering/index.js.map +1 -0
  526. package/dist/wrappers/detection/detector.d.ts +69 -0
  527. package/dist/wrappers/detection/detector.d.ts.map +1 -0
  528. package/dist/wrappers/detection/detector.js +279 -0
  529. package/dist/wrappers/detection/detector.js.map +1 -0
  530. package/dist/wrappers/detection/index.d.ts +5 -0
  531. package/dist/wrappers/detection/index.d.ts.map +1 -0
  532. package/dist/wrappers/detection/index.js +5 -0
  533. package/dist/wrappers/detection/index.js.map +1 -0
  534. package/dist/wrappers/export/index.d.ts +5 -0
  535. package/dist/wrappers/export/index.d.ts.map +1 -0
  536. package/dist/wrappers/export/index.js +5 -0
  537. package/dist/wrappers/export/index.js.map +1 -0
  538. package/dist/wrappers/export/json.d.ts +127 -0
  539. package/dist/wrappers/export/json.d.ts.map +1 -0
  540. package/dist/wrappers/export/json.js +160 -0
  541. package/dist/wrappers/export/json.js.map +1 -0
  542. package/dist/wrappers/index.d.ts +56 -0
  543. package/dist/wrappers/index.d.ts.map +1 -0
  544. package/dist/wrappers/index.js +159 -0
  545. package/dist/wrappers/index.js.map +1 -0
  546. package/dist/wrappers/integration/adapter.d.ts +52 -0
  547. package/dist/wrappers/integration/adapter.d.ts.map +1 -0
  548. package/dist/wrappers/integration/adapter.js +209 -0
  549. package/dist/wrappers/integration/adapter.js.map +1 -0
  550. package/dist/wrappers/integration/index.d.ts +9 -0
  551. package/dist/wrappers/integration/index.d.ts.map +1 -0
  552. package/dist/wrappers/integration/index.js +12 -0
  553. package/dist/wrappers/integration/index.js.map +1 -0
  554. package/dist/wrappers/integration/pattern-adapter.d.ts +52 -0
  555. package/dist/wrappers/integration/pattern-adapter.d.ts.map +1 -0
  556. package/dist/wrappers/integration/pattern-adapter.js +192 -0
  557. package/dist/wrappers/integration/pattern-adapter.js.map +1 -0
  558. package/dist/wrappers/integration/scanner.d.ts +85 -0
  559. package/dist/wrappers/integration/scanner.d.ts.map +1 -0
  560. package/dist/wrappers/integration/scanner.js +367 -0
  561. package/dist/wrappers/integration/scanner.js.map +1 -0
  562. package/dist/wrappers/primitives/discovery.d.ts +57 -0
  563. package/dist/wrappers/primitives/discovery.d.ts.map +1 -0
  564. package/dist/wrappers/primitives/discovery.js +389 -0
  565. package/dist/wrappers/primitives/discovery.js.map +1 -0
  566. package/dist/wrappers/primitives/index.d.ts +6 -0
  567. package/dist/wrappers/primitives/index.d.ts.map +1 -0
  568. package/dist/wrappers/primitives/index.js +6 -0
  569. package/dist/wrappers/primitives/index.js.map +1 -0
  570. package/dist/wrappers/primitives/registry.d.ts +63 -0
  571. package/dist/wrappers/primitives/registry.d.ts.map +1 -0
  572. package/dist/wrappers/primitives/registry.js +447 -0
  573. package/dist/wrappers/primitives/registry.js.map +1 -0
  574. package/dist/wrappers/types.d.ts +137 -0
  575. package/dist/wrappers/types.d.ts.map +1 -0
  576. package/dist/wrappers/types.js +7 -0
  577. package/dist/wrappers/types.js.map +1 -0
  578. package/package.json +23 -18
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Pattern System Integration
3
+ *
4
+ * Converts wrapper clusters to Drift patterns for integration with
5
+ * the existing pattern detection and management system.
6
+ */
7
+ import { createPattern } from '../../patterns/types.js';
8
+ // =============================================================================
9
+ // Category Mapping
10
+ // =============================================================================
11
+ /**
12
+ * Map wrapper categories to pattern categories
13
+ */
14
+ const WRAPPER_TO_PATTERN_CATEGORY = {
15
+ 'state-management': 'components',
16
+ 'data-fetching': 'api',
17
+ 'side-effects': 'components',
18
+ 'authentication': 'auth',
19
+ 'authorization': 'auth',
20
+ 'validation': 'api',
21
+ 'dependency-injection': 'config',
22
+ 'middleware': 'api',
23
+ 'testing': 'testing',
24
+ 'logging': 'logging',
25
+ 'caching': 'performance',
26
+ 'error-handling': 'errors',
27
+ 'async-utilities': 'api',
28
+ 'form-handling': 'components',
29
+ 'routing': 'api',
30
+ 'factory': 'structural',
31
+ 'decorator': 'structural',
32
+ 'utility': 'structural',
33
+ 'other': 'structural',
34
+ };
35
+ /**
36
+ * Map wrapper categories to subcategories
37
+ */
38
+ const WRAPPER_TO_SUBCATEGORY = {
39
+ 'state-management': 'state-wrapper',
40
+ 'data-fetching': 'data-wrapper',
41
+ 'side-effects': 'effect-wrapper',
42
+ 'authentication': 'auth-wrapper',
43
+ 'authorization': 'authz-wrapper',
44
+ 'validation': 'validation-wrapper',
45
+ 'dependency-injection': 'di-wrapper',
46
+ 'middleware': 'middleware-wrapper',
47
+ 'testing': 'test-wrapper',
48
+ 'logging': 'logging-wrapper',
49
+ 'caching': 'cache-wrapper',
50
+ 'error-handling': 'error-wrapper',
51
+ 'async-utilities': 'async-wrapper',
52
+ 'form-handling': 'form-wrapper',
53
+ 'routing': 'routing-wrapper',
54
+ 'factory': 'factory-pattern',
55
+ 'decorator': 'decorator-pattern',
56
+ 'utility': 'utility-wrapper',
57
+ 'other': 'wrapper',
58
+ };
59
+ // =============================================================================
60
+ // Conversion Functions
61
+ // =============================================================================
62
+ /**
63
+ * Convert a wrapper cluster to a Drift pattern
64
+ */
65
+ export function clusterToPattern(cluster, options = {}) {
66
+ const { defaultSeverity = 'info', idPrefix = 'wrapper-', includeDetails = true, } = options;
67
+ const category = WRAPPER_TO_PATTERN_CATEGORY[cluster.category];
68
+ const subcategory = WRAPPER_TO_SUBCATEGORY[cluster.category];
69
+ // Build description
70
+ let description = cluster.description;
71
+ if (includeDetails) {
72
+ const primitiveList = cluster.primitiveSignature.join(', ');
73
+ description += `\n\nWraps: ${primitiveList}`;
74
+ description += `\nWrappers: ${cluster.wrappers.length}`;
75
+ description += `\nAvg depth: ${cluster.avgDepth.toFixed(1)}`;
76
+ }
77
+ // Convert wrapper locations to pattern locations
78
+ const locations = cluster.wrappers.map(wrapperToLocation);
79
+ const input = {
80
+ id: `${idPrefix}${cluster.id}`,
81
+ category,
82
+ subcategory,
83
+ name: cluster.name,
84
+ description,
85
+ detectorId: 'wrapper-detector',
86
+ detectorName: 'Framework Wrapper Detector',
87
+ detectionMethod: 'semantic',
88
+ confidence: cluster.confidence,
89
+ locations,
90
+ severity: defaultSeverity,
91
+ tags: [
92
+ 'wrapper',
93
+ `wrapper-${cluster.category}`,
94
+ ...cluster.primitiveSignature.map((p) => `wraps-${p}`),
95
+ ],
96
+ autoFixable: false,
97
+ detector: {
98
+ type: 'semantic',
99
+ config: {
100
+ primitiveSignature: cluster.primitiveSignature,
101
+ avgDepth: cluster.avgDepth,
102
+ maxDepth: cluster.maxDepth,
103
+ totalUsages: cluster.totalUsages,
104
+ fileSpread: cluster.fileSpread,
105
+ },
106
+ },
107
+ };
108
+ return createPattern(input);
109
+ }
110
+ /**
111
+ * Convert a wrapper function to a pattern location
112
+ */
113
+ export function wrapperToLocation(wrapper) {
114
+ // Build snippet showing wrapper signature
115
+ const primitives = wrapper.primitiveSignature.join(', ');
116
+ const snippet = `${wrapper.name} wraps [${primitives}] at depth ${wrapper.depth}`;
117
+ return {
118
+ file: wrapper.file,
119
+ line: wrapper.line,
120
+ column: 1,
121
+ snippet,
122
+ };
123
+ }
124
+ /**
125
+ * Convert multiple clusters to patterns
126
+ */
127
+ export function clustersToPatterns(clusters, options = {}) {
128
+ const { minConfidence = 0.5 } = options;
129
+ return clusters
130
+ .filter((c) => c.confidence >= minConfidence)
131
+ .map((c) => clusterToPattern(c, options));
132
+ }
133
+ // =============================================================================
134
+ // Pattern ID Generation
135
+ // =============================================================================
136
+ /**
137
+ * Generate a unique pattern ID for a wrapper cluster
138
+ */
139
+ export function generatePatternId(cluster) {
140
+ // Use signature hash for uniqueness
141
+ const signatureHash = cluster.primitiveSignature
142
+ .sort()
143
+ .join('-')
144
+ .toLowerCase()
145
+ .replace(/[^a-z0-9-]/g, '');
146
+ return `wrapper-${cluster.category}-${signatureHash}`.slice(0, 64);
147
+ }
148
+ // =============================================================================
149
+ // Pattern Metadata Extraction
150
+ // =============================================================================
151
+ /**
152
+ * Extract pattern metadata from a wrapper cluster
153
+ */
154
+ export function extractPatternMetadata(cluster) {
155
+ return {
156
+ wrapperCategory: cluster.category,
157
+ primitiveSignature: cluster.primitiveSignature,
158
+ wrapperCount: cluster.wrappers.length,
159
+ avgDepth: cluster.avgDepth,
160
+ maxDepth: cluster.maxDepth,
161
+ totalUsages: cluster.totalUsages,
162
+ fileSpread: cluster.fileSpread,
163
+ suggestedNames: cluster.suggestedNames,
164
+ wrapperNames: cluster.wrappers.map((w) => w.name),
165
+ };
166
+ }
167
+ // =============================================================================
168
+ // Reverse Conversion (Pattern to Cluster info)
169
+ // =============================================================================
170
+ /**
171
+ * Check if a pattern was created from a wrapper cluster
172
+ */
173
+ export function isWrapperPattern(pattern) {
174
+ return (pattern.detectorId === 'wrapper-detector' ||
175
+ pattern.id.startsWith('wrapper-') ||
176
+ pattern.tags.includes('wrapper'));
177
+ }
178
+ /**
179
+ * Extract wrapper info from a pattern (if it's a wrapper pattern)
180
+ */
181
+ export function extractWrapperInfo(pattern) {
182
+ if (!isWrapperPattern(pattern))
183
+ return null;
184
+ const config = pattern.detector.config;
185
+ return {
186
+ primitiveSignature: config['primitiveSignature'] ?? [],
187
+ wrapperCategory: config['wrapperCategory'] ?? pattern.subcategory,
188
+ avgDepth: config['avgDepth'] ?? 1,
189
+ maxDepth: config['maxDepth'] ?? 1,
190
+ };
191
+ }
192
+ //# sourceMappingURL=pattern-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern-adapter.js","sourceRoot":"","sources":["../../../src/wrappers/integration/pattern-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,2BAA2B,GAA6C;IAC5E,kBAAkB,EAAE,YAAY;IAChC,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,YAAY;IAC5B,gBAAgB,EAAE,MAAM;IACxB,eAAe,EAAE,MAAM;IACvB,YAAY,EAAE,KAAK;IACnB,sBAAsB,EAAE,QAAQ;IAChC,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,aAAa;IACxB,gBAAgB,EAAE,QAAQ;IAC1B,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,YAAY;IAC7B,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB,GAAoC;IAC9D,kBAAkB,EAAE,eAAe;IACnC,eAAe,EAAE,cAAc;IAC/B,cAA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C,YAAY,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAClD,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,+CAA+C;AAC/C,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO,CACL,OAAO,CAAC,UAAU,KAAK,kBAAkB;QACzC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CACjC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IAMjD,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAE5C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAiC,CAAC;IAElE,OAAO;QACL,kBAAkB,EAAG,MAAM,CAAC,oBAAoB,CAAc,IAAI,EAAE;QACpE,eAAe,EAAG,MAAM,CAAC,iBAAiB,CAAY,IAAI,OAAO,CAAC,WAAW;QAC7E,QAAQ,EAAG,MAAM,CAAC,UAAU,CAAY,IAAI,CAAC;QAC7C,QAAQ,EAAG,MAAM,CAAC,UAAU,CAAY,IAAI,CAAC;KAC9C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Wrapper Scanner
3
+ *
4
+ * High-level scanner that integrates with the call graph infrastructure
5
+ * to perform wrapper detection across a codebase.
6
+ */
7
+ import type { WrapperAnalysisResult, WrapperFunction, WrapperCluster } from '../types.js';
8
+ import { type AnalysisOptions } from '../index.js';
9
+ import { type ExtractionStats } from './adapter.js';
10
+ export interface WrapperScannerConfig {
11
+ /** Project root directory */
12
+ rootDir: string;
13
+ /** File patterns to scan (glob) */
14
+ patterns?: string[];
15
+ /** Include test files */
16
+ includeTestFiles?: boolean;
17
+ /** Verbose logging */
18
+ verbose?: boolean;
19
+ }
20
+ export interface WrapperScanResult {
21
+ /** Full analysis result */
22
+ analysis: WrapperAnalysisResult;
23
+ /** Extraction statistics */
24
+ stats: ExtractionStats;
25
+ /** Scan duration in ms */
26
+ duration: number;
27
+ /** Any errors encountered */
28
+ errors: string[];
29
+ }
30
+ /**
31
+ * Wrapper Scanner
32
+ *
33
+ * Scans a codebase for framework wrapper patterns using the call graph
34
+ * infrastructure for extraction.
35
+ */
36
+ export declare class WrapperScanner {
37
+ private readonly config;
38
+ private readonly extractors;
39
+ constructor(config: WrapperScannerConfig);
40
+ /**
41
+ * Scan the codebase for wrapper patterns
42
+ */
43
+ scan(options?: AnalysisOptions): Promise<WrapperScanResult>;
44
+ /**
45
+ * Scan specific files (for incremental analysis)
46
+ */
47
+ scanFiles(files: string[], options?: AnalysisOptions): Promise<WrapperScanResult>;
48
+ /**
49
+ * Get wrappers for a specific file
50
+ */
51
+ getFileWrappers(file: string): Promise<WrapperFunction[]>;
52
+ /**
53
+ * Get clusters containing wrappers from a specific file
54
+ */
55
+ getFileClusters(file: string): Promise<WrapperCluster[]>;
56
+ /**
57
+ * Find files matching patterns
58
+ */
59
+ private findFiles;
60
+ /**
61
+ * Get extractor for a file
62
+ */
63
+ private getExtractor;
64
+ /**
65
+ * Group extractions by language
66
+ */
67
+ private groupByLanguage;
68
+ /**
69
+ * Create empty analysis result
70
+ */
71
+ private createEmptyResult;
72
+ /**
73
+ * Merge analysis results
74
+ */
75
+ private mergeResults;
76
+ /**
77
+ * Recalculate summary after merging
78
+ */
79
+ private recalculateSummary;
80
+ }
81
+ /**
82
+ * Create a new WrapperScanner instance
83
+ */
84
+ export declare function createWrapperScanner(config: WrapperScannerConfig): WrapperScanner;
85
+ //# sourceMappingURL=scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../../src/wrappers/integration/scanner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA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,YAAY;IASpB;;OAEG;IACH,OAAO,CAAC,eAAe;IAgBvB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAgDzB;;OAEG;IACH,OAAO,CAAC,YAAY;IAcpB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAgD3B;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAEjF"}
@@ -0,0 +1,367 @@
1
+ /**
2
+ * Wrapper Scanner
3
+ *
4
+ * High-level scanner that integrates with the call graph infrastructure
5
+ * to perform wrapper detection across a codebase.
6
+ */
7
+ import * as fs from 'node:fs/promises';
8
+ import * as path from 'node:path';
9
+ import { minimatch } from 'minimatch';
10
+ import { TypeScriptCallGraphExtractor } from '../../call-graph/extractors/typescript-extractor.js';
11
+ import { PythonCallGraphExtractor } from '../../call-graph/extractors/python-extractor.js';
12
+ import { JavaCallGraphExtractor } from '../../call-graph/extractors/java-extractor.js';
13
+ import { CSharpCallGraphExtractor } from '../../call-graph/extractors/csharp-extractor.js';
14
+ import { PhpCallGraphExtractor } from '../../call-graph/extractors/php-extractor.js';
15
+ import { analyzeWrappers } from '../index.js';
16
+ import { mapLanguage, buildDiscoveryContext, buildDetectionContext, filterExtractions, calculateExtractionStats, } from './adapter.js';
17
+ // =============================================================================
18
+ // Default Patterns
19
+ // =============================================================================
20
+ const DEFAULT_PATTERNS = [
21
+ '**/*.ts',
22
+ '**/*.tsx',
23
+ '**/*.js',
24
+ '**/*.jsx',
25
+ '**/*.py',
26
+ '**/*.java',
27
+ '**/*.cs',
28
+ '**/*.php',
29
+ ];
30
+ const IGNORE_PATTERNS = [
31
+ 'node_modules',
32
+ '.git',
33
+ 'dist',
34
+ 'build',
35
+ '__pycache__',
36
+ '.next',
37
+ '.nuxt',
38
+ 'vendor',
39
+ 'target',
40
+ 'bin',
41
+ 'obj',
42
+ ];
43
+ // =============================================================================
44
+ // Wrapper Scanner
45
+ // =============================================================================
46
+ /**
47
+ * Wrapper Scanner
48
+ *
49
+ * Scans a codebase for framework wrapper patterns using the call graph
50
+ * infrastructure for extraction.
51
+ */
52
+ export class WrapperScanner {
53
+ config;
54
+ extractors;
55
+ constructor(config) {
56
+ this.config = {
57
+ patterns: DEFAULT_PATTERNS,
58
+ includeTestFiles: false,
59
+ verbose: false,
60
+ ...config,
61
+ };
62
+ // Initialize extractors
63
+ this.extractors = [
64
+ new TypeScriptCallGraphExtractor(),
65
+ new PythonCallGraphExtractor(),
66
+ new JavaCallGraphExtractor(),
67
+ new CSharpCallGraphExtractor(),
68
+ new PhpCallGraphExtractor(),
69
+ ];
70
+ }
71
+ /**
72
+ * Scan the codebase for wrapper patterns
73
+ */
74
+ async scan(options = {}) {
75
+ const startTime = Date.now();
76
+ const errors = [];
77
+ // Find files to scan
78
+ const files = await this.findFiles();
79
+ if (this.config.verbose) {
80
+ console.log(`Found ${files.length} files to scan`);
81
+ }
82
+ // Extract from all files
83
+ const extractions = [];
84
+ for (const file of files) {
85
+ const extractor = this.getExtractor(file);
86
+ if (!extractor)
87
+ continue;
88
+ try {
89
+ const filePath = path.join(this.config.rootDir, file);
90
+ const source = await fs.readFile(filePath, 'utf-8');
91
+ const extraction = extractor.extract(source, file);
92
+ extractions.push(extraction);
93
+ }
94
+ catch (error) {
95
+ const msg = `Error extracting ${file}: ${error instanceof Error ? error.message : error}`;
96
+ errors.push(msg);
97
+ if (this.config.verbose) {
98
+ console.error(msg);
99
+ }
100
+ }
101
+ }
102
+ // Filter extractions
103
+ const adapterOptions = {
104
+ includeTestFiles: this.config.includeTestFiles,
105
+ };
106
+ const filtered = filterExtractions(extractions, adapterOptions);
107
+ // Calculate stats
108
+ const stats = calculateExtractionStats(filtered);
109
+ if (this.config.verbose) {
110
+ console.log(`Extracted ${stats.totalFunctions} functions from ${stats.totalFiles} files`);
111
+ }
112
+ // Group by language and analyze
113
+ const byLanguage = this.groupByLanguage(filtered);
114
+ const combinedResult = this.createEmptyResult();
115
+ for (const [language, langExtractions] of byLanguage) {
116
+ if (this.config.verbose) {
117
+ console.log(`Analyzing ${langExtractions.length} ${language} files...`);
118
+ }
119
+ // Build contexts
120
+ const discoveryContext = buildDiscoveryContext(langExtractions, language);
121
+ const detectionContext = buildDetectionContext(langExtractions, [], language);
122
+ // Run analysis
123
+ const result = analyzeWrappers(discoveryContext, { functions: detectionContext.functions, language }, options);
124
+ // Merge results
125
+ this.mergeResults(combinedResult, result);
126
+ }
127
+ // Recalculate summary
128
+ this.recalculateSummary(combinedResult);
129
+ return {
130
+ analysis: combinedResult,
131
+ stats,
132
+ duration: Date.now() - startTime,
133
+ errors,
134
+ };
135
+ }
136
+ /**
137
+ * Scan specific files (for incremental analysis)
138
+ */
139
+ async scanFiles(files, options = {}) {
140
+ const startTime = Date.now();
141
+ const errors = [];
142
+ const extractions = [];
143
+ for (const file of files) {
144
+ const extractor = this.getExtractor(file);
145
+ if (!extractor)
146
+ continue;
147
+ try {
148
+ const filePath = path.join(this.config.rootDir, file);
149
+ const source = await fs.readFile(filePath, 'utf-8');
150
+ const extraction = extractor.extract(source, file);
151
+ extractions.push(extraction);
152
+ }
153
+ catch (error) {
154
+ errors.push(`Error extracting ${file}: ${error instanceof Error ? error.message : error}`);
155
+ }
156
+ }
157
+ const stats = calculateExtractionStats(extractions);
158
+ const byLanguage = this.groupByLanguage(extractions);
159
+ const combinedResult = this.createEmptyResult();
160
+ for (const [language, langExtractions] of byLanguage) {
161
+ const discoveryContext = buildDiscoveryContext(langExtractions, language);
162
+ const detectionContext = buildDetectionContext(langExtractions, [], language);
163
+ const result = analyzeWrappers(discoveryContext, { functions: detectionContext.functions, language }, options);
164
+ this.mergeResults(combinedResult, result);
165
+ }
166
+ this.recalculateSummary(combinedResult);
167
+ return {
168
+ analysis: combinedResult,
169
+ stats,
170
+ duration: Date.now() - startTime,
171
+ errors,
172
+ };
173
+ }
174
+ /**
175
+ * Get wrappers for a specific file
176
+ */
177
+ async getFileWrappers(file) {
178
+ const result = await this.scanFiles([file]);
179
+ return result.analysis.wrappers.filter((w) => w.file === file);
180
+ }
181
+ /**
182
+ * Get clusters containing wrappers from a specific file
183
+ */
184
+ async getFileClusters(file) {
185
+ const result = await this.scanFiles([file]);
186
+ return result.analysis.clusters.filter((c) => c.wrappers.some((w) => w.file === file));
187
+ }
188
+ // ===========================================================================
189
+ // Private Methods
190
+ // ===========================================================================
191
+ /**
192
+ * Find files matching patterns
193
+ */
194
+ async findFiles() {
195
+ const files = [];
196
+ const patterns = this.config.patterns || DEFAULT_PATTERNS;
197
+ const walk = async (dir, relativePath = '') => {
198
+ let entries;
199
+ try {
200
+ entries = await fs.readdir(dir, { withFileTypes: true });
201
+ }
202
+ catch {
203
+ return; // Skip inaccessible directories
204
+ }
205
+ for (const entry of entries) {
206
+ const entryName = entry.name;
207
+ const fullPath = path.join(dir, entryName);
208
+ const relPath = relativePath ? `${relativePath}/${entryName}` : entryName;
209
+ if (entry.isDirectory()) {
210
+ if (!IGNORE_PATTERNS.includes(entryName) && !entryName.startsWith('.')) {
211
+ await walk(fullPath, relPath);
212
+ }
213
+ }
214
+ else if (entry.isFile()) {
215
+ for (const pattern of patterns) {
216
+ if (minimatch(relPath, pattern)) {
217
+ files.push(relPath);
218
+ break;
219
+ }
220
+ }
221
+ }
222
+ }
223
+ };
224
+ await walk(this.config.rootDir);
225
+ return files;
226
+ }
227
+ /**
228
+ * Get extractor for a file
229
+ */
230
+ getExtractor(file) {
231
+ for (const extractor of this.extractors) {
232
+ if (extractor.canHandle(file)) {
233
+ return extractor;
234
+ }
235
+ }
236
+ return null;
237
+ }
238
+ /**
239
+ * Group extractions by language
240
+ */
241
+ groupByLanguage(extractions) {
242
+ const byLanguage = new Map();
243
+ for (const extraction of extractions) {
244
+ const lang = mapLanguage(extraction.language);
245
+ if (!lang)
246
+ continue;
247
+ const existing = byLanguage.get(lang) || [];
248
+ byLanguage.set(lang, [...existing, extraction]);
249
+ }
250
+ return byLanguage;
251
+ }
252
+ /**
253
+ * Create empty analysis result
254
+ */
255
+ createEmptyResult() {
256
+ return {
257
+ frameworks: [],
258
+ primitives: [],
259
+ wrappers: [],
260
+ clusters: [],
261
+ factories: [],
262
+ decoratorWrappers: [],
263
+ asyncWrappers: [],
264
+ summary: {
265
+ totalWrappers: 0,
266
+ totalClusters: 0,
267
+ avgDepth: 0,
268
+ maxDepth: 0,
269
+ mostWrappedPrimitive: 'N/A',
270
+ mostUsedWrapper: 'N/A',
271
+ wrappersByLanguage: {
272
+ typescript: 0,
273
+ python: 0,
274
+ java: 0,
275
+ csharp: 0,
276
+ php: 0,
277
+ },
278
+ wrappersByCategory: {
279
+ 'state-management': 0,
280
+ 'data-fetching': 0,
281
+ 'side-effects': 0,
282
+ 'authentication': 0,
283
+ 'authorization': 0,
284
+ 'validation': 0,
285
+ 'dependency-injection': 0,
286
+ 'middleware': 0,
287
+ 'testing': 0,
288
+ 'logging': 0,
289
+ 'caching': 0,
290
+ 'error-handling': 0,
291
+ 'async-utilities': 0,
292
+ 'form-handling': 0,
293
+ 'routing': 0,
294
+ 'factory': 0,
295
+ 'decorator': 0,
296
+ 'utility': 0,
297
+ 'other': 0,
298
+ },
299
+ },
300
+ };
301
+ }
302
+ /**
303
+ * Merge analysis results
304
+ */
305
+ mergeResults(target, source) {
306
+ // Merge arrays (dedupe by name/id where applicable)
307
+ target.frameworks.push(...source.frameworks);
308
+ target.primitives.push(...source.primitives);
309
+ target.wrappers.push(...source.wrappers);
310
+ target.clusters.push(...source.clusters);
311
+ target.factories.push(...source.factories);
312
+ target.decoratorWrappers.push(...source.decoratorWrappers);
313
+ target.asyncWrappers.push(...source.asyncWrappers);
314
+ }
315
+ /**
316
+ * Recalculate summary after merging
317
+ */
318
+ recalculateSummary(result) {
319
+ const { wrappers, clusters } = result;
320
+ // Calculate depths
321
+ const depths = wrappers.map((w) => w.depth);
322
+ const avgDepth = depths.length > 0
323
+ ? depths.reduce((a, b) => a + b, 0) / depths.length
324
+ : 0;
325
+ const maxDepth = depths.length > 0 ? Math.max(...depths) : 0;
326
+ // Count by language
327
+ const byLanguage = result.summary.wrappersByLanguage;
328
+ for (const wrapper of wrappers) {
329
+ byLanguage[wrapper.language]++;
330
+ }
331
+ // Count by category
332
+ const byCategory = result.summary.wrappersByCategory;
333
+ for (const cluster of clusters) {
334
+ byCategory[cluster.category] += cluster.wrappers.length;
335
+ }
336
+ // Find most wrapped primitive
337
+ const primitiveCounts = new Map();
338
+ for (const wrapper of wrappers) {
339
+ for (const prim of wrapper.primitiveSignature) {
340
+ primitiveCounts.set(prim, (primitiveCounts.get(prim) || 0) + 1);
341
+ }
342
+ }
343
+ const mostWrapped = [...primitiveCounts.entries()].sort((a, b) => b[1] - a[1])[0];
344
+ // Find most used wrapper
345
+ const mostUsed = wrappers.reduce((max, w) => (w.calledBy.length > (max?.calledBy.length || 0) ? w : max), wrappers[0]);
346
+ result.summary = {
347
+ totalWrappers: wrappers.length,
348
+ totalClusters: clusters.length,
349
+ avgDepth,
350
+ maxDepth,
351
+ mostWrappedPrimitive: mostWrapped?.[0] || 'N/A',
352
+ mostUsedWrapper: mostUsed?.name || 'N/A',
353
+ wrappersByLanguage: byLanguage,
354
+ wrappersByCategory: byCategory,
355
+ };
356
+ }
357
+ }
358
+ // =============================================================================
359
+ // Factory Function
360
+ // =============================================================================
361
+ /**
362
+ * Create a new WrapperScanner instance
363
+ */
364
+ export function createWrapperScanner(config) {
365
+ return new WrapperScanner(config);
366
+ }
367
+ //# sourceMappingURL=scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../../src/wrappers/integration/scanner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,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