@grafema/core 0.2.5-beta → 0.2.7

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 (769) hide show
  1. package/README.md +61 -23
  2. package/dist/DiscoveryManager.d.ts +59 -0
  3. package/dist/DiscoveryManager.d.ts.map +1 -0
  4. package/dist/DiscoveryManager.js +249 -0
  5. package/dist/DiscoveryManager.js.map +1 -0
  6. package/dist/GraphInitializer.d.ts +44 -0
  7. package/dist/GraphInitializer.d.ts.map +1 -0
  8. package/dist/GraphInitializer.js +121 -0
  9. package/dist/GraphInitializer.js.map +1 -0
  10. package/dist/GuaranteeChecker.d.ts +35 -0
  11. package/dist/GuaranteeChecker.d.ts.map +1 -0
  12. package/dist/GuaranteeChecker.js +81 -0
  13. package/dist/GuaranteeChecker.js.map +1 -0
  14. package/dist/Orchestrator.d.ts +34 -151
  15. package/dist/Orchestrator.d.ts.map +1 -1
  16. package/dist/Orchestrator.js +173 -741
  17. package/dist/Orchestrator.js.map +1 -1
  18. package/dist/OrchestratorTypes.d.ts +115 -0
  19. package/dist/OrchestratorTypes.d.ts.map +1 -0
  20. package/dist/OrchestratorTypes.js +6 -0
  21. package/dist/OrchestratorTypes.js.map +1 -0
  22. package/dist/ParallelAnalysisRunner.d.ts +43 -0
  23. package/dist/ParallelAnalysisRunner.d.ts.map +1 -0
  24. package/dist/ParallelAnalysisRunner.js +161 -0
  25. package/dist/ParallelAnalysisRunner.js.map +1 -0
  26. package/dist/PhaseRunner.d.ts +94 -0
  27. package/dist/PhaseRunner.d.ts.map +1 -0
  28. package/dist/PhaseRunner.js +332 -0
  29. package/dist/PhaseRunner.js.map +1 -0
  30. package/dist/config/ConfigLoader.d.ts +51 -1
  31. package/dist/config/ConfigLoader.d.ts.map +1 -1
  32. package/dist/config/ConfigLoader.js +121 -1
  33. package/dist/config/ConfigLoader.js.map +1 -1
  34. package/dist/config/index.d.ts +1 -1
  35. package/dist/config/index.d.ts.map +1 -1
  36. package/dist/config/index.js +1 -1
  37. package/dist/config/index.js.map +1 -1
  38. package/dist/core/ASTWorker.d.ts +2 -0
  39. package/dist/core/ASTWorker.d.ts.map +1 -1
  40. package/dist/core/ASTWorker.js +6 -2
  41. package/dist/core/ASTWorker.js.map +1 -1
  42. package/dist/core/FileOverview.d.ts +124 -0
  43. package/dist/core/FileOverview.d.ts.map +1 -0
  44. package/dist/core/FileOverview.js +257 -0
  45. package/dist/core/FileOverview.js.map +1 -0
  46. package/dist/core/GraphFreshnessChecker.d.ts +1 -1
  47. package/dist/core/GraphFreshnessChecker.d.ts.map +1 -1
  48. package/dist/core/GraphFreshnessChecker.js +7 -5
  49. package/dist/core/GraphFreshnessChecker.js.map +1 -1
  50. package/dist/core/GuaranteeManager.d.ts +13 -0
  51. package/dist/core/GuaranteeManager.d.ts.map +1 -1
  52. package/dist/core/GuaranteeManager.js +63 -2
  53. package/dist/core/GuaranteeManager.js.map +1 -1
  54. package/dist/core/IncrementalReanalyzer.d.ts.map +1 -1
  55. package/dist/core/IncrementalReanalyzer.js +6 -3
  56. package/dist/core/IncrementalReanalyzer.js.map +1 -1
  57. package/dist/core/NodeFactory.d.ts +81 -415
  58. package/dist/core/NodeFactory.d.ts.map +1 -1
  59. package/dist/core/NodeFactory.js +139 -336
  60. package/dist/core/NodeFactory.js.map +1 -1
  61. package/dist/core/ResourceRegistry.d.ts +17 -0
  62. package/dist/core/ResourceRegistry.d.ts.map +1 -0
  63. package/dist/core/ResourceRegistry.js +32 -0
  64. package/dist/core/ResourceRegistry.js.map +1 -0
  65. package/dist/core/ScopeTracker.d.ts +12 -0
  66. package/dist/core/ScopeTracker.d.ts.map +1 -1
  67. package/dist/core/ScopeTracker.js +24 -0
  68. package/dist/core/ScopeTracker.js.map +1 -1
  69. package/dist/core/SemanticId.d.ts +69 -0
  70. package/dist/core/SemanticId.d.ts.map +1 -1
  71. package/dist/core/SemanticId.js +134 -0
  72. package/dist/core/SemanticId.js.map +1 -1
  73. package/dist/core/brandNodeInternal.d.ts +14 -0
  74. package/dist/core/brandNodeInternal.d.ts.map +1 -0
  75. package/dist/core/brandNodeInternal.js +4 -0
  76. package/dist/core/brandNodeInternal.js.map +1 -0
  77. package/dist/core/buildDependencyGraph.d.ts +36 -0
  78. package/dist/core/buildDependencyGraph.d.ts.map +1 -0
  79. package/dist/core/buildDependencyGraph.js +78 -0
  80. package/dist/core/buildDependencyGraph.js.map +1 -0
  81. package/dist/core/factories/CoreFactory.d.ts +223 -0
  82. package/dist/core/factories/CoreFactory.d.ts.map +1 -0
  83. package/dist/core/factories/CoreFactory.js +127 -0
  84. package/dist/core/factories/CoreFactory.js.map +1 -0
  85. package/dist/core/factories/DatabaseFactory.d.ts +29 -0
  86. package/dist/core/factories/DatabaseFactory.d.ts.map +1 -0
  87. package/dist/core/factories/DatabaseFactory.js +25 -0
  88. package/dist/core/factories/DatabaseFactory.js.map +1 -0
  89. package/dist/core/factories/ExternalFactory.d.ts +11 -0
  90. package/dist/core/factories/ExternalFactory.d.ts.map +1 -0
  91. package/dist/core/factories/ExternalFactory.js +16 -0
  92. package/dist/core/factories/ExternalFactory.js.map +1 -0
  93. package/dist/core/factories/HttpFactory.d.ts +22 -0
  94. package/dist/core/factories/HttpFactory.d.ts.map +1 -0
  95. package/dist/core/factories/HttpFactory.js +32 -0
  96. package/dist/core/factories/HttpFactory.js.map +1 -0
  97. package/dist/core/factories/ReactFactory.d.ts +14 -0
  98. package/dist/core/factories/ReactFactory.d.ts.map +1 -0
  99. package/dist/core/factories/ReactFactory.js +13 -0
  100. package/dist/core/factories/ReactFactory.js.map +1 -0
  101. package/dist/core/factories/RustFactory.d.ts +62 -0
  102. package/dist/core/factories/RustFactory.d.ts.map +1 -0
  103. package/dist/core/factories/RustFactory.js +32 -0
  104. package/dist/core/factories/RustFactory.js.map +1 -0
  105. package/dist/core/factories/ServiceFactory.d.ts +12 -0
  106. package/dist/core/factories/ServiceFactory.d.ts.map +1 -0
  107. package/dist/core/factories/ServiceFactory.js +22 -0
  108. package/dist/core/factories/ServiceFactory.js.map +1 -0
  109. package/dist/core/factories/SocketFactory.d.ts +31 -0
  110. package/dist/core/factories/SocketFactory.d.ts.map +1 -0
  111. package/dist/core/factories/SocketFactory.js +35 -0
  112. package/dist/core/factories/SocketFactory.js.map +1 -0
  113. package/dist/core/nodes/DatabaseNode.d.ts +85 -0
  114. package/dist/core/nodes/DatabaseNode.d.ts.map +1 -0
  115. package/dist/core/nodes/DatabaseNode.js +118 -0
  116. package/dist/core/nodes/DatabaseNode.js.map +1 -0
  117. package/dist/core/nodes/ExpressMiddlewareNode.d.ts +47 -0
  118. package/dist/core/nodes/ExpressMiddlewareNode.d.ts.map +1 -0
  119. package/dist/core/nodes/ExpressMiddlewareNode.js +63 -0
  120. package/dist/core/nodes/ExpressMiddlewareNode.js.map +1 -0
  121. package/dist/core/nodes/ExpressMountNode.d.ts +44 -0
  122. package/dist/core/nodes/ExpressMountNode.d.ts.map +1 -0
  123. package/dist/core/nodes/ExpressMountNode.js +61 -0
  124. package/dist/core/nodes/ExpressMountNode.js.map +1 -0
  125. package/dist/core/nodes/ExternalApiNode.d.ts +29 -0
  126. package/dist/core/nodes/ExternalApiNode.d.ts.map +1 -0
  127. package/dist/core/nodes/ExternalApiNode.js +41 -0
  128. package/dist/core/nodes/ExternalApiNode.js.map +1 -0
  129. package/dist/core/nodes/ExternalFunctionNode.d.ts +40 -0
  130. package/dist/core/nodes/ExternalFunctionNode.d.ts.map +1 -0
  131. package/dist/core/nodes/ExternalFunctionNode.js +54 -0
  132. package/dist/core/nodes/ExternalFunctionNode.js.map +1 -0
  133. package/dist/core/nodes/FetchRequestNode.d.ts +54 -0
  134. package/dist/core/nodes/FetchRequestNode.d.ts.map +1 -0
  135. package/dist/core/nodes/FetchRequestNode.js +67 -0
  136. package/dist/core/nodes/FetchRequestNode.js.map +1 -0
  137. package/dist/core/nodes/HttpRouteNode.d.ts +58 -0
  138. package/dist/core/nodes/HttpRouteNode.d.ts.map +1 -0
  139. package/dist/core/nodes/HttpRouteNode.js +72 -0
  140. package/dist/core/nodes/HttpRouteNode.js.map +1 -0
  141. package/dist/core/nodes/NodeKind.d.ts +1 -0
  142. package/dist/core/nodes/NodeKind.d.ts.map +1 -1
  143. package/dist/core/nodes/NodeKind.js +1 -0
  144. package/dist/core/nodes/NodeKind.js.map +1 -1
  145. package/dist/core/nodes/ReactNode.d.ts +53 -0
  146. package/dist/core/nodes/ReactNode.d.ts.map +1 -0
  147. package/dist/core/nodes/ReactNode.js +70 -0
  148. package/dist/core/nodes/ReactNode.js.map +1 -0
  149. package/dist/core/nodes/RustCallNode.d.ts +46 -0
  150. package/dist/core/nodes/RustCallNode.d.ts.map +1 -0
  151. package/dist/core/nodes/RustCallNode.js +62 -0
  152. package/dist/core/nodes/RustCallNode.js.map +1 -0
  153. package/dist/core/nodes/RustFunctionNode.d.ts +58 -0
  154. package/dist/core/nodes/RustFunctionNode.d.ts.map +1 -0
  155. package/dist/core/nodes/RustFunctionNode.js +67 -0
  156. package/dist/core/nodes/RustFunctionNode.js.map +1 -0
  157. package/dist/core/nodes/RustImplNode.d.ts +35 -0
  158. package/dist/core/nodes/RustImplNode.d.ts.map +1 -0
  159. package/dist/core/nodes/RustImplNode.js +55 -0
  160. package/dist/core/nodes/RustImplNode.js.map +1 -0
  161. package/dist/core/nodes/RustMethodNode.d.ts +64 -0
  162. package/dist/core/nodes/RustMethodNode.d.ts.map +1 -0
  163. package/dist/core/nodes/RustMethodNode.js +76 -0
  164. package/dist/core/nodes/RustMethodNode.js.map +1 -0
  165. package/dist/core/nodes/RustModuleNode.d.ts +40 -0
  166. package/dist/core/nodes/RustModuleNode.d.ts.map +1 -0
  167. package/dist/core/nodes/RustModuleNode.js +57 -0
  168. package/dist/core/nodes/RustModuleNode.js.map +1 -0
  169. package/dist/core/nodes/RustStructNode.d.ts +38 -0
  170. package/dist/core/nodes/RustStructNode.d.ts.map +1 -0
  171. package/dist/core/nodes/RustStructNode.js +54 -0
  172. package/dist/core/nodes/RustStructNode.js.map +1 -0
  173. package/dist/core/nodes/RustTraitNode.d.ts +40 -0
  174. package/dist/core/nodes/RustTraitNode.d.ts.map +1 -0
  175. package/dist/core/nodes/RustTraitNode.js +52 -0
  176. package/dist/core/nodes/RustTraitNode.js.map +1 -0
  177. package/dist/core/nodes/ServiceLayerNode.d.ts +85 -0
  178. package/dist/core/nodes/ServiceLayerNode.d.ts.map +1 -0
  179. package/dist/core/nodes/ServiceLayerNode.js +122 -0
  180. package/dist/core/nodes/ServiceLayerNode.js.map +1 -0
  181. package/dist/core/nodes/SocketIONode.d.ts +71 -0
  182. package/dist/core/nodes/SocketIONode.d.ts.map +1 -0
  183. package/dist/core/nodes/SocketIONode.js +111 -0
  184. package/dist/core/nodes/SocketIONode.js.map +1 -0
  185. package/dist/core/nodes/SocketNode.d.ts +87 -0
  186. package/dist/core/nodes/SocketNode.d.ts.map +1 -0
  187. package/dist/core/nodes/SocketNode.js +124 -0
  188. package/dist/core/nodes/SocketNode.js.map +1 -0
  189. package/dist/core/nodes/TypeNode.d.ts +26 -1
  190. package/dist/core/nodes/TypeNode.d.ts.map +1 -1
  191. package/dist/core/nodes/TypeNode.js +21 -3
  192. package/dist/core/nodes/TypeNode.js.map +1 -1
  193. package/dist/core/nodes/TypeParameterNode.d.ts +44 -0
  194. package/dist/core/nodes/TypeParameterNode.d.ts.map +1 -0
  195. package/dist/core/nodes/TypeParameterNode.js +64 -0
  196. package/dist/core/nodes/TypeParameterNode.js.map +1 -0
  197. package/dist/core/nodes/index.d.ts +19 -0
  198. package/dist/core/nodes/index.d.ts.map +1 -1
  199. package/dist/core/nodes/index.js +26 -0
  200. package/dist/core/nodes/index.js.map +1 -1
  201. package/dist/index.d.ts +33 -6
  202. package/dist/index.d.ts.map +1 -1
  203. package/dist/index.js +30 -3
  204. package/dist/index.js.map +1 -1
  205. package/dist/plugins/InfraAnalyzer.d.ts +110 -0
  206. package/dist/plugins/InfraAnalyzer.d.ts.map +1 -0
  207. package/dist/plugins/InfraAnalyzer.js +170 -0
  208. package/dist/plugins/InfraAnalyzer.js.map +1 -0
  209. package/dist/plugins/analysis/DatabaseAnalyzer.d.ts.map +1 -1
  210. package/dist/plugins/analysis/DatabaseAnalyzer.js +18 -15
  211. package/dist/plugins/analysis/DatabaseAnalyzer.js.map +1 -1
  212. package/dist/plugins/analysis/ExpressAnalyzer.d.ts.map +1 -1
  213. package/dist/plugins/analysis/ExpressAnalyzer.js +27 -26
  214. package/dist/plugins/analysis/ExpressAnalyzer.js.map +1 -1
  215. package/dist/plugins/analysis/ExpressResponseAnalyzer.d.ts.map +1 -1
  216. package/dist/plugins/analysis/ExpressResponseAnalyzer.js +5 -3
  217. package/dist/plugins/analysis/ExpressResponseAnalyzer.js.map +1 -1
  218. package/dist/plugins/analysis/ExpressRouteAnalyzer.d.ts.map +1 -1
  219. package/dist/plugins/analysis/ExpressRouteAnalyzer.js +36 -39
  220. package/dist/plugins/analysis/ExpressRouteAnalyzer.js.map +1 -1
  221. package/dist/plugins/analysis/FetchAnalyzer.d.ts.map +1 -1
  222. package/dist/plugins/analysis/FetchAnalyzer.js +23 -39
  223. package/dist/plugins/analysis/FetchAnalyzer.js.map +1 -1
  224. package/dist/plugins/analysis/IncrementalAnalysisPlugin.d.ts.map +1 -1
  225. package/dist/plugins/analysis/IncrementalAnalysisPlugin.js +3 -2
  226. package/dist/plugins/analysis/IncrementalAnalysisPlugin.js.map +1 -1
  227. package/dist/plugins/analysis/JSASTAnalyzer.d.ts +23 -85
  228. package/dist/plugins/analysis/JSASTAnalyzer.d.ts.map +1 -1
  229. package/dist/plugins/analysis/JSASTAnalyzer.js +351 -1887
  230. package/dist/plugins/analysis/JSASTAnalyzer.js.map +1 -1
  231. package/dist/plugins/analysis/NestJSRouteAnalyzer.d.ts +28 -0
  232. package/dist/plugins/analysis/NestJSRouteAnalyzer.d.ts.map +1 -0
  233. package/dist/plugins/analysis/NestJSRouteAnalyzer.js +196 -0
  234. package/dist/plugins/analysis/NestJSRouteAnalyzer.js.map +1 -0
  235. package/dist/plugins/analysis/ReactAnalyzer.d.ts +1 -61
  236. package/dist/plugins/analysis/ReactAnalyzer.d.ts.map +1 -1
  237. package/dist/plugins/analysis/ReactAnalyzer.js +24 -915
  238. package/dist/plugins/analysis/ReactAnalyzer.js.map +1 -1
  239. package/dist/plugins/analysis/RustAnalyzer.d.ts.map +1 -1
  240. package/dist/plugins/analysis/RustAnalyzer.js +31 -66
  241. package/dist/plugins/analysis/RustAnalyzer.js.map +1 -1
  242. package/dist/plugins/analysis/SQLiteAnalyzer.d.ts.map +1 -1
  243. package/dist/plugins/analysis/SQLiteAnalyzer.js +13 -6
  244. package/dist/plugins/analysis/SQLiteAnalyzer.js.map +1 -1
  245. package/dist/plugins/analysis/ServiceLayerAnalyzer.d.ts.map +1 -1
  246. package/dist/plugins/analysis/ServiceLayerAnalyzer.js +10 -7
  247. package/dist/plugins/analysis/ServiceLayerAnalyzer.js.map +1 -1
  248. package/dist/plugins/analysis/SocketAnalyzer.d.ts +81 -0
  249. package/dist/plugins/analysis/SocketAnalyzer.d.ts.map +1 -0
  250. package/dist/plugins/analysis/SocketAnalyzer.js +475 -0
  251. package/dist/plugins/analysis/SocketAnalyzer.js.map +1 -0
  252. package/dist/plugins/analysis/SocketIOAnalyzer.d.ts.map +1 -1
  253. package/dist/plugins/analysis/SocketIOAnalyzer.js +13 -18
  254. package/dist/plugins/analysis/SocketIOAnalyzer.js.map +1 -1
  255. package/dist/plugins/analysis/SystemDbAnalyzer.d.ts.map +1 -1
  256. package/dist/plugins/analysis/SystemDbAnalyzer.js +8 -5
  257. package/dist/plugins/analysis/SystemDbAnalyzer.js.map +1 -1
  258. package/dist/plugins/analysis/ast/CollisionResolver.d.ts +65 -0
  259. package/dist/plugins/analysis/ast/CollisionResolver.d.ts.map +1 -0
  260. package/dist/plugins/analysis/ast/CollisionResolver.js +106 -0
  261. package/dist/plugins/analysis/ast/CollisionResolver.js.map +1 -0
  262. package/dist/plugins/analysis/ast/FunctionBodyContext.d.ts +124 -0
  263. package/dist/plugins/analysis/ast/FunctionBodyContext.d.ts.map +1 -0
  264. package/dist/plugins/analysis/ast/FunctionBodyContext.js +151 -0
  265. package/dist/plugins/analysis/ast/FunctionBodyContext.js.map +1 -0
  266. package/dist/plugins/analysis/ast/GraphBuilder.d.ts +26 -261
  267. package/dist/plugins/analysis/ast/GraphBuilder.d.ts.map +1 -1
  268. package/dist/plugins/analysis/ast/GraphBuilder.js +251 -2494
  269. package/dist/plugins/analysis/ast/GraphBuilder.js.map +1 -1
  270. package/dist/plugins/analysis/ast/IdGenerator.d.ts +42 -0
  271. package/dist/plugins/analysis/ast/IdGenerator.d.ts.map +1 -1
  272. package/dist/plugins/analysis/ast/IdGenerator.js +61 -1
  273. package/dist/plugins/analysis/ast/IdGenerator.js.map +1 -1
  274. package/dist/plugins/analysis/ast/builders/AssignmentBuilder.d.ts +15 -0
  275. package/dist/plugins/analysis/ast/builders/AssignmentBuilder.d.ts.map +1 -0
  276. package/dist/plugins/analysis/ast/builders/AssignmentBuilder.js +274 -0
  277. package/dist/plugins/analysis/ast/builders/AssignmentBuilder.js.map +1 -0
  278. package/dist/plugins/analysis/ast/builders/CallFlowBuilder.d.ts +22 -0
  279. package/dist/plugins/analysis/ast/builders/CallFlowBuilder.d.ts.map +1 -0
  280. package/dist/plugins/analysis/ast/builders/CallFlowBuilder.js +178 -0
  281. package/dist/plugins/analysis/ast/builders/CallFlowBuilder.js.map +1 -0
  282. package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.d.ts +76 -0
  283. package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.d.ts.map +1 -0
  284. package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.js +387 -0
  285. package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.js.map +1 -0
  286. package/dist/plugins/analysis/ast/builders/CoreBuilder.d.ts +38 -0
  287. package/dist/plugins/analysis/ast/builders/CoreBuilder.d.ts.map +1 -0
  288. package/dist/plugins/analysis/ast/builders/CoreBuilder.js +240 -0
  289. package/dist/plugins/analysis/ast/builders/CoreBuilder.js.map +1 -0
  290. package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.d.ts +53 -0
  291. package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.d.ts.map +1 -0
  292. package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.js +355 -0
  293. package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.js.map +1 -0
  294. package/dist/plugins/analysis/ast/builders/MutationBuilder.d.ts +46 -0
  295. package/dist/plugins/analysis/ast/builders/MutationBuilder.d.ts.map +1 -0
  296. package/dist/plugins/analysis/ast/builders/MutationBuilder.js +264 -0
  297. package/dist/plugins/analysis/ast/builders/MutationBuilder.js.map +1 -0
  298. package/dist/plugins/analysis/ast/builders/ReturnBuilder.d.ts +23 -0
  299. package/dist/plugins/analysis/ast/builders/ReturnBuilder.d.ts.map +1 -0
  300. package/dist/plugins/analysis/ast/builders/ReturnBuilder.js +206 -0
  301. package/dist/plugins/analysis/ast/builders/ReturnBuilder.js.map +1 -0
  302. package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.d.ts +64 -0
  303. package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.d.ts.map +1 -0
  304. package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.js +370 -0
  305. package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.js.map +1 -0
  306. package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.d.ts +46 -0
  307. package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.d.ts.map +1 -0
  308. package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.js +191 -0
  309. package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.js.map +1 -0
  310. package/dist/plugins/analysis/ast/builders/YieldBuilder.d.ts +30 -0
  311. package/dist/plugins/analysis/ast/builders/YieldBuilder.d.ts.map +1 -0
  312. package/dist/plugins/analysis/ast/builders/YieldBuilder.js +214 -0
  313. package/dist/plugins/analysis/ast/builders/YieldBuilder.js.map +1 -0
  314. package/dist/plugins/analysis/ast/builders/index.d.ts +12 -0
  315. package/dist/plugins/analysis/ast/builders/index.d.ts.map +1 -0
  316. package/dist/plugins/analysis/ast/builders/index.js +11 -0
  317. package/dist/plugins/analysis/ast/builders/index.js.map +1 -0
  318. package/dist/plugins/analysis/ast/builders/types.d.ts +30 -0
  319. package/dist/plugins/analysis/ast/builders/types.d.ts.map +1 -0
  320. package/dist/plugins/analysis/ast/builders/types.js +8 -0
  321. package/dist/plugins/analysis/ast/builders/types.js.map +1 -0
  322. package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.d.ts +50 -0
  323. package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.d.ts.map +1 -0
  324. package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.js +2 -0
  325. package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.js.map +1 -0
  326. package/dist/plugins/analysis/ast/handlers/BranchHandler.d.ts +18 -0
  327. package/dist/plugins/analysis/ast/handlers/BranchHandler.d.ts.map +1 -0
  328. package/dist/plugins/analysis/ast/handlers/BranchHandler.js +244 -0
  329. package/dist/plugins/analysis/ast/handlers/BranchHandler.js.map +1 -0
  330. package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.d.ts +7 -0
  331. package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.d.ts.map +1 -0
  332. package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.js +295 -0
  333. package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.js.map +1 -0
  334. package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.d.ts +22 -0
  335. package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.d.ts.map +1 -0
  336. package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.js +9 -0
  337. package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.js.map +1 -0
  338. package/dist/plugins/analysis/ast/handlers/LoopHandler.d.ts +13 -0
  339. package/dist/plugins/analysis/ast/handlers/LoopHandler.d.ts.map +1 -0
  340. package/dist/plugins/analysis/ast/handlers/LoopHandler.js +207 -0
  341. package/dist/plugins/analysis/ast/handlers/LoopHandler.js.map +1 -0
  342. package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.d.ts +13 -0
  343. package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.d.ts.map +1 -0
  344. package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.js +174 -0
  345. package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.js.map +1 -0
  346. package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.d.ts +12 -0
  347. package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.d.ts.map +1 -0
  348. package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.js +135 -0
  349. package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.js.map +1 -0
  350. package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.d.ts +13 -0
  351. package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.d.ts.map +1 -0
  352. package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.js +71 -0
  353. package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.js.map +1 -0
  354. package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.d.ts +12 -0
  355. package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.d.ts.map +1 -0
  356. package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.js +135 -0
  357. package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.js.map +1 -0
  358. package/dist/plugins/analysis/ast/handlers/ThrowHandler.d.ts +12 -0
  359. package/dist/plugins/analysis/ast/handlers/ThrowHandler.d.ts.map +1 -0
  360. package/dist/plugins/analysis/ast/handlers/ThrowHandler.js +82 -0
  361. package/dist/plugins/analysis/ast/handlers/ThrowHandler.js.map +1 -0
  362. package/dist/plugins/analysis/ast/handlers/TryCatchHandler.d.ts +14 -0
  363. package/dist/plugins/analysis/ast/handlers/TryCatchHandler.d.ts.map +1 -0
  364. package/dist/plugins/analysis/ast/handlers/TryCatchHandler.js +220 -0
  365. package/dist/plugins/analysis/ast/handlers/TryCatchHandler.js.map +1 -0
  366. package/dist/plugins/analysis/ast/handlers/VariableHandler.d.ts +12 -0
  367. package/dist/plugins/analysis/ast/handlers/VariableHandler.d.ts.map +1 -0
  368. package/dist/plugins/analysis/ast/handlers/VariableHandler.js +57 -0
  369. package/dist/plugins/analysis/ast/handlers/VariableHandler.js.map +1 -0
  370. package/dist/plugins/analysis/ast/handlers/index.d.ts +13 -0
  371. package/dist/plugins/analysis/ast/handlers/index.d.ts.map +1 -0
  372. package/dist/plugins/analysis/ast/handlers/index.js +12 -0
  373. package/dist/plugins/analysis/ast/handlers/index.js.map +1 -0
  374. package/dist/plugins/analysis/ast/types.d.ts +57 -6
  375. package/dist/plugins/analysis/ast/types.d.ts.map +1 -1
  376. package/dist/plugins/analysis/ast/utils/createParameterNodes.d.ts +5 -4
  377. package/dist/plugins/analysis/ast/utils/createParameterNodes.d.ts.map +1 -1
  378. package/dist/plugins/analysis/ast/utils/createParameterNodes.js +94 -13
  379. package/dist/plugins/analysis/ast/utils/createParameterNodes.js.map +1 -1
  380. package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.d.ts +81 -0
  381. package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.d.ts.map +1 -0
  382. package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.js +140 -0
  383. package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.js.map +1 -0
  384. package/dist/plugins/analysis/ast/utils/getExpressionValue.d.ts +22 -0
  385. package/dist/plugins/analysis/ast/utils/getExpressionValue.d.ts.map +1 -0
  386. package/dist/plugins/analysis/ast/utils/getExpressionValue.js +35 -0
  387. package/dist/plugins/analysis/ast/utils/getExpressionValue.js.map +1 -0
  388. package/dist/plugins/analysis/ast/utils/getMemberExpressionName.d.ts +25 -0
  389. package/dist/plugins/analysis/ast/utils/getMemberExpressionName.d.ts.map +1 -0
  390. package/dist/plugins/analysis/ast/utils/getMemberExpressionName.js +21 -0
  391. package/dist/plugins/analysis/ast/utils/getMemberExpressionName.js.map +1 -0
  392. package/dist/plugins/analysis/ast/utils/index.d.ts +2 -0
  393. package/dist/plugins/analysis/ast/utils/index.d.ts.map +1 -1
  394. package/dist/plugins/analysis/ast/utils/index.js +2 -0
  395. package/dist/plugins/analysis/ast/utils/index.js.map +1 -1
  396. package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.d.ts +23 -0
  397. package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.d.ts.map +1 -0
  398. package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.js +241 -0
  399. package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.js.map +1 -0
  400. package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.d.ts +20 -0
  401. package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.d.ts.map +1 -0
  402. package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.js +110 -0
  403. package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.js.map +1 -0
  404. package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.d.ts +15 -142
  405. package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.d.ts.map +1 -1
  406. package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.js +304 -937
  407. package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.js.map +1 -1
  408. package/dist/plugins/analysis/ast/visitors/ClassVisitor.d.ts.map +1 -1
  409. package/dist/plugins/analysis/ast/visitors/ClassVisitor.js +26 -11
  410. package/dist/plugins/analysis/ast/visitors/ClassVisitor.js.map +1 -1
  411. package/dist/plugins/analysis/ast/visitors/FunctionVisitor.d.ts.map +1 -1
  412. package/dist/plugins/analysis/ast/visitors/FunctionVisitor.js +21 -6
  413. package/dist/plugins/analysis/ast/visitors/FunctionVisitor.js.map +1 -1
  414. package/dist/plugins/analysis/ast/visitors/MutationDetector.d.ts +25 -0
  415. package/dist/plugins/analysis/ast/visitors/MutationDetector.d.ts.map +1 -0
  416. package/dist/plugins/analysis/ast/visitors/MutationDetector.js +181 -0
  417. package/dist/plugins/analysis/ast/visitors/MutationDetector.js.map +1 -0
  418. package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.d.ts +20 -0
  419. package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.d.ts.map +1 -0
  420. package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.js +155 -0
  421. package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.js.map +1 -0
  422. package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.d.ts +9 -1
  423. package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.d.ts.map +1 -1
  424. package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.js +51 -3
  425. package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.js.map +1 -1
  426. package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.d.ts +20 -0
  427. package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.d.ts.map +1 -1
  428. package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.js +188 -12
  429. package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.js.map +1 -1
  430. package/dist/plugins/analysis/ast/visitors/VariableVisitor.d.ts.map +1 -1
  431. package/dist/plugins/analysis/ast/visitors/VariableVisitor.js +6 -4
  432. package/dist/plugins/analysis/ast/visitors/VariableVisitor.js.map +1 -1
  433. package/dist/plugins/analysis/ast/visitors/call-expression-helpers.d.ts +19 -0
  434. package/dist/plugins/analysis/ast/visitors/call-expression-helpers.d.ts.map +1 -0
  435. package/dist/plugins/analysis/ast/visitors/call-expression-helpers.js +57 -0
  436. package/dist/plugins/analysis/ast/visitors/call-expression-helpers.js.map +1 -0
  437. package/dist/plugins/analysis/ast/visitors/call-expression-types.d.ts +168 -0
  438. package/dist/plugins/analysis/ast/visitors/call-expression-types.d.ts.map +1 -0
  439. package/dist/plugins/analysis/ast/visitors/call-expression-types.js +7 -0
  440. package/dist/plugins/analysis/ast/visitors/call-expression-types.js.map +1 -0
  441. package/dist/plugins/analysis/react-internal/browser-api.d.ts +20 -0
  442. package/dist/plugins/analysis/react-internal/browser-api.d.ts.map +1 -0
  443. package/dist/plugins/analysis/react-internal/browser-api.js +140 -0
  444. package/dist/plugins/analysis/react-internal/browser-api.js.map +1 -0
  445. package/dist/plugins/analysis/react-internal/hooks.d.ts +31 -0
  446. package/dist/plugins/analysis/react-internal/hooks.d.ts.map +1 -0
  447. package/dist/plugins/analysis/react-internal/hooks.js +465 -0
  448. package/dist/plugins/analysis/react-internal/hooks.js.map +1 -0
  449. package/dist/plugins/analysis/react-internal/jsx.d.ts +43 -0
  450. package/dist/plugins/analysis/react-internal/jsx.d.ts.map +1 -0
  451. package/dist/plugins/analysis/react-internal/jsx.js +231 -0
  452. package/dist/plugins/analysis/react-internal/jsx.js.map +1 -0
  453. package/dist/plugins/analysis/react-internal/types.d.ts +116 -0
  454. package/dist/plugins/analysis/react-internal/types.d.ts.map +1 -0
  455. package/dist/plugins/analysis/react-internal/types.js +83 -0
  456. package/dist/plugins/analysis/react-internal/types.js.map +1 -0
  457. package/dist/plugins/discovery/MonorepoServiceDiscovery.d.ts.map +1 -1
  458. package/dist/plugins/discovery/MonorepoServiceDiscovery.js +6 -13
  459. package/dist/plugins/discovery/MonorepoServiceDiscovery.js.map +1 -1
  460. package/dist/plugins/enrichment/AliasTracker.d.ts.map +1 -1
  461. package/dist/plugins/enrichment/AliasTracker.js +3 -1
  462. package/dist/plugins/enrichment/AliasTracker.js.map +1 -1
  463. package/dist/plugins/enrichment/ArgumentParameterLinker.d.ts.map +1 -1
  464. package/dist/plugins/enrichment/ArgumentParameterLinker.js +3 -1
  465. package/dist/plugins/enrichment/ArgumentParameterLinker.js.map +1 -1
  466. package/dist/plugins/enrichment/CallbackCallResolver.d.ts +42 -0
  467. package/dist/plugins/enrichment/CallbackCallResolver.d.ts.map +1 -0
  468. package/dist/plugins/enrichment/CallbackCallResolver.js +311 -0
  469. package/dist/plugins/enrichment/CallbackCallResolver.js.map +1 -0
  470. package/dist/plugins/enrichment/ClosureCaptureEnricher.d.ts.map +1 -1
  471. package/dist/plugins/enrichment/ClosureCaptureEnricher.js +3 -1
  472. package/dist/plugins/enrichment/ClosureCaptureEnricher.js.map +1 -1
  473. package/dist/plugins/enrichment/ConfigRoutingMapBuilder.d.ts +17 -0
  474. package/dist/plugins/enrichment/ConfigRoutingMapBuilder.d.ts.map +1 -0
  475. package/dist/plugins/enrichment/ConfigRoutingMapBuilder.js +55 -0
  476. package/dist/plugins/enrichment/ConfigRoutingMapBuilder.js.map +1 -0
  477. package/dist/plugins/enrichment/ExpressHandlerLinker.d.ts.map +1 -1
  478. package/dist/plugins/enrichment/ExpressHandlerLinker.js +3 -1
  479. package/dist/plugins/enrichment/ExpressHandlerLinker.js.map +1 -1
  480. package/dist/plugins/enrichment/ExternalCallResolver.d.ts.map +1 -1
  481. package/dist/plugins/enrichment/ExternalCallResolver.js +5 -8
  482. package/dist/plugins/enrichment/ExternalCallResolver.js.map +1 -1
  483. package/dist/plugins/enrichment/FunctionCallResolver.d.ts.map +1 -1
  484. package/dist/plugins/enrichment/FunctionCallResolver.js +6 -9
  485. package/dist/plugins/enrichment/FunctionCallResolver.js.map +1 -1
  486. package/dist/plugins/enrichment/HTTPConnectionEnricher.d.ts.map +1 -1
  487. package/dist/plugins/enrichment/HTTPConnectionEnricher.js +3 -1
  488. package/dist/plugins/enrichment/HTTPConnectionEnricher.js.map +1 -1
  489. package/dist/plugins/enrichment/ImportExportLinker.d.ts.map +1 -1
  490. package/dist/plugins/enrichment/ImportExportLinker.js +5 -3
  491. package/dist/plugins/enrichment/ImportExportLinker.js.map +1 -1
  492. package/dist/plugins/enrichment/InstanceOfResolver.d.ts.map +1 -1
  493. package/dist/plugins/enrichment/InstanceOfResolver.js +3 -1
  494. package/dist/plugins/enrichment/InstanceOfResolver.js.map +1 -1
  495. package/dist/plugins/enrichment/MethodCallResolver.d.ts +17 -68
  496. package/dist/plugins/enrichment/MethodCallResolver.d.ts.map +1 -1
  497. package/dist/plugins/enrichment/MethodCallResolver.js +42 -517
  498. package/dist/plugins/enrichment/MethodCallResolver.js.map +1 -1
  499. package/dist/plugins/enrichment/MountPointResolver.d.ts.map +1 -1
  500. package/dist/plugins/enrichment/MountPointResolver.js +9 -2
  501. package/dist/plugins/enrichment/MountPointResolver.js.map +1 -1
  502. package/dist/plugins/enrichment/NodejsBuiltinsResolver.d.ts.map +1 -1
  503. package/dist/plugins/enrichment/NodejsBuiltinsResolver.js +7 -16
  504. package/dist/plugins/enrichment/NodejsBuiltinsResolver.js.map +1 -1
  505. package/dist/plugins/enrichment/PrefixEvaluator.d.ts.map +1 -1
  506. package/dist/plugins/enrichment/PrefixEvaluator.js +6 -2
  507. package/dist/plugins/enrichment/PrefixEvaluator.js.map +1 -1
  508. package/dist/plugins/enrichment/RejectionPropagationEnricher.d.ts.map +1 -1
  509. package/dist/plugins/enrichment/RejectionPropagationEnricher.js +3 -1
  510. package/dist/plugins/enrichment/RejectionPropagationEnricher.js.map +1 -1
  511. package/dist/plugins/enrichment/RustFFIEnricher.d.ts.map +1 -1
  512. package/dist/plugins/enrichment/RustFFIEnricher.js +3 -1
  513. package/dist/plugins/enrichment/RustFFIEnricher.js.map +1 -1
  514. package/dist/plugins/enrichment/ServiceConnectionEnricher.d.ts +76 -0
  515. package/dist/plugins/enrichment/ServiceConnectionEnricher.d.ts.map +1 -0
  516. package/dist/plugins/enrichment/ServiceConnectionEnricher.js +355 -0
  517. package/dist/plugins/enrichment/ServiceConnectionEnricher.js.map +1 -0
  518. package/dist/plugins/enrichment/SocketConnectionEnricher.d.ts +42 -0
  519. package/dist/plugins/enrichment/SocketConnectionEnricher.d.ts.map +1 -0
  520. package/dist/plugins/enrichment/SocketConnectionEnricher.js +166 -0
  521. package/dist/plugins/enrichment/SocketConnectionEnricher.js.map +1 -0
  522. package/dist/plugins/enrichment/ValueDomainAnalyzer.d.ts.map +1 -1
  523. package/dist/plugins/enrichment/ValueDomainAnalyzer.js +3 -1
  524. package/dist/plugins/enrichment/ValueDomainAnalyzer.js.map +1 -1
  525. package/dist/plugins/enrichment/method-call/MethodCallData.d.ts +68 -0
  526. package/dist/plugins/enrichment/method-call/MethodCallData.d.ts.map +1 -0
  527. package/dist/plugins/enrichment/method-call/MethodCallData.js +227 -0
  528. package/dist/plugins/enrichment/method-call/MethodCallData.js.map +1 -0
  529. package/dist/plugins/enrichment/method-call/MethodCallDetectors.d.ts +21 -0
  530. package/dist/plugins/enrichment/method-call/MethodCallDetectors.d.ts.map +1 -0
  531. package/dist/plugins/enrichment/method-call/MethodCallDetectors.js +52 -0
  532. package/dist/plugins/enrichment/method-call/MethodCallDetectors.js.map +1 -0
  533. package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.d.ts +22 -0
  534. package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.d.ts.map +1 -0
  535. package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.js +105 -0
  536. package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.js.map +1 -0
  537. package/dist/plugins/enrichment/method-call/MethodCallIndexers.d.ts +19 -0
  538. package/dist/plugins/enrichment/method-call/MethodCallIndexers.d.ts.map +1 -0
  539. package/dist/plugins/enrichment/method-call/MethodCallIndexers.js +63 -0
  540. package/dist/plugins/enrichment/method-call/MethodCallIndexers.js.map +1 -0
  541. package/dist/plugins/enrichment/method-call/MethodCallResolution.d.ts +30 -0
  542. package/dist/plugins/enrichment/method-call/MethodCallResolution.d.ts.map +1 -0
  543. package/dist/plugins/enrichment/method-call/MethodCallResolution.js +138 -0
  544. package/dist/plugins/enrichment/method-call/MethodCallResolution.js.map +1 -0
  545. package/dist/plugins/indexing/IncrementalModuleIndexer.d.ts.map +1 -1
  546. package/dist/plugins/indexing/IncrementalModuleIndexer.js +2 -8
  547. package/dist/plugins/indexing/IncrementalModuleIndexer.js.map +1 -1
  548. package/dist/plugins/indexing/JSModuleIndexer.d.ts.map +1 -1
  549. package/dist/plugins/indexing/JSModuleIndexer.js +13 -20
  550. package/dist/plugins/indexing/JSModuleIndexer.js.map +1 -1
  551. package/dist/plugins/indexing/RustModuleIndexer.d.ts.map +1 -1
  552. package/dist/plugins/indexing/RustModuleIndexer.js +4 -8
  553. package/dist/plugins/indexing/RustModuleIndexer.js.map +1 -1
  554. package/dist/plugins/validation/AwaitInLoopValidator.d.ts +24 -0
  555. package/dist/plugins/validation/AwaitInLoopValidator.d.ts.map +1 -0
  556. package/dist/plugins/validation/AwaitInLoopValidator.js +69 -0
  557. package/dist/plugins/validation/AwaitInLoopValidator.js.map +1 -0
  558. package/dist/plugins/validation/PackageCoverageValidator.d.ts +33 -0
  559. package/dist/plugins/validation/PackageCoverageValidator.d.ts.map +1 -0
  560. package/dist/plugins/validation/PackageCoverageValidator.js +149 -0
  561. package/dist/plugins/validation/PackageCoverageValidator.js.map +1 -0
  562. package/dist/plugins/validation/UnconnectedRouteValidator.d.ts +18 -0
  563. package/dist/plugins/validation/UnconnectedRouteValidator.d.ts.map +1 -0
  564. package/dist/plugins/validation/UnconnectedRouteValidator.js +68 -0
  565. package/dist/plugins/validation/UnconnectedRouteValidator.js.map +1 -0
  566. package/dist/queries/NodeContext.d.ts +81 -0
  567. package/dist/queries/NodeContext.d.ts.map +1 -0
  568. package/dist/queries/NodeContext.js +193 -0
  569. package/dist/queries/NodeContext.js.map +1 -0
  570. package/dist/queries/findCallsInFunction.d.ts.map +1 -1
  571. package/dist/queries/findCallsInFunction.js +10 -2
  572. package/dist/queries/findCallsInFunction.js.map +1 -1
  573. package/dist/queries/findContainingFunction.d.ts +3 -2
  574. package/dist/queries/findContainingFunction.d.ts.map +1 -1
  575. package/dist/queries/findContainingFunction.js +13 -3
  576. package/dist/queries/findContainingFunction.js.map +1 -1
  577. package/dist/queries/index.d.ts +2 -0
  578. package/dist/queries/index.d.ts.map +1 -1
  579. package/dist/queries/index.js +1 -0
  580. package/dist/queries/index.js.map +1 -1
  581. package/dist/resources/InfraResourceMapImpl.d.ts +31 -0
  582. package/dist/resources/InfraResourceMapImpl.d.ts.map +1 -0
  583. package/dist/resources/InfraResourceMapImpl.js +110 -0
  584. package/dist/resources/InfraResourceMapImpl.js.map +1 -0
  585. package/dist/resources/RoutingMapImpl.d.ts +33 -0
  586. package/dist/resources/RoutingMapImpl.d.ts.map +1 -0
  587. package/dist/resources/RoutingMapImpl.js +115 -0
  588. package/dist/resources/RoutingMapImpl.js.map +1 -0
  589. package/dist/storage/backends/RFDBServerBackend.d.ts +35 -6
  590. package/dist/storage/backends/RFDBServerBackend.d.ts.map +1 -1
  591. package/dist/storage/backends/RFDBServerBackend.js +102 -70
  592. package/dist/storage/backends/RFDBServerBackend.js.map +1 -1
  593. package/dist/utils/findRfdbBinary.d.ts +3 -2
  594. package/dist/utils/findRfdbBinary.d.ts.map +1 -1
  595. package/dist/utils/findRfdbBinary.js +22 -7
  596. package/dist/utils/findRfdbBinary.js.map +1 -1
  597. package/dist/utils/moduleResolution.d.ts.map +1 -1
  598. package/dist/utils/moduleResolution.js +26 -1
  599. package/dist/utils/moduleResolution.js.map +1 -1
  600. package/dist/utils/resolveNodeFile.d.ts +13 -0
  601. package/dist/utils/resolveNodeFile.d.ts.map +1 -0
  602. package/dist/utils/resolveNodeFile.js +18 -0
  603. package/dist/utils/resolveNodeFile.js.map +1 -0
  604. package/dist/version.d.ts +11 -0
  605. package/dist/version.d.ts.map +1 -0
  606. package/dist/version.js +26 -0
  607. package/dist/version.js.map +1 -0
  608. package/package.json +3 -3
  609. package/src/DiscoveryManager.ts +279 -0
  610. package/src/GraphInitializer.ts +131 -0
  611. package/src/GuaranteeChecker.ts +90 -0
  612. package/src/Orchestrator.ts +222 -963
  613. package/src/OrchestratorTypes.ts +122 -0
  614. package/src/ParallelAnalysisRunner.ts +188 -0
  615. package/src/PhaseRunner.ts +450 -0
  616. package/src/config/ConfigLoader.ts +176 -2
  617. package/src/config/index.ts +2 -0
  618. package/src/core/ASTWorker.ts +9 -2
  619. package/src/core/FileOverview.ts +374 -0
  620. package/src/core/GraphFreshnessChecker.ts +7 -5
  621. package/src/core/GuaranteeManager.ts +70 -2
  622. package/src/core/IncrementalReanalyzer.ts +6 -3
  623. package/src/core/NodeFactory.ts +173 -652
  624. package/src/core/ResourceRegistry.ts +39 -0
  625. package/src/core/ScopeTracker.ts +23 -0
  626. package/src/core/SemanticId.ts +183 -0
  627. package/src/core/brandNodeInternal.ts +16 -0
  628. package/src/core/buildDependencyGraph.ts +98 -0
  629. package/src/core/factories/CoreFactory.ts +489 -0
  630. package/src/core/factories/DatabaseFactory.ts +63 -0
  631. package/src/core/factories/ExternalFactory.ts +23 -0
  632. package/src/core/factories/HttpFactory.ts +57 -0
  633. package/src/core/factories/ReactFactory.ts +15 -0
  634. package/src/core/factories/RustFactory.ts +128 -0
  635. package/src/core/factories/ServiceFactory.ts +27 -0
  636. package/src/core/factories/SocketFactory.ts +94 -0
  637. package/src/core/nodes/DatabaseNode.ts +175 -0
  638. package/src/core/nodes/ExpressMiddlewareNode.ts +98 -0
  639. package/src/core/nodes/ExpressMountNode.ts +94 -0
  640. package/src/core/nodes/ExternalApiNode.ts +53 -0
  641. package/src/core/nodes/ExternalFunctionNode.ts +77 -0
  642. package/src/core/nodes/FetchRequestNode.ts +105 -0
  643. package/src/core/nodes/HttpRouteNode.ts +113 -0
  644. package/src/core/nodes/NodeKind.ts +1 -0
  645. package/src/core/nodes/ReactNode.ts +78 -0
  646. package/src/core/nodes/RustCallNode.ts +96 -0
  647. package/src/core/nodes/RustFunctionNode.ts +112 -0
  648. package/src/core/nodes/RustImplNode.ts +78 -0
  649. package/src/core/nodes/RustMethodNode.ts +125 -0
  650. package/src/core/nodes/RustModuleNode.ts +84 -0
  651. package/src/core/nodes/RustStructNode.ts +80 -0
  652. package/src/core/nodes/RustTraitNode.ts +82 -0
  653. package/src/core/nodes/ServiceLayerNode.ts +183 -0
  654. package/src/core/nodes/SocketIONode.ts +177 -0
  655. package/src/core/nodes/SocketNode.ts +206 -0
  656. package/src/core/nodes/TypeNode.ts +46 -3
  657. package/src/core/nodes/TypeParameterNode.ts +91 -0
  658. package/src/core/nodes/index.ts +57 -0
  659. package/src/index.ts +60 -4
  660. package/src/plugins/InfraAnalyzer.ts +208 -0
  661. package/src/plugins/analysis/DatabaseAnalyzer.ts +27 -17
  662. package/src/plugins/analysis/ExpressAnalyzer.ts +51 -38
  663. package/src/plugins/analysis/ExpressResponseAnalyzer.ts +15 -12
  664. package/src/plugins/analysis/ExpressRouteAnalyzer.ts +56 -56
  665. package/src/plugins/analysis/FetchAnalyzer.ts +42 -52
  666. package/src/plugins/analysis/IncrementalAnalysisPlugin.ts +3 -2
  667. package/src/plugins/analysis/JSASTAnalyzer.ts +391 -2304
  668. package/src/plugins/analysis/NestJSRouteAnalyzer.ts +241 -0
  669. package/src/plugins/analysis/ReactAnalyzer.ts +33 -1085
  670. package/src/plugins/analysis/RustAnalyzer.ts +112 -116
  671. package/src/plugins/analysis/SQLiteAnalyzer.ts +23 -9
  672. package/src/plugins/analysis/ServiceLayerAnalyzer.ts +32 -10
  673. package/src/plugins/analysis/SocketAnalyzer.ts +601 -0
  674. package/src/plugins/analysis/SocketIOAnalyzer.ts +25 -34
  675. package/src/plugins/analysis/SystemDbAnalyzer.ts +15 -12
  676. package/src/plugins/analysis/ast/CollisionResolver.ts +137 -0
  677. package/src/plugins/analysis/ast/FunctionBodyContext.ts +291 -0
  678. package/src/plugins/analysis/ast/GraphBuilder.ts +274 -3180
  679. package/src/plugins/analysis/ast/IdGenerator.ts +81 -1
  680. package/src/plugins/analysis/ast/builders/AssignmentBuilder.ts +407 -0
  681. package/src/plugins/analysis/ast/builders/CallFlowBuilder.ts +255 -0
  682. package/src/plugins/analysis/ast/builders/ControlFlowBuilder.ts +470 -0
  683. package/src/plugins/analysis/ast/builders/CoreBuilder.ts +306 -0
  684. package/src/plugins/analysis/ast/builders/ModuleRuntimeBuilder.ts +452 -0
  685. package/src/plugins/analysis/ast/builders/MutationBuilder.ts +372 -0
  686. package/src/plugins/analysis/ast/builders/ReturnBuilder.ts +279 -0
  687. package/src/plugins/analysis/ast/builders/TypeSystemBuilder.ts +475 -0
  688. package/src/plugins/analysis/ast/builders/UpdateExpressionBuilder.ts +262 -0
  689. package/src/plugins/analysis/ast/builders/YieldBuilder.ts +287 -0
  690. package/src/plugins/analysis/ast/builders/index.ts +11 -0
  691. package/src/plugins/analysis/ast/builders/types.ts +65 -0
  692. package/src/plugins/analysis/ast/handlers/AnalyzerDelegate.ts +183 -0
  693. package/src/plugins/analysis/ast/handlers/BranchHandler.ts +313 -0
  694. package/src/plugins/analysis/ast/handlers/CallExpressionHandler.ts +347 -0
  695. package/src/plugins/analysis/ast/handlers/FunctionBodyHandler.ts +24 -0
  696. package/src/plugins/analysis/ast/handlers/LoopHandler.ts +240 -0
  697. package/src/plugins/analysis/ast/handlers/NestedFunctionHandler.ts +201 -0
  698. package/src/plugins/analysis/ast/handlers/NewExpressionHandler.ts +159 -0
  699. package/src/plugins/analysis/ast/handlers/PropertyAccessHandler.ts +112 -0
  700. package/src/plugins/analysis/ast/handlers/ReturnYieldHandler.ts +166 -0
  701. package/src/plugins/analysis/ast/handlers/ThrowHandler.ts +101 -0
  702. package/src/plugins/analysis/ast/handlers/TryCatchHandler.ts +262 -0
  703. package/src/plugins/analysis/ast/handlers/VariableHandler.ts +93 -0
  704. package/src/plugins/analysis/ast/handlers/index.ts +12 -0
  705. package/src/plugins/analysis/ast/types.ts +68 -9
  706. package/src/plugins/analysis/ast/utils/createParameterNodes.ts +118 -13
  707. package/src/plugins/analysis/ast/utils/extractNamesFromPattern.ts +166 -0
  708. package/src/plugins/analysis/ast/utils/getExpressionValue.ts +34 -0
  709. package/src/plugins/analysis/ast/utils/getMemberExpressionName.ts +33 -0
  710. package/src/plugins/analysis/ast/utils/index.ts +2 -0
  711. package/src/plugins/analysis/ast/visitors/ArgumentExtractor.ts +307 -0
  712. package/src/plugins/analysis/ast/visitors/ArrayElementExtractor.ts +172 -0
  713. package/src/plugins/analysis/ast/visitors/CallExpressionVisitor.ts +425 -1374
  714. package/src/plugins/analysis/ast/visitors/ClassVisitor.ts +43 -12
  715. package/src/plugins/analysis/ast/visitors/FunctionVisitor.ts +39 -8
  716. package/src/plugins/analysis/ast/visitors/MutationDetector.ts +211 -0
  717. package/src/plugins/analysis/ast/visitors/ObjectPropertyExtractor.ts +217 -0
  718. package/src/plugins/analysis/ast/visitors/PropertyAccessVisitor.ts +69 -4
  719. package/src/plugins/analysis/ast/visitors/TypeScriptVisitor.ts +232 -13
  720. package/src/plugins/analysis/ast/visitors/VariableVisitor.ts +8 -11
  721. package/src/plugins/analysis/ast/visitors/call-expression-helpers.ts +65 -0
  722. package/src/plugins/analysis/ast/visitors/call-expression-types.ts +179 -0
  723. package/src/plugins/analysis/react-internal/browser-api.ts +168 -0
  724. package/src/plugins/analysis/react-internal/hooks.ts +517 -0
  725. package/src/plugins/analysis/react-internal/jsx.ts +279 -0
  726. package/src/plugins/analysis/react-internal/types.ts +183 -0
  727. package/src/plugins/discovery/MonorepoServiceDiscovery.ts +6 -14
  728. package/src/plugins/enrichment/AliasTracker.ts +3 -1
  729. package/src/plugins/enrichment/ArgumentParameterLinker.ts +3 -1
  730. package/src/plugins/enrichment/CallbackCallResolver.ts +398 -0
  731. package/src/plugins/enrichment/ClosureCaptureEnricher.ts +3 -1
  732. package/src/plugins/enrichment/ConfigRoutingMapBuilder.ts +67 -0
  733. package/src/plugins/enrichment/ExpressHandlerLinker.ts +3 -1
  734. package/src/plugins/enrichment/ExternalCallResolver.ts +5 -8
  735. package/src/plugins/enrichment/FunctionCallResolver.ts +6 -9
  736. package/src/plugins/enrichment/HTTPConnectionEnricher.ts +3 -1
  737. package/src/plugins/enrichment/ImportExportLinker.ts +5 -3
  738. package/src/plugins/enrichment/InstanceOfResolver.ts +3 -1
  739. package/src/plugins/enrichment/MethodCallResolver.ts +48 -659
  740. package/src/plugins/enrichment/MountPointResolver.ts +9 -2
  741. package/src/plugins/enrichment/NodejsBuiltinsResolver.ts +13 -18
  742. package/src/plugins/enrichment/PrefixEvaluator.ts +6 -2
  743. package/src/plugins/enrichment/RejectionPropagationEnricher.ts +3 -1
  744. package/src/plugins/enrichment/RustFFIEnricher.ts +3 -1
  745. package/src/plugins/enrichment/ServiceConnectionEnricher.ts +472 -0
  746. package/src/plugins/enrichment/SocketConnectionEnricher.ts +228 -0
  747. package/src/plugins/enrichment/ValueDomainAnalyzer.ts +3 -1
  748. package/src/plugins/enrichment/method-call/MethodCallData.ts +299 -0
  749. package/src/plugins/enrichment/method-call/MethodCallDetectors.ts +70 -0
  750. package/src/plugins/enrichment/method-call/MethodCallErrorAnalysis.ts +131 -0
  751. package/src/plugins/enrichment/method-call/MethodCallIndexers.ts +83 -0
  752. package/src/plugins/enrichment/method-call/MethodCallResolution.ts +181 -0
  753. package/src/plugins/indexing/IncrementalModuleIndexer.ts +5 -10
  754. package/src/plugins/indexing/JSModuleIndexer.ts +17 -21
  755. package/src/plugins/indexing/RustModuleIndexer.ts +14 -13
  756. package/src/plugins/validation/AwaitInLoopValidator.ts +91 -0
  757. package/src/plugins/validation/PackageCoverageValidator.ts +181 -0
  758. package/src/plugins/validation/UnconnectedRouteValidator.ts +93 -0
  759. package/src/queries/NodeContext.ts +277 -0
  760. package/src/queries/findCallsInFunction.ts +11 -2
  761. package/src/queries/findContainingFunction.ts +14 -3
  762. package/src/queries/index.ts +13 -0
  763. package/src/resources/InfraResourceMapImpl.ts +119 -0
  764. package/src/resources/RoutingMapImpl.ts +133 -0
  765. package/src/storage/backends/RFDBServerBackend.ts +106 -77
  766. package/src/utils/findRfdbBinary.ts +22 -7
  767. package/src/utils/moduleResolution.ts +28 -1
  768. package/src/utils/resolveNodeFile.ts +18 -0
  769. package/src/version.ts +28 -0
@@ -0,0 +1,101 @@
1
+ /**
2
+ * ThrowHandler — handles ThrowStatement nodes.
3
+ *
4
+ * Mechanical extraction from analyzeFunctionBody() (REG-422).
5
+ * Original source: JSASTAnalyzer.ts lines ~3908-3985.
6
+ */
7
+ import type { Visitor, NodePath } from '@babel/traverse';
8
+ import * as t from '@babel/types';
9
+ import { getLine, getColumn } from '../utils/location.js';
10
+ import { FunctionBodyHandler } from './FunctionBodyHandler.js';
11
+
12
+ export class ThrowHandler extends FunctionBodyHandler {
13
+ getHandlers(): Visitor {
14
+ const ctx = this.ctx;
15
+ const analyzer = this.analyzer;
16
+
17
+ return {
18
+ // Phase 6 (REG-267): Track throw statements for control flow metadata
19
+ // REG-311: Detect async_throw rejection patterns
20
+ // REG-286: Detect sync_throw patterns for ALL functions (THROWS edges)
21
+ ThrowStatement: (throwPath: NodePath<t.ThrowStatement>) => {
22
+ // Skip if this throw is inside a nested function (not the function we're analyzing)
23
+ let parent: NodePath | null = throwPath.parentPath;
24
+ while (parent) {
25
+ if (t.isFunction(parent.node) && parent.node !== ctx.funcNode) {
26
+ // This throw is inside a nested function - skip it
27
+ return;
28
+ }
29
+ parent = parent.parentPath;
30
+ }
31
+
32
+ ctx.controlFlowState.hasThrow = true;
33
+
34
+ // REG-286: Track throw patterns for ALL functions (sync and async)
35
+ // Async throws -> REJECTS edges, sync throws -> THROWS edges
36
+ const isAsyncFunction = ctx.functionNode?.async === true;
37
+ if (ctx.currentFunctionId && ctx.functionNode && ctx.functionPath) {
38
+ const throwNode = throwPath.node;
39
+ const arg = throwNode.argument;
40
+ const throwLine = getLine(throwNode);
41
+ const throwColumn = getColumn(throwNode);
42
+
43
+ // Case 1: throw new Error() or throw new CustomError()
44
+ if (arg && t.isNewExpression(arg) && t.isIdentifier(arg.callee)) {
45
+ ctx.rejectionPatterns.push({
46
+ functionId: ctx.currentFunctionId,
47
+ errorClassName: arg.callee.name,
48
+ rejectionType: isAsyncFunction ? 'async_throw' : 'sync_throw',
49
+ isAsync: isAsyncFunction,
50
+ file: ctx.module.file,
51
+ line: throwLine,
52
+ column: throwColumn
53
+ });
54
+ }
55
+ // Case 2: throw identifier - needs micro-trace
56
+ else if (arg && t.isIdentifier(arg)) {
57
+ const varName = arg.name;
58
+
59
+ // Check if it's a parameter
60
+ const isParameter = ctx.functionNode.params.some(param =>
61
+ t.isIdentifier(param) && param.name === varName
62
+ );
63
+
64
+ if (isParameter) {
65
+ // Parameter forwarding - can't resolve statically
66
+ ctx.rejectionPatterns.push({
67
+ functionId: ctx.currentFunctionId,
68
+ errorClassName: null,
69
+ rejectionType: 'variable_parameter',
70
+ isAsync: isAsyncFunction,
71
+ file: ctx.module.file,
72
+ line: throwLine,
73
+ column: throwColumn,
74
+ sourceVariableName: varName
75
+ });
76
+ } else {
77
+ // Try micro-trace
78
+ const { errorClassName, tracePath } = analyzer.microTraceToErrorClass(
79
+ varName,
80
+ ctx.functionPath,
81
+ ctx.variableDeclarations
82
+ );
83
+
84
+ ctx.rejectionPatterns.push({
85
+ functionId: ctx.currentFunctionId,
86
+ errorClassName,
87
+ rejectionType: errorClassName ? 'variable_traced' : 'variable_unknown',
88
+ isAsync: isAsyncFunction,
89
+ file: ctx.module.file,
90
+ line: throwLine,
91
+ column: throwColumn,
92
+ sourceVariableName: varName,
93
+ tracePath
94
+ });
95
+ }
96
+ }
97
+ }
98
+ },
99
+ };
100
+ }
101
+ }
@@ -0,0 +1,262 @@
1
+ /**
2
+ * TryCatchHandler -- handles try/catch/finally control flow nodes.
3
+ *
4
+ * Inlines the createTryStatementHandler and createCatchClauseHandler logic
5
+ * from JSASTAnalyzer (REG-422).
6
+ */
7
+ import type { Visitor, NodePath } from '@babel/traverse';
8
+ import * as t from '@babel/types';
9
+ import { getLine, getColumn } from '../utils/location.js';
10
+ import { computeSemanticId } from '../../../../core/SemanticId.js';
11
+ import { FunctionBodyHandler } from './FunctionBodyHandler.js';
12
+
13
+ export class TryCatchHandler extends FunctionBodyHandler {
14
+ getHandlers(): Visitor {
15
+ return {
16
+ TryStatement: this.createTryStatementVisitor(),
17
+ CatchClause: this.createCatchClauseVisitor(),
18
+ };
19
+ }
20
+
21
+ private createTryStatementVisitor(): {
22
+ enter: (tryPath: NodePath<t.TryStatement>) => void;
23
+ exit: (tryPath: NodePath<t.TryStatement>) => void;
24
+ } {
25
+ const ctx = this.ctx;
26
+ const analyzer = this.analyzer;
27
+
28
+ return {
29
+ enter: (tryPath: NodePath<t.TryStatement>) => {
30
+ const tryNode = tryPath.node;
31
+
32
+ // Phase 6 (REG-267): Mark that this function has try/catch
33
+ if (ctx.controlFlowState) {
34
+ ctx.controlFlowState.hasTryCatch = true;
35
+ // REG-311: Increment try block depth for O(1) isInsideTry detection
36
+ ctx.controlFlowState.tryBlockDepth++;
37
+ }
38
+
39
+ // Determine actual parent - use stack for nested structures, otherwise original parentScopeId
40
+ const actualParentScopeId = (ctx.scopeIdStack && ctx.scopeIdStack.length > 0)
41
+ ? ctx.scopeIdStack[ctx.scopeIdStack.length - 1]
42
+ : ctx.parentScopeId;
43
+
44
+ // 1. Create TRY_BLOCK node
45
+ const tryBlockCounter = ctx.tryBlockCounterRef.value++;
46
+ const legacyTryBlockId = `${ctx.module.file}:TRY_BLOCK:${getLine(tryNode)}:${tryBlockCounter}`;
47
+ const tryBlockId = ctx.scopeTracker
48
+ ? computeSemanticId('TRY_BLOCK', 'try', ctx.scopeTracker.getContext(), { discriminator: tryBlockCounter })
49
+ : legacyTryBlockId;
50
+
51
+ ctx.tryBlocks.push({
52
+ id: tryBlockId,
53
+ semanticId: tryBlockId,
54
+ type: 'TRY_BLOCK',
55
+ file: ctx.module.file,
56
+ line: getLine(tryNode),
57
+ column: getColumn(tryNode),
58
+ parentScopeId: actualParentScopeId
59
+ });
60
+
61
+ // 2. Create try-body SCOPE (backward compatibility)
62
+ // Parent is now TRY_BLOCK, not original parentScopeId
63
+ const tryScopeId = `SCOPE#try-block#${ctx.module.file}#${getLine(tryNode)}:${ctx.scopeCounterRef.value++}`;
64
+ const trySemanticId = analyzer.generateSemanticId('try-block', ctx.scopeTracker);
65
+ ctx.scopes.push({
66
+ id: tryScopeId,
67
+ type: 'SCOPE',
68
+ scopeType: 'try-block',
69
+ semanticId: trySemanticId,
70
+ file: ctx.module.file,
71
+ line: getLine(tryNode),
72
+ parentScopeId: tryBlockId // Parent is TRY_BLOCK
73
+ });
74
+
75
+ // 3. Create CATCH_BLOCK and catch-body SCOPE if handler exists
76
+ let catchBlockId: string | null = null;
77
+ let catchScopeId: string | null = null;
78
+ if (tryNode.handler) {
79
+ const catchClause = tryNode.handler;
80
+ const catchBlockCounter = ctx.catchBlockCounterRef.value++;
81
+ const legacyCatchBlockId = `${ctx.module.file}:CATCH_BLOCK:${getLine(catchClause)}:${catchBlockCounter}`;
82
+ catchBlockId = ctx.scopeTracker
83
+ ? computeSemanticId('CATCH_BLOCK', 'catch', ctx.scopeTracker.getContext(), { discriminator: catchBlockCounter })
84
+ : legacyCatchBlockId;
85
+
86
+ // Extract parameter name if present
87
+ let parameterName: string | undefined;
88
+ if (catchClause.param && t.isIdentifier(catchClause.param)) {
89
+ parameterName = catchClause.param.name;
90
+ }
91
+
92
+ ctx.catchBlocks.push({
93
+ id: catchBlockId,
94
+ semanticId: catchBlockId,
95
+ type: 'CATCH_BLOCK',
96
+ file: ctx.module.file,
97
+ line: getLine(catchClause),
98
+ column: getColumn(catchClause),
99
+ parentScopeId: ctx.parentScopeId,
100
+ parentTryBlockId: tryBlockId,
101
+ parameterName
102
+ });
103
+
104
+ // Create catch-body SCOPE (backward compatibility)
105
+ catchScopeId = `SCOPE#catch-block#${ctx.module.file}#${getLine(catchClause)}:${ctx.scopeCounterRef.value++}`;
106
+ const catchSemanticId = analyzer.generateSemanticId('catch-block', ctx.scopeTracker);
107
+ ctx.scopes.push({
108
+ id: catchScopeId,
109
+ type: 'SCOPE',
110
+ scopeType: 'catch-block',
111
+ semanticId: catchSemanticId,
112
+ file: ctx.module.file,
113
+ line: getLine(catchClause),
114
+ parentScopeId: catchBlockId // Parent is CATCH_BLOCK
115
+ });
116
+ }
117
+
118
+ // 4. Create FINALLY_BLOCK and finally-body SCOPE if finalizer exists
119
+ let finallyBlockId: string | null = null;
120
+ let finallyScopeId: string | null = null;
121
+ if (tryNode.finalizer) {
122
+ const finallyBlockCounter = ctx.finallyBlockCounterRef.value++;
123
+ const legacyFinallyBlockId = `${ctx.module.file}:FINALLY_BLOCK:${getLine(tryNode.finalizer)}:${finallyBlockCounter}`;
124
+ finallyBlockId = ctx.scopeTracker
125
+ ? computeSemanticId('FINALLY_BLOCK', 'finally', ctx.scopeTracker.getContext(), { discriminator: finallyBlockCounter })
126
+ : legacyFinallyBlockId;
127
+
128
+ ctx.finallyBlocks.push({
129
+ id: finallyBlockId,
130
+ semanticId: finallyBlockId,
131
+ type: 'FINALLY_BLOCK',
132
+ file: ctx.module.file,
133
+ line: getLine(tryNode.finalizer),
134
+ column: getColumn(tryNode.finalizer),
135
+ parentScopeId: ctx.parentScopeId,
136
+ parentTryBlockId: tryBlockId
137
+ });
138
+
139
+ // Create finally-body SCOPE (backward compatibility)
140
+ finallyScopeId = `SCOPE#finally-block#${ctx.module.file}#${getLine(tryNode.finalizer)}:${ctx.scopeCounterRef.value++}`;
141
+ const finallySemanticId = analyzer.generateSemanticId('finally-block', ctx.scopeTracker);
142
+ ctx.scopes.push({
143
+ id: finallyScopeId,
144
+ type: 'SCOPE',
145
+ scopeType: 'finally-block',
146
+ semanticId: finallySemanticId,
147
+ file: ctx.module.file,
148
+ line: getLine(tryNode.finalizer),
149
+ parentScopeId: finallyBlockId // Parent is FINALLY_BLOCK
150
+ });
151
+ }
152
+
153
+ // 5. Push try scope onto stack for CONTAINS edges
154
+ if (ctx.scopeIdStack) {
155
+ ctx.scopeIdStack.push(tryScopeId);
156
+ }
157
+
158
+ // Enter try scope for semantic ID generation
159
+ if (ctx.scopeTracker) {
160
+ ctx.scopeTracker.enterCountedScope('try');
161
+ }
162
+
163
+ // 6. Store scope info for catch/finally transitions
164
+ ctx.tryScopeMap.set(tryNode, {
165
+ tryScopeId,
166
+ catchScopeId,
167
+ finallyScopeId,
168
+ currentBlock: 'try',
169
+ tryBlockId,
170
+ catchBlockId,
171
+ finallyBlockId
172
+ });
173
+ },
174
+ exit: (tryPath: NodePath<t.TryStatement>) => {
175
+ const tryNode = tryPath.node;
176
+ const _scopeInfo = ctx.tryScopeMap.get(tryNode);
177
+
178
+ // REG-311: Only decrement try block depth if we're still in 'try' block
179
+ // (not transitioned to catch/finally, where we already decremented)
180
+ if (ctx.controlFlowState && _scopeInfo?.currentBlock === 'try') {
181
+ ctx.controlFlowState.tryBlockDepth--;
182
+ }
183
+
184
+ // Pop the current scope from stack (could be try, catch, or finally)
185
+ if (ctx.scopeIdStack) {
186
+ ctx.scopeIdStack.pop();
187
+ }
188
+
189
+ // Exit the current scope
190
+ if (ctx.scopeTracker) {
191
+ ctx.scopeTracker.exitScope();
192
+ }
193
+
194
+ // Clean up
195
+ ctx.tryScopeMap.delete(tryNode);
196
+ }
197
+ };
198
+ }
199
+
200
+ private createCatchClauseVisitor(): {
201
+ enter: (catchPath: NodePath<t.CatchClause>) => void;
202
+ } {
203
+ const ctx = this.ctx;
204
+ const analyzer = this.analyzer;
205
+
206
+ return {
207
+ enter: (catchPath: NodePath<t.CatchClause>) => {
208
+ const catchNode = catchPath.node;
209
+ const parent = catchPath.parent;
210
+
211
+ if (!t.isTryStatement(parent)) return;
212
+
213
+ const scopeInfo = ctx.tryScopeMap.get(parent);
214
+ if (!scopeInfo || !scopeInfo.catchScopeId) return;
215
+
216
+ // Transition from try scope to catch scope
217
+ if (scopeInfo.currentBlock === 'try') {
218
+ // Pop try scope, push catch scope
219
+ if (ctx.scopeIdStack) {
220
+ ctx.scopeIdStack.pop();
221
+ ctx.scopeIdStack.push(scopeInfo.catchScopeId);
222
+ }
223
+
224
+ // Exit try scope, enter catch scope for semantic ID
225
+ if (ctx.scopeTracker) {
226
+ ctx.scopeTracker.exitScope();
227
+ ctx.scopeTracker.enterCountedScope('catch');
228
+ }
229
+
230
+ // REG-311: Decrement tryBlockDepth when leaving try block for catch
231
+ // Calls in catch block should NOT have isInsideTry=true
232
+ if (ctx.controlFlowState) {
233
+ ctx.controlFlowState.tryBlockDepth--;
234
+ }
235
+
236
+ scopeInfo.currentBlock = 'catch';
237
+ }
238
+
239
+ // Handle catch parameter (e.g., catch (e) or catch ({ message }))
240
+ if (catchNode.param) {
241
+ const errorVarInfo = analyzer.extractVariableNamesFromPattern(catchNode.param);
242
+
243
+ errorVarInfo.forEach(varInfo => {
244
+ const legacyId = `VARIABLE#${varInfo.name}#${ctx.module.file}#${varInfo.loc.start.line}:${varInfo.loc.start.column}:${ctx.varDeclCounterRef.value++}`;
245
+ const varId = ctx.scopeTracker
246
+ ? computeSemanticId('VARIABLE', varInfo.name, ctx.scopeTracker.getContext())
247
+ : legacyId;
248
+
249
+ ctx.variableDeclarations.push({
250
+ id: varId,
251
+ type: 'VARIABLE',
252
+ name: varInfo.name,
253
+ file: ctx.module.file,
254
+ line: varInfo.loc.start.line,
255
+ parentScopeId: scopeInfo.catchScopeId!
256
+ });
257
+ });
258
+ }
259
+ }
260
+ };
261
+ }
262
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * VariableHandler — handles VariableDeclaration and AssignmentExpression nodes.
3
+ *
4
+ * Mechanical extraction from analyzeFunctionBody() (REG-422).
5
+ * Original source: JSASTAnalyzer.ts lines ~3765-3833.
6
+ */
7
+ import type { Visitor, NodePath } from '@babel/traverse';
8
+ import * as t from '@babel/types';
9
+ import type {
10
+ ArrayMutationInfo,
11
+ ObjectMutationInfo,
12
+ VariableReassignmentInfo,
13
+ } from '../types.js';
14
+ import { FunctionBodyHandler } from './FunctionBodyHandler.js';
15
+
16
+ export class VariableHandler extends FunctionBodyHandler {
17
+ getHandlers(): Visitor {
18
+ const ctx = this.ctx;
19
+ const analyzer = this.analyzer;
20
+
21
+ return {
22
+ VariableDeclaration: (varPath: NodePath<t.VariableDeclaration>) => {
23
+ analyzer.handleVariableDeclaration(
24
+ varPath,
25
+ ctx.getCurrentScopeId(),
26
+ ctx.module,
27
+ ctx.variableDeclarations,
28
+ ctx.classInstantiations,
29
+ ctx.literals,
30
+ ctx.variableAssignments,
31
+ ctx.varDeclCounterRef,
32
+ ctx.literalCounterRef,
33
+ ctx.scopeTracker,
34
+ ctx.parentScopeVariables,
35
+ ctx.objectLiterals,
36
+ ctx.objectProperties,
37
+ ctx.objectLiteralCounterRef
38
+ );
39
+
40
+ // REG-416: Track parameter aliases for HOF detection
41
+ // When `const f = fn` where fn is a parameter, map f -> param index.
42
+ if (ctx.paramNameToIndex.size > 0) {
43
+ for (const declarator of varPath.node.declarations) {
44
+ if (t.isIdentifier(declarator.id) && t.isIdentifier(declarator.init)) {
45
+ const initName = declarator.init.name;
46
+ const paramIndex = ctx.paramNameToIndex.get(initName) ?? ctx.aliasToParamIndex.get(initName);
47
+ if (paramIndex !== undefined) {
48
+ ctx.aliasToParamIndex.set(declarator.id.name, paramIndex);
49
+ }
50
+ }
51
+ }
52
+ }
53
+ },
54
+
55
+ // Detect indexed array assignments: arr[i] = value
56
+ AssignmentExpression: (assignPath: NodePath<t.AssignmentExpression>) => {
57
+ const assignNode = assignPath.node;
58
+
59
+ // === VARIABLE REASSIGNMENT (REG-290) ===
60
+ // Check if LHS is simple identifier (not obj.prop, not arr[i])
61
+ // Must be checked FIRST before array/object mutation handlers
62
+ if (assignNode.left.type === 'Identifier') {
63
+ // Initialize collection if not exists
64
+ if (!ctx.collections.variableReassignments) {
65
+ ctx.collections.variableReassignments = [];
66
+ }
67
+ const variableReassignments = ctx.collections.variableReassignments as VariableReassignmentInfo[];
68
+
69
+ analyzer.detectVariableReassignment(assignNode, ctx.module, variableReassignments, ctx.scopeTracker);
70
+ }
71
+ // === END VARIABLE REASSIGNMENT ===
72
+
73
+ // Initialize collection if not exists
74
+ if (!ctx.collections.arrayMutations) {
75
+ ctx.collections.arrayMutations = [];
76
+ }
77
+ const arrayMutations = ctx.collections.arrayMutations as ArrayMutationInfo[];
78
+
79
+ // Check for indexed array assignment: arr[i] = value
80
+ analyzer.detectIndexedArrayAssignment(assignNode, ctx.module, arrayMutations, ctx.scopeTracker, ctx.collections);
81
+
82
+ // Initialize object mutations collection if not exists
83
+ if (!ctx.collections.objectMutations) {
84
+ ctx.collections.objectMutations = [];
85
+ }
86
+ const objectMutations = ctx.collections.objectMutations as ObjectMutationInfo[];
87
+
88
+ // Check for object property assignment: obj.prop = value
89
+ analyzer.detectObjectPropertyAssignment(assignNode, ctx.module, objectMutations, ctx.scopeTracker);
90
+ },
91
+ };
92
+ }
93
+ }
@@ -0,0 +1,12 @@
1
+ export type { AnalyzerDelegate } from './AnalyzerDelegate.js';
2
+ export { FunctionBodyHandler } from './FunctionBodyHandler.js';
3
+ export { ReturnYieldHandler } from './ReturnYieldHandler.js';
4
+ export { ThrowHandler } from './ThrowHandler.js';
5
+ export { VariableHandler } from './VariableHandler.js';
6
+ export { NestedFunctionHandler } from './NestedFunctionHandler.js';
7
+ export { PropertyAccessHandler } from './PropertyAccessHandler.js';
8
+ export { NewExpressionHandler } from './NewExpressionHandler.js';
9
+ export { CallExpressionHandler } from './CallExpressionHandler.js';
10
+ export { LoopHandler } from './LoopHandler.js';
11
+ export { TryCatchHandler } from './TryCatchHandler.js';
12
+ export { BranchHandler } from './BranchHandler.js';
@@ -31,10 +31,17 @@ export interface FunctionInfo {
31
31
  isCallback?: boolean;
32
32
  parentScopeId?: string;
33
33
  controlFlow?: ControlFlowMetadata;
34
+ // Class method fields (set by ClassVisitor)
35
+ isClassMethod?: boolean;
36
+ className?: string;
34
37
  // REG-271: Private methods support
35
38
  isPrivate?: boolean; // true for #privateMethod
36
39
  isStatic?: boolean; // true for static #method()
37
40
  methodKind?: 'constructor' | 'method' | 'get' | 'set';
41
+ // REG-401: Parameter invocation tracking for user-defined HOFs
42
+ invokesParamIndexes?: number[];
43
+ // REG-417: Destructured parameter invocation — property paths for OBJECT_LITERAL resolution
44
+ invokesParamBindings?: { paramIndex: number; propertyPath: string[] }[];
38
45
  }
39
46
 
40
47
  // === PARAMETER INFO ===
@@ -50,6 +57,10 @@ export interface ParameterInfo {
50
57
  isRest?: boolean; // Rest parameter (e.g., function(...args))
51
58
  functionId?: string; // Legacy field - prefer parentFunctionId
52
59
  parentFunctionId?: string;
60
+ scopePath?: string[];
61
+ // REG-399: Destructuring metadata
62
+ propertyPath?: string[]; // For nested object destructuring: ['data', 'user'] for ({ data: { user } })
63
+ arrayIndex?: number; // For array destructuring: 0 for first element in ([first, second])
53
64
  }
54
65
 
55
66
  // === SCOPE INFO ===
@@ -197,6 +208,8 @@ export interface ControlFlowMetadata {
197
208
  canReject?: boolean; // True if function can reject (has rejection patterns)
198
209
  hasAsyncThrow?: boolean; // True if async function has throw statements
199
210
  rejectedBuiltinErrors?: string[]; // List of builtin error class names this function can reject
211
+ // REG-286: Sync throw tracking
212
+ thrownBuiltinErrors?: string[]; // List of builtin error class names this function can throw
200
213
  }
201
214
 
202
215
  // === VARIABLE DECLARATION INFO ===
@@ -210,6 +223,7 @@ export interface VariableDeclarationInfo {
210
223
  column?: number;
211
224
  value?: unknown;
212
225
  parentScopeId?: string;
226
+ scopePath?: string[];
213
227
  // REG-271: Private fields support
214
228
  isPrivate?: boolean; // true for #privateField
215
229
  isStatic?: boolean; // true for static #field
@@ -261,6 +275,8 @@ export interface CallSiteInfo {
261
275
  isAwaited?: boolean;
262
276
  /** REG-311: true if inside try block (protected from propagation) */
263
277
  isInsideTry?: boolean;
278
+ /** REG-298: true if awaited call is inside a loop body */
279
+ isInsideLoop?: boolean;
264
280
  }
265
281
 
266
282
  // === METHOD CALL INFO ===
@@ -285,6 +301,8 @@ export interface MethodCallInfo {
285
301
  isAwaited?: boolean;
286
302
  /** REG-311: true if inside try block (protected from propagation) */
287
303
  isInsideTry?: boolean;
304
+ /** REG-298: true if awaited call is inside a loop body */
305
+ isInsideLoop?: boolean;
288
306
  /** REG-311: true if this is a method call (for CALL node filtering) */
289
307
  isMethodCall?: boolean;
290
308
  }
@@ -377,6 +395,18 @@ export interface TypeAliasInfo {
377
395
  line: number;
378
396
  column?: number;
379
397
  aliasOf?: string; // строковое представление типа
398
+ mappedType?: boolean;
399
+ keyName?: string;
400
+ keyConstraint?: string;
401
+ valueType?: string;
402
+ mappedReadonly?: boolean | '+' | '-';
403
+ mappedOptional?: boolean | '+' | '-';
404
+ nameType?: string;
405
+ conditionalType?: boolean;
406
+ checkType?: string;
407
+ extendsType?: string;
408
+ trueType?: string;
409
+ falseType?: string;
380
410
  }
381
411
 
382
412
  // === ENUM DECLARATION INFO ===
@@ -415,6 +445,19 @@ export interface DecoratorInfo {
415
445
  targetType: 'CLASS' | 'METHOD' | 'PROPERTY' | 'PARAMETER';
416
446
  }
417
447
 
448
+ // === TYPE PARAMETER INFO ===
449
+ export interface TypeParameterInfo {
450
+ name: string; // "T", "K", "V"
451
+ constraintType?: string; // "Serializable" (string repr via typeNodeToString)
452
+ defaultType?: string; // "string" (string repr via typeNodeToString)
453
+ variance?: 'in' | 'out' | 'in out';
454
+ parentId: string; // ID of owning function/class/interface/type
455
+ parentType: 'FUNCTION' | 'CLASS' | 'INTERFACE' | 'TYPE';
456
+ file: string;
457
+ line: number;
458
+ column: number;
459
+ }
460
+
418
461
  // === METHOD CALLBACK INFO ===
419
462
  export interface MethodCallbackInfo {
420
463
  methodCallId: string;
@@ -442,6 +485,10 @@ export interface CallArgumentInfo {
442
485
  functionColumn?: number;
443
486
  nestedCallLine?: number;
444
487
  nestedCallColumn?: number;
488
+ // REG-402: MemberExpression argument fields for this.method callback resolution
489
+ objectName?: string;
490
+ propertyName?: string;
491
+ enclosingClassName?: string;
445
492
  }
446
493
 
447
494
  // === IMPORT INFO ===
@@ -967,18 +1014,23 @@ export interface PromiseResolutionInfo {
967
1014
  line: number;
968
1015
  }
969
1016
 
970
- // === REJECTION PATTERN INFO (REG-311) ===
1017
+ // === REJECTION PATTERN INFO (REG-311, REG-286) ===
971
1018
  /**
972
- * Tracks patterns that can cause Promise rejection in a function.
973
- * Used for REJECTS edge creation and error flow analysis.
1019
+ * Tracks patterns that can cause errors (throws or Promise rejections) in a function.
1020
+ * Used for THROWS/REJECTS edge creation and error flow analysis.
974
1021
  *
975
1022
  * Patterns detected:
976
1023
  * - promise_reject: Promise.reject(new Error())
977
1024
  * - executor_reject: reject(new Error()) in Promise executor
978
1025
  * - async_throw: throw new Error() in async function
979
- * - variable_traced: reject(err) where err traced to NewExpression
980
- * - variable_parameter: reject(param) where param is function parameter
981
- * - variable_unknown: reject(x) where x couldn't be traced
1026
+ * - sync_throw: throw new Error() in non-async function (REG-286)
1027
+ * - variable_traced: throw/reject(err) where err traced to NewExpression
1028
+ * - variable_parameter: throw/reject(param) where param is function parameter
1029
+ * - variable_unknown: throw/reject(x) where x couldn't be traced
1030
+ *
1031
+ * Edge type selection:
1032
+ * - isAsync=true patterns → REJECTS edge (async errors caught by .catch())
1033
+ * - isAsync=false patterns → THROWS edge (sync errors caught by try/catch)
982
1034
  */
983
1035
  export interface RejectionPatternInfo {
984
1036
  /** ID of the containing FUNCTION node */
@@ -990,9 +1042,12 @@ export interface RejectionPatternInfo {
990
1042
  | 'promise_reject' // Promise.reject(new Error())
991
1043
  | 'executor_reject' // reject(new Error()) in Promise executor
992
1044
  | 'async_throw' // throw new Error() in async function
993
- | 'variable_traced' // reject(err) where err traced to NewExpression
994
- | 'variable_parameter' // reject(param) where param is function parameter
995
- | 'variable_unknown'; // reject(x) where x couldn't be traced
1045
+ | 'sync_throw' // throw new Error() in non-async function (REG-286)
1046
+ | 'variable_traced' // throw/reject(err) where err traced to NewExpression
1047
+ | 'variable_parameter' // throw/reject(param) where param is function parameter
1048
+ | 'variable_unknown'; // throw/reject(x) where x couldn't be traced
1049
+ /** Whether the containing function is async (determines THROWS vs REJECTS edge) */
1050
+ isAsync: boolean;
996
1051
  /** File path */
997
1052
  file: string;
998
1053
  /** Line number of rejection call */
@@ -1105,11 +1160,15 @@ export interface ASTCollections {
1105
1160
  catchesFromInfos?: CatchesFromInfo[];
1106
1161
  // Property access tracking for PROPERTY_ACCESS nodes (REG-395)
1107
1162
  propertyAccesses?: PropertyAccessInfo[];
1163
+ // REG-297: Top-level await tracking
1164
+ hasTopLevelAwait?: boolean;
1108
1165
  // TypeScript-specific collections
1109
1166
  interfaces?: InterfaceDeclarationInfo[];
1110
1167
  typeAliases?: TypeAliasInfo[];
1111
1168
  enums?: EnumDeclarationInfo[];
1112
1169
  decorators?: DecoratorInfo[];
1170
+ // Type parameter tracking for generics (REG-303)
1171
+ typeParameters?: TypeParameterInfo[];
1113
1172
  // Counter refs (used internally during collection)
1114
1173
  ifScopeCounterRef?: CounterRef;
1115
1174
  scopeCounterRef?: CounterRef;