@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.
- package/README.md +61 -23
- package/dist/DiscoveryManager.d.ts +59 -0
- package/dist/DiscoveryManager.d.ts.map +1 -0
- package/dist/DiscoveryManager.js +249 -0
- package/dist/DiscoveryManager.js.map +1 -0
- package/dist/GraphInitializer.d.ts +44 -0
- package/dist/GraphInitializer.d.ts.map +1 -0
- package/dist/GraphInitializer.js +121 -0
- package/dist/GraphInitializer.js.map +1 -0
- package/dist/GuaranteeChecker.d.ts +35 -0
- package/dist/GuaranteeChecker.d.ts.map +1 -0
- package/dist/GuaranteeChecker.js +81 -0
- package/dist/GuaranteeChecker.js.map +1 -0
- package/dist/Orchestrator.d.ts +34 -151
- package/dist/Orchestrator.d.ts.map +1 -1
- package/dist/Orchestrator.js +173 -741
- package/dist/Orchestrator.js.map +1 -1
- package/dist/OrchestratorTypes.d.ts +115 -0
- package/dist/OrchestratorTypes.d.ts.map +1 -0
- package/dist/OrchestratorTypes.js +6 -0
- package/dist/OrchestratorTypes.js.map +1 -0
- package/dist/ParallelAnalysisRunner.d.ts +43 -0
- package/dist/ParallelAnalysisRunner.d.ts.map +1 -0
- package/dist/ParallelAnalysisRunner.js +161 -0
- package/dist/ParallelAnalysisRunner.js.map +1 -0
- package/dist/PhaseRunner.d.ts +94 -0
- package/dist/PhaseRunner.d.ts.map +1 -0
- package/dist/PhaseRunner.js +332 -0
- package/dist/PhaseRunner.js.map +1 -0
- package/dist/config/ConfigLoader.d.ts +51 -1
- package/dist/config/ConfigLoader.d.ts.map +1 -1
- package/dist/config/ConfigLoader.js +121 -1
- package/dist/config/ConfigLoader.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/core/ASTWorker.d.ts +2 -0
- package/dist/core/ASTWorker.d.ts.map +1 -1
- package/dist/core/ASTWorker.js +6 -2
- package/dist/core/ASTWorker.js.map +1 -1
- package/dist/core/FileOverview.d.ts +124 -0
- package/dist/core/FileOverview.d.ts.map +1 -0
- package/dist/core/FileOverview.js +257 -0
- package/dist/core/FileOverview.js.map +1 -0
- package/dist/core/GraphFreshnessChecker.d.ts +1 -1
- package/dist/core/GraphFreshnessChecker.d.ts.map +1 -1
- package/dist/core/GraphFreshnessChecker.js +7 -5
- package/dist/core/GraphFreshnessChecker.js.map +1 -1
- package/dist/core/GuaranteeManager.d.ts +13 -0
- package/dist/core/GuaranteeManager.d.ts.map +1 -1
- package/dist/core/GuaranteeManager.js +63 -2
- package/dist/core/GuaranteeManager.js.map +1 -1
- package/dist/core/IncrementalReanalyzer.d.ts.map +1 -1
- package/dist/core/IncrementalReanalyzer.js +6 -3
- package/dist/core/IncrementalReanalyzer.js.map +1 -1
- package/dist/core/NodeFactory.d.ts +81 -415
- package/dist/core/NodeFactory.d.ts.map +1 -1
- package/dist/core/NodeFactory.js +139 -336
- package/dist/core/NodeFactory.js.map +1 -1
- package/dist/core/ResourceRegistry.d.ts +17 -0
- package/dist/core/ResourceRegistry.d.ts.map +1 -0
- package/dist/core/ResourceRegistry.js +32 -0
- package/dist/core/ResourceRegistry.js.map +1 -0
- package/dist/core/ScopeTracker.d.ts +12 -0
- package/dist/core/ScopeTracker.d.ts.map +1 -1
- package/dist/core/ScopeTracker.js +24 -0
- package/dist/core/ScopeTracker.js.map +1 -1
- package/dist/core/SemanticId.d.ts +69 -0
- package/dist/core/SemanticId.d.ts.map +1 -1
- package/dist/core/SemanticId.js +134 -0
- package/dist/core/SemanticId.js.map +1 -1
- package/dist/core/brandNodeInternal.d.ts +14 -0
- package/dist/core/brandNodeInternal.d.ts.map +1 -0
- package/dist/core/brandNodeInternal.js +4 -0
- package/dist/core/brandNodeInternal.js.map +1 -0
- package/dist/core/buildDependencyGraph.d.ts +36 -0
- package/dist/core/buildDependencyGraph.d.ts.map +1 -0
- package/dist/core/buildDependencyGraph.js +78 -0
- package/dist/core/buildDependencyGraph.js.map +1 -0
- package/dist/core/factories/CoreFactory.d.ts +223 -0
- package/dist/core/factories/CoreFactory.d.ts.map +1 -0
- package/dist/core/factories/CoreFactory.js +127 -0
- package/dist/core/factories/CoreFactory.js.map +1 -0
- package/dist/core/factories/DatabaseFactory.d.ts +29 -0
- package/dist/core/factories/DatabaseFactory.d.ts.map +1 -0
- package/dist/core/factories/DatabaseFactory.js +25 -0
- package/dist/core/factories/DatabaseFactory.js.map +1 -0
- package/dist/core/factories/ExternalFactory.d.ts +11 -0
- package/dist/core/factories/ExternalFactory.d.ts.map +1 -0
- package/dist/core/factories/ExternalFactory.js +16 -0
- package/dist/core/factories/ExternalFactory.js.map +1 -0
- package/dist/core/factories/HttpFactory.d.ts +22 -0
- package/dist/core/factories/HttpFactory.d.ts.map +1 -0
- package/dist/core/factories/HttpFactory.js +32 -0
- package/dist/core/factories/HttpFactory.js.map +1 -0
- package/dist/core/factories/ReactFactory.d.ts +14 -0
- package/dist/core/factories/ReactFactory.d.ts.map +1 -0
- package/dist/core/factories/ReactFactory.js +13 -0
- package/dist/core/factories/ReactFactory.js.map +1 -0
- package/dist/core/factories/RustFactory.d.ts +62 -0
- package/dist/core/factories/RustFactory.d.ts.map +1 -0
- package/dist/core/factories/RustFactory.js +32 -0
- package/dist/core/factories/RustFactory.js.map +1 -0
- package/dist/core/factories/ServiceFactory.d.ts +12 -0
- package/dist/core/factories/ServiceFactory.d.ts.map +1 -0
- package/dist/core/factories/ServiceFactory.js +22 -0
- package/dist/core/factories/ServiceFactory.js.map +1 -0
- package/dist/core/factories/SocketFactory.d.ts +31 -0
- package/dist/core/factories/SocketFactory.d.ts.map +1 -0
- package/dist/core/factories/SocketFactory.js +35 -0
- package/dist/core/factories/SocketFactory.js.map +1 -0
- package/dist/core/nodes/DatabaseNode.d.ts +85 -0
- package/dist/core/nodes/DatabaseNode.d.ts.map +1 -0
- package/dist/core/nodes/DatabaseNode.js +118 -0
- package/dist/core/nodes/DatabaseNode.js.map +1 -0
- package/dist/core/nodes/ExpressMiddlewareNode.d.ts +47 -0
- package/dist/core/nodes/ExpressMiddlewareNode.d.ts.map +1 -0
- package/dist/core/nodes/ExpressMiddlewareNode.js +63 -0
- package/dist/core/nodes/ExpressMiddlewareNode.js.map +1 -0
- package/dist/core/nodes/ExpressMountNode.d.ts +44 -0
- package/dist/core/nodes/ExpressMountNode.d.ts.map +1 -0
- package/dist/core/nodes/ExpressMountNode.js +61 -0
- package/dist/core/nodes/ExpressMountNode.js.map +1 -0
- package/dist/core/nodes/ExternalApiNode.d.ts +29 -0
- package/dist/core/nodes/ExternalApiNode.d.ts.map +1 -0
- package/dist/core/nodes/ExternalApiNode.js +41 -0
- package/dist/core/nodes/ExternalApiNode.js.map +1 -0
- package/dist/core/nodes/ExternalFunctionNode.d.ts +40 -0
- package/dist/core/nodes/ExternalFunctionNode.d.ts.map +1 -0
- package/dist/core/nodes/ExternalFunctionNode.js +54 -0
- package/dist/core/nodes/ExternalFunctionNode.js.map +1 -0
- package/dist/core/nodes/FetchRequestNode.d.ts +54 -0
- package/dist/core/nodes/FetchRequestNode.d.ts.map +1 -0
- package/dist/core/nodes/FetchRequestNode.js +67 -0
- package/dist/core/nodes/FetchRequestNode.js.map +1 -0
- package/dist/core/nodes/HttpRouteNode.d.ts +58 -0
- package/dist/core/nodes/HttpRouteNode.d.ts.map +1 -0
- package/dist/core/nodes/HttpRouteNode.js +72 -0
- package/dist/core/nodes/HttpRouteNode.js.map +1 -0
- package/dist/core/nodes/NodeKind.d.ts +1 -0
- package/dist/core/nodes/NodeKind.d.ts.map +1 -1
- package/dist/core/nodes/NodeKind.js +1 -0
- package/dist/core/nodes/NodeKind.js.map +1 -1
- package/dist/core/nodes/ReactNode.d.ts +53 -0
- package/dist/core/nodes/ReactNode.d.ts.map +1 -0
- package/dist/core/nodes/ReactNode.js +70 -0
- package/dist/core/nodes/ReactNode.js.map +1 -0
- package/dist/core/nodes/RustCallNode.d.ts +46 -0
- package/dist/core/nodes/RustCallNode.d.ts.map +1 -0
- package/dist/core/nodes/RustCallNode.js +62 -0
- package/dist/core/nodes/RustCallNode.js.map +1 -0
- package/dist/core/nodes/RustFunctionNode.d.ts +58 -0
- package/dist/core/nodes/RustFunctionNode.d.ts.map +1 -0
- package/dist/core/nodes/RustFunctionNode.js +67 -0
- package/dist/core/nodes/RustFunctionNode.js.map +1 -0
- package/dist/core/nodes/RustImplNode.d.ts +35 -0
- package/dist/core/nodes/RustImplNode.d.ts.map +1 -0
- package/dist/core/nodes/RustImplNode.js +55 -0
- package/dist/core/nodes/RustImplNode.js.map +1 -0
- package/dist/core/nodes/RustMethodNode.d.ts +64 -0
- package/dist/core/nodes/RustMethodNode.d.ts.map +1 -0
- package/dist/core/nodes/RustMethodNode.js +76 -0
- package/dist/core/nodes/RustMethodNode.js.map +1 -0
- package/dist/core/nodes/RustModuleNode.d.ts +40 -0
- package/dist/core/nodes/RustModuleNode.d.ts.map +1 -0
- package/dist/core/nodes/RustModuleNode.js +57 -0
- package/dist/core/nodes/RustModuleNode.js.map +1 -0
- package/dist/core/nodes/RustStructNode.d.ts +38 -0
- package/dist/core/nodes/RustStructNode.d.ts.map +1 -0
- package/dist/core/nodes/RustStructNode.js +54 -0
- package/dist/core/nodes/RustStructNode.js.map +1 -0
- package/dist/core/nodes/RustTraitNode.d.ts +40 -0
- package/dist/core/nodes/RustTraitNode.d.ts.map +1 -0
- package/dist/core/nodes/RustTraitNode.js +52 -0
- package/dist/core/nodes/RustTraitNode.js.map +1 -0
- package/dist/core/nodes/ServiceLayerNode.d.ts +85 -0
- package/dist/core/nodes/ServiceLayerNode.d.ts.map +1 -0
- package/dist/core/nodes/ServiceLayerNode.js +122 -0
- package/dist/core/nodes/ServiceLayerNode.js.map +1 -0
- package/dist/core/nodes/SocketIONode.d.ts +71 -0
- package/dist/core/nodes/SocketIONode.d.ts.map +1 -0
- package/dist/core/nodes/SocketIONode.js +111 -0
- package/dist/core/nodes/SocketIONode.js.map +1 -0
- package/dist/core/nodes/SocketNode.d.ts +87 -0
- package/dist/core/nodes/SocketNode.d.ts.map +1 -0
- package/dist/core/nodes/SocketNode.js +124 -0
- package/dist/core/nodes/SocketNode.js.map +1 -0
- package/dist/core/nodes/TypeNode.d.ts +26 -1
- package/dist/core/nodes/TypeNode.d.ts.map +1 -1
- package/dist/core/nodes/TypeNode.js +21 -3
- package/dist/core/nodes/TypeNode.js.map +1 -1
- package/dist/core/nodes/TypeParameterNode.d.ts +44 -0
- package/dist/core/nodes/TypeParameterNode.d.ts.map +1 -0
- package/dist/core/nodes/TypeParameterNode.js +64 -0
- package/dist/core/nodes/TypeParameterNode.js.map +1 -0
- package/dist/core/nodes/index.d.ts +19 -0
- package/dist/core/nodes/index.d.ts.map +1 -1
- package/dist/core/nodes/index.js +26 -0
- package/dist/core/nodes/index.js.map +1 -1
- package/dist/index.d.ts +33 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -3
- package/dist/index.js.map +1 -1
- package/dist/plugins/InfraAnalyzer.d.ts +110 -0
- package/dist/plugins/InfraAnalyzer.d.ts.map +1 -0
- package/dist/plugins/InfraAnalyzer.js +170 -0
- package/dist/plugins/InfraAnalyzer.js.map +1 -0
- package/dist/plugins/analysis/DatabaseAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/DatabaseAnalyzer.js +18 -15
- package/dist/plugins/analysis/DatabaseAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/ExpressAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/ExpressAnalyzer.js +27 -26
- package/dist/plugins/analysis/ExpressAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/ExpressResponseAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/ExpressResponseAnalyzer.js +5 -3
- package/dist/plugins/analysis/ExpressResponseAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/ExpressRouteAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/ExpressRouteAnalyzer.js +36 -39
- package/dist/plugins/analysis/ExpressRouteAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/FetchAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/FetchAnalyzer.js +23 -39
- package/dist/plugins/analysis/FetchAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/IncrementalAnalysisPlugin.d.ts.map +1 -1
- package/dist/plugins/analysis/IncrementalAnalysisPlugin.js +3 -2
- package/dist/plugins/analysis/IncrementalAnalysisPlugin.js.map +1 -1
- package/dist/plugins/analysis/JSASTAnalyzer.d.ts +23 -85
- package/dist/plugins/analysis/JSASTAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/JSASTAnalyzer.js +351 -1887
- package/dist/plugins/analysis/JSASTAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/NestJSRouteAnalyzer.d.ts +28 -0
- package/dist/plugins/analysis/NestJSRouteAnalyzer.d.ts.map +1 -0
- package/dist/plugins/analysis/NestJSRouteAnalyzer.js +196 -0
- package/dist/plugins/analysis/NestJSRouteAnalyzer.js.map +1 -0
- package/dist/plugins/analysis/ReactAnalyzer.d.ts +1 -61
- package/dist/plugins/analysis/ReactAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/ReactAnalyzer.js +24 -915
- package/dist/plugins/analysis/ReactAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/RustAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/RustAnalyzer.js +31 -66
- package/dist/plugins/analysis/RustAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/SQLiteAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/SQLiteAnalyzer.js +13 -6
- package/dist/plugins/analysis/SQLiteAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/ServiceLayerAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/ServiceLayerAnalyzer.js +10 -7
- package/dist/plugins/analysis/ServiceLayerAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/SocketAnalyzer.d.ts +81 -0
- package/dist/plugins/analysis/SocketAnalyzer.d.ts.map +1 -0
- package/dist/plugins/analysis/SocketAnalyzer.js +475 -0
- package/dist/plugins/analysis/SocketAnalyzer.js.map +1 -0
- package/dist/plugins/analysis/SocketIOAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/SocketIOAnalyzer.js +13 -18
- package/dist/plugins/analysis/SocketIOAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/SystemDbAnalyzer.d.ts.map +1 -1
- package/dist/plugins/analysis/SystemDbAnalyzer.js +8 -5
- package/dist/plugins/analysis/SystemDbAnalyzer.js.map +1 -1
- package/dist/plugins/analysis/ast/CollisionResolver.d.ts +65 -0
- package/dist/plugins/analysis/ast/CollisionResolver.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/CollisionResolver.js +106 -0
- package/dist/plugins/analysis/ast/CollisionResolver.js.map +1 -0
- package/dist/plugins/analysis/ast/FunctionBodyContext.d.ts +124 -0
- package/dist/plugins/analysis/ast/FunctionBodyContext.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/FunctionBodyContext.js +151 -0
- package/dist/plugins/analysis/ast/FunctionBodyContext.js.map +1 -0
- package/dist/plugins/analysis/ast/GraphBuilder.d.ts +26 -261
- package/dist/plugins/analysis/ast/GraphBuilder.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/GraphBuilder.js +251 -2494
- package/dist/plugins/analysis/ast/GraphBuilder.js.map +1 -1
- package/dist/plugins/analysis/ast/IdGenerator.d.ts +42 -0
- package/dist/plugins/analysis/ast/IdGenerator.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/IdGenerator.js +61 -1
- package/dist/plugins/analysis/ast/IdGenerator.js.map +1 -1
- package/dist/plugins/analysis/ast/builders/AssignmentBuilder.d.ts +15 -0
- package/dist/plugins/analysis/ast/builders/AssignmentBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/AssignmentBuilder.js +274 -0
- package/dist/plugins/analysis/ast/builders/AssignmentBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/CallFlowBuilder.d.ts +22 -0
- package/dist/plugins/analysis/ast/builders/CallFlowBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/CallFlowBuilder.js +178 -0
- package/dist/plugins/analysis/ast/builders/CallFlowBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.d.ts +76 -0
- package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.js +387 -0
- package/dist/plugins/analysis/ast/builders/ControlFlowBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/CoreBuilder.d.ts +38 -0
- package/dist/plugins/analysis/ast/builders/CoreBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/CoreBuilder.js +240 -0
- package/dist/plugins/analysis/ast/builders/CoreBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.d.ts +53 -0
- package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.js +355 -0
- package/dist/plugins/analysis/ast/builders/ModuleRuntimeBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/MutationBuilder.d.ts +46 -0
- package/dist/plugins/analysis/ast/builders/MutationBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/MutationBuilder.js +264 -0
- package/dist/plugins/analysis/ast/builders/MutationBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/ReturnBuilder.d.ts +23 -0
- package/dist/plugins/analysis/ast/builders/ReturnBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/ReturnBuilder.js +206 -0
- package/dist/plugins/analysis/ast/builders/ReturnBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.d.ts +64 -0
- package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.js +370 -0
- package/dist/plugins/analysis/ast/builders/TypeSystemBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.d.ts +46 -0
- package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.js +191 -0
- package/dist/plugins/analysis/ast/builders/UpdateExpressionBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/YieldBuilder.d.ts +30 -0
- package/dist/plugins/analysis/ast/builders/YieldBuilder.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/YieldBuilder.js +214 -0
- package/dist/plugins/analysis/ast/builders/YieldBuilder.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/index.d.ts +12 -0
- package/dist/plugins/analysis/ast/builders/index.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/index.js +11 -0
- package/dist/plugins/analysis/ast/builders/index.js.map +1 -0
- package/dist/plugins/analysis/ast/builders/types.d.ts +30 -0
- package/dist/plugins/analysis/ast/builders/types.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/builders/types.js +8 -0
- package/dist/plugins/analysis/ast/builders/types.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.d.ts +50 -0
- package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.js +2 -0
- package/dist/plugins/analysis/ast/handlers/AnalyzerDelegate.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/BranchHandler.d.ts +18 -0
- package/dist/plugins/analysis/ast/handlers/BranchHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/BranchHandler.js +244 -0
- package/dist/plugins/analysis/ast/handlers/BranchHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.d.ts +7 -0
- package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.js +295 -0
- package/dist/plugins/analysis/ast/handlers/CallExpressionHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.d.ts +22 -0
- package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.js +9 -0
- package/dist/plugins/analysis/ast/handlers/FunctionBodyHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/LoopHandler.d.ts +13 -0
- package/dist/plugins/analysis/ast/handlers/LoopHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/LoopHandler.js +207 -0
- package/dist/plugins/analysis/ast/handlers/LoopHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.d.ts +13 -0
- package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.js +174 -0
- package/dist/plugins/analysis/ast/handlers/NestedFunctionHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.d.ts +12 -0
- package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.js +135 -0
- package/dist/plugins/analysis/ast/handlers/NewExpressionHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.d.ts +13 -0
- package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.js +71 -0
- package/dist/plugins/analysis/ast/handlers/PropertyAccessHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.d.ts +12 -0
- package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.js +135 -0
- package/dist/plugins/analysis/ast/handlers/ReturnYieldHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/ThrowHandler.d.ts +12 -0
- package/dist/plugins/analysis/ast/handlers/ThrowHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/ThrowHandler.js +82 -0
- package/dist/plugins/analysis/ast/handlers/ThrowHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/TryCatchHandler.d.ts +14 -0
- package/dist/plugins/analysis/ast/handlers/TryCatchHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/TryCatchHandler.js +220 -0
- package/dist/plugins/analysis/ast/handlers/TryCatchHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/VariableHandler.d.ts +12 -0
- package/dist/plugins/analysis/ast/handlers/VariableHandler.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/VariableHandler.js +57 -0
- package/dist/plugins/analysis/ast/handlers/VariableHandler.js.map +1 -0
- package/dist/plugins/analysis/ast/handlers/index.d.ts +13 -0
- package/dist/plugins/analysis/ast/handlers/index.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/handlers/index.js +12 -0
- package/dist/plugins/analysis/ast/handlers/index.js.map +1 -0
- package/dist/plugins/analysis/ast/types.d.ts +57 -6
- package/dist/plugins/analysis/ast/types.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/utils/createParameterNodes.d.ts +5 -4
- package/dist/plugins/analysis/ast/utils/createParameterNodes.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/utils/createParameterNodes.js +94 -13
- package/dist/plugins/analysis/ast/utils/createParameterNodes.js.map +1 -1
- package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.d.ts +81 -0
- package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.js +140 -0
- package/dist/plugins/analysis/ast/utils/extractNamesFromPattern.js.map +1 -0
- package/dist/plugins/analysis/ast/utils/getExpressionValue.d.ts +22 -0
- package/dist/plugins/analysis/ast/utils/getExpressionValue.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/utils/getExpressionValue.js +35 -0
- package/dist/plugins/analysis/ast/utils/getExpressionValue.js.map +1 -0
- package/dist/plugins/analysis/ast/utils/getMemberExpressionName.d.ts +25 -0
- package/dist/plugins/analysis/ast/utils/getMemberExpressionName.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/utils/getMemberExpressionName.js +21 -0
- package/dist/plugins/analysis/ast/utils/getMemberExpressionName.js.map +1 -0
- package/dist/plugins/analysis/ast/utils/index.d.ts +2 -0
- package/dist/plugins/analysis/ast/utils/index.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/utils/index.js +2 -0
- package/dist/plugins/analysis/ast/utils/index.js.map +1 -1
- package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.d.ts +23 -0
- package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.js +241 -0
- package/dist/plugins/analysis/ast/visitors/ArgumentExtractor.js.map +1 -0
- package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.d.ts +20 -0
- package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.js +110 -0
- package/dist/plugins/analysis/ast/visitors/ArrayElementExtractor.js.map +1 -0
- package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.d.ts +15 -142
- package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.js +304 -937
- package/dist/plugins/analysis/ast/visitors/CallExpressionVisitor.js.map +1 -1
- package/dist/plugins/analysis/ast/visitors/ClassVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/ClassVisitor.js +26 -11
- package/dist/plugins/analysis/ast/visitors/ClassVisitor.js.map +1 -1
- package/dist/plugins/analysis/ast/visitors/FunctionVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/FunctionVisitor.js +21 -6
- package/dist/plugins/analysis/ast/visitors/FunctionVisitor.js.map +1 -1
- package/dist/plugins/analysis/ast/visitors/MutationDetector.d.ts +25 -0
- package/dist/plugins/analysis/ast/visitors/MutationDetector.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/visitors/MutationDetector.js +181 -0
- package/dist/plugins/analysis/ast/visitors/MutationDetector.js.map +1 -0
- package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.d.ts +20 -0
- package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.js +155 -0
- package/dist/plugins/analysis/ast/visitors/ObjectPropertyExtractor.js.map +1 -0
- package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.d.ts +9 -1
- package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.js +51 -3
- package/dist/plugins/analysis/ast/visitors/PropertyAccessVisitor.js.map +1 -1
- package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.d.ts +20 -0
- package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.js +188 -12
- package/dist/plugins/analysis/ast/visitors/TypeScriptVisitor.js.map +1 -1
- package/dist/plugins/analysis/ast/visitors/VariableVisitor.d.ts.map +1 -1
- package/dist/plugins/analysis/ast/visitors/VariableVisitor.js +6 -4
- package/dist/plugins/analysis/ast/visitors/VariableVisitor.js.map +1 -1
- package/dist/plugins/analysis/ast/visitors/call-expression-helpers.d.ts +19 -0
- package/dist/plugins/analysis/ast/visitors/call-expression-helpers.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/visitors/call-expression-helpers.js +57 -0
- package/dist/plugins/analysis/ast/visitors/call-expression-helpers.js.map +1 -0
- package/dist/plugins/analysis/ast/visitors/call-expression-types.d.ts +168 -0
- package/dist/plugins/analysis/ast/visitors/call-expression-types.d.ts.map +1 -0
- package/dist/plugins/analysis/ast/visitors/call-expression-types.js +7 -0
- package/dist/plugins/analysis/ast/visitors/call-expression-types.js.map +1 -0
- package/dist/plugins/analysis/react-internal/browser-api.d.ts +20 -0
- package/dist/plugins/analysis/react-internal/browser-api.d.ts.map +1 -0
- package/dist/plugins/analysis/react-internal/browser-api.js +140 -0
- package/dist/plugins/analysis/react-internal/browser-api.js.map +1 -0
- package/dist/plugins/analysis/react-internal/hooks.d.ts +31 -0
- package/dist/plugins/analysis/react-internal/hooks.d.ts.map +1 -0
- package/dist/plugins/analysis/react-internal/hooks.js +465 -0
- package/dist/plugins/analysis/react-internal/hooks.js.map +1 -0
- package/dist/plugins/analysis/react-internal/jsx.d.ts +43 -0
- package/dist/plugins/analysis/react-internal/jsx.d.ts.map +1 -0
- package/dist/plugins/analysis/react-internal/jsx.js +231 -0
- package/dist/plugins/analysis/react-internal/jsx.js.map +1 -0
- package/dist/plugins/analysis/react-internal/types.d.ts +116 -0
- package/dist/plugins/analysis/react-internal/types.d.ts.map +1 -0
- package/dist/plugins/analysis/react-internal/types.js +83 -0
- package/dist/plugins/analysis/react-internal/types.js.map +1 -0
- package/dist/plugins/discovery/MonorepoServiceDiscovery.d.ts.map +1 -1
- package/dist/plugins/discovery/MonorepoServiceDiscovery.js +6 -13
- package/dist/plugins/discovery/MonorepoServiceDiscovery.js.map +1 -1
- package/dist/plugins/enrichment/AliasTracker.d.ts.map +1 -1
- package/dist/plugins/enrichment/AliasTracker.js +3 -1
- package/dist/plugins/enrichment/AliasTracker.js.map +1 -1
- package/dist/plugins/enrichment/ArgumentParameterLinker.d.ts.map +1 -1
- package/dist/plugins/enrichment/ArgumentParameterLinker.js +3 -1
- package/dist/plugins/enrichment/ArgumentParameterLinker.js.map +1 -1
- package/dist/plugins/enrichment/CallbackCallResolver.d.ts +42 -0
- package/dist/plugins/enrichment/CallbackCallResolver.d.ts.map +1 -0
- package/dist/plugins/enrichment/CallbackCallResolver.js +311 -0
- package/dist/plugins/enrichment/CallbackCallResolver.js.map +1 -0
- package/dist/plugins/enrichment/ClosureCaptureEnricher.d.ts.map +1 -1
- package/dist/plugins/enrichment/ClosureCaptureEnricher.js +3 -1
- package/dist/plugins/enrichment/ClosureCaptureEnricher.js.map +1 -1
- package/dist/plugins/enrichment/ConfigRoutingMapBuilder.d.ts +17 -0
- package/dist/plugins/enrichment/ConfigRoutingMapBuilder.d.ts.map +1 -0
- package/dist/plugins/enrichment/ConfigRoutingMapBuilder.js +55 -0
- package/dist/plugins/enrichment/ConfigRoutingMapBuilder.js.map +1 -0
- package/dist/plugins/enrichment/ExpressHandlerLinker.d.ts.map +1 -1
- package/dist/plugins/enrichment/ExpressHandlerLinker.js +3 -1
- package/dist/plugins/enrichment/ExpressHandlerLinker.js.map +1 -1
- package/dist/plugins/enrichment/ExternalCallResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/ExternalCallResolver.js +5 -8
- package/dist/plugins/enrichment/ExternalCallResolver.js.map +1 -1
- package/dist/plugins/enrichment/FunctionCallResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/FunctionCallResolver.js +6 -9
- package/dist/plugins/enrichment/FunctionCallResolver.js.map +1 -1
- package/dist/plugins/enrichment/HTTPConnectionEnricher.d.ts.map +1 -1
- package/dist/plugins/enrichment/HTTPConnectionEnricher.js +3 -1
- package/dist/plugins/enrichment/HTTPConnectionEnricher.js.map +1 -1
- package/dist/plugins/enrichment/ImportExportLinker.d.ts.map +1 -1
- package/dist/plugins/enrichment/ImportExportLinker.js +5 -3
- package/dist/plugins/enrichment/ImportExportLinker.js.map +1 -1
- package/dist/plugins/enrichment/InstanceOfResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/InstanceOfResolver.js +3 -1
- package/dist/plugins/enrichment/InstanceOfResolver.js.map +1 -1
- package/dist/plugins/enrichment/MethodCallResolver.d.ts +17 -68
- package/dist/plugins/enrichment/MethodCallResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/MethodCallResolver.js +42 -517
- package/dist/plugins/enrichment/MethodCallResolver.js.map +1 -1
- package/dist/plugins/enrichment/MountPointResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/MountPointResolver.js +9 -2
- package/dist/plugins/enrichment/MountPointResolver.js.map +1 -1
- package/dist/plugins/enrichment/NodejsBuiltinsResolver.d.ts.map +1 -1
- package/dist/plugins/enrichment/NodejsBuiltinsResolver.js +7 -16
- package/dist/plugins/enrichment/NodejsBuiltinsResolver.js.map +1 -1
- package/dist/plugins/enrichment/PrefixEvaluator.d.ts.map +1 -1
- package/dist/plugins/enrichment/PrefixEvaluator.js +6 -2
- package/dist/plugins/enrichment/PrefixEvaluator.js.map +1 -1
- package/dist/plugins/enrichment/RejectionPropagationEnricher.d.ts.map +1 -1
- package/dist/plugins/enrichment/RejectionPropagationEnricher.js +3 -1
- package/dist/plugins/enrichment/RejectionPropagationEnricher.js.map +1 -1
- package/dist/plugins/enrichment/RustFFIEnricher.d.ts.map +1 -1
- package/dist/plugins/enrichment/RustFFIEnricher.js +3 -1
- package/dist/plugins/enrichment/RustFFIEnricher.js.map +1 -1
- package/dist/plugins/enrichment/ServiceConnectionEnricher.d.ts +76 -0
- package/dist/plugins/enrichment/ServiceConnectionEnricher.d.ts.map +1 -0
- package/dist/plugins/enrichment/ServiceConnectionEnricher.js +355 -0
- package/dist/plugins/enrichment/ServiceConnectionEnricher.js.map +1 -0
- package/dist/plugins/enrichment/SocketConnectionEnricher.d.ts +42 -0
- package/dist/plugins/enrichment/SocketConnectionEnricher.d.ts.map +1 -0
- package/dist/plugins/enrichment/SocketConnectionEnricher.js +166 -0
- package/dist/plugins/enrichment/SocketConnectionEnricher.js.map +1 -0
- package/dist/plugins/enrichment/ValueDomainAnalyzer.d.ts.map +1 -1
- package/dist/plugins/enrichment/ValueDomainAnalyzer.js +3 -1
- package/dist/plugins/enrichment/ValueDomainAnalyzer.js.map +1 -1
- package/dist/plugins/enrichment/method-call/MethodCallData.d.ts +68 -0
- package/dist/plugins/enrichment/method-call/MethodCallData.d.ts.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallData.js +227 -0
- package/dist/plugins/enrichment/method-call/MethodCallData.js.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallDetectors.d.ts +21 -0
- package/dist/plugins/enrichment/method-call/MethodCallDetectors.d.ts.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallDetectors.js +52 -0
- package/dist/plugins/enrichment/method-call/MethodCallDetectors.js.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.d.ts +22 -0
- package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.d.ts.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.js +105 -0
- package/dist/plugins/enrichment/method-call/MethodCallErrorAnalysis.js.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallIndexers.d.ts +19 -0
- package/dist/plugins/enrichment/method-call/MethodCallIndexers.d.ts.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallIndexers.js +63 -0
- package/dist/plugins/enrichment/method-call/MethodCallIndexers.js.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallResolution.d.ts +30 -0
- package/dist/plugins/enrichment/method-call/MethodCallResolution.d.ts.map +1 -0
- package/dist/plugins/enrichment/method-call/MethodCallResolution.js +138 -0
- package/dist/plugins/enrichment/method-call/MethodCallResolution.js.map +1 -0
- package/dist/plugins/indexing/IncrementalModuleIndexer.d.ts.map +1 -1
- package/dist/plugins/indexing/IncrementalModuleIndexer.js +2 -8
- package/dist/plugins/indexing/IncrementalModuleIndexer.js.map +1 -1
- package/dist/plugins/indexing/JSModuleIndexer.d.ts.map +1 -1
- package/dist/plugins/indexing/JSModuleIndexer.js +13 -20
- package/dist/plugins/indexing/JSModuleIndexer.js.map +1 -1
- package/dist/plugins/indexing/RustModuleIndexer.d.ts.map +1 -1
- package/dist/plugins/indexing/RustModuleIndexer.js +4 -8
- package/dist/plugins/indexing/RustModuleIndexer.js.map +1 -1
- package/dist/plugins/validation/AwaitInLoopValidator.d.ts +24 -0
- package/dist/plugins/validation/AwaitInLoopValidator.d.ts.map +1 -0
- package/dist/plugins/validation/AwaitInLoopValidator.js +69 -0
- package/dist/plugins/validation/AwaitInLoopValidator.js.map +1 -0
- package/dist/plugins/validation/PackageCoverageValidator.d.ts +33 -0
- package/dist/plugins/validation/PackageCoverageValidator.d.ts.map +1 -0
- package/dist/plugins/validation/PackageCoverageValidator.js +149 -0
- package/dist/plugins/validation/PackageCoverageValidator.js.map +1 -0
- package/dist/plugins/validation/UnconnectedRouteValidator.d.ts +18 -0
- package/dist/plugins/validation/UnconnectedRouteValidator.d.ts.map +1 -0
- package/dist/plugins/validation/UnconnectedRouteValidator.js +68 -0
- package/dist/plugins/validation/UnconnectedRouteValidator.js.map +1 -0
- package/dist/queries/NodeContext.d.ts +81 -0
- package/dist/queries/NodeContext.d.ts.map +1 -0
- package/dist/queries/NodeContext.js +193 -0
- package/dist/queries/NodeContext.js.map +1 -0
- package/dist/queries/findCallsInFunction.d.ts.map +1 -1
- package/dist/queries/findCallsInFunction.js +10 -2
- package/dist/queries/findCallsInFunction.js.map +1 -1
- package/dist/queries/findContainingFunction.d.ts +3 -2
- package/dist/queries/findContainingFunction.d.ts.map +1 -1
- package/dist/queries/findContainingFunction.js +13 -3
- package/dist/queries/findContainingFunction.js.map +1 -1
- package/dist/queries/index.d.ts +2 -0
- package/dist/queries/index.d.ts.map +1 -1
- package/dist/queries/index.js +1 -0
- package/dist/queries/index.js.map +1 -1
- package/dist/resources/InfraResourceMapImpl.d.ts +31 -0
- package/dist/resources/InfraResourceMapImpl.d.ts.map +1 -0
- package/dist/resources/InfraResourceMapImpl.js +110 -0
- package/dist/resources/InfraResourceMapImpl.js.map +1 -0
- package/dist/resources/RoutingMapImpl.d.ts +33 -0
- package/dist/resources/RoutingMapImpl.d.ts.map +1 -0
- package/dist/resources/RoutingMapImpl.js +115 -0
- package/dist/resources/RoutingMapImpl.js.map +1 -0
- package/dist/storage/backends/RFDBServerBackend.d.ts +35 -6
- package/dist/storage/backends/RFDBServerBackend.d.ts.map +1 -1
- package/dist/storage/backends/RFDBServerBackend.js +102 -70
- package/dist/storage/backends/RFDBServerBackend.js.map +1 -1
- package/dist/utils/findRfdbBinary.d.ts +3 -2
- package/dist/utils/findRfdbBinary.d.ts.map +1 -1
- package/dist/utils/findRfdbBinary.js +22 -7
- package/dist/utils/findRfdbBinary.js.map +1 -1
- package/dist/utils/moduleResolution.d.ts.map +1 -1
- package/dist/utils/moduleResolution.js +26 -1
- package/dist/utils/moduleResolution.js.map +1 -1
- package/dist/utils/resolveNodeFile.d.ts +13 -0
- package/dist/utils/resolveNodeFile.d.ts.map +1 -0
- package/dist/utils/resolveNodeFile.js +18 -0
- package/dist/utils/resolveNodeFile.js.map +1 -0
- package/dist/version.d.ts +11 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +26 -0
- package/dist/version.js.map +1 -0
- package/package.json +3 -3
- package/src/DiscoveryManager.ts +279 -0
- package/src/GraphInitializer.ts +131 -0
- package/src/GuaranteeChecker.ts +90 -0
- package/src/Orchestrator.ts +222 -963
- package/src/OrchestratorTypes.ts +122 -0
- package/src/ParallelAnalysisRunner.ts +188 -0
- package/src/PhaseRunner.ts +450 -0
- package/src/config/ConfigLoader.ts +176 -2
- package/src/config/index.ts +2 -0
- package/src/core/ASTWorker.ts +9 -2
- package/src/core/FileOverview.ts +374 -0
- package/src/core/GraphFreshnessChecker.ts +7 -5
- package/src/core/GuaranteeManager.ts +70 -2
- package/src/core/IncrementalReanalyzer.ts +6 -3
- package/src/core/NodeFactory.ts +173 -652
- package/src/core/ResourceRegistry.ts +39 -0
- package/src/core/ScopeTracker.ts +23 -0
- package/src/core/SemanticId.ts +183 -0
- package/src/core/brandNodeInternal.ts +16 -0
- package/src/core/buildDependencyGraph.ts +98 -0
- package/src/core/factories/CoreFactory.ts +489 -0
- package/src/core/factories/DatabaseFactory.ts +63 -0
- package/src/core/factories/ExternalFactory.ts +23 -0
- package/src/core/factories/HttpFactory.ts +57 -0
- package/src/core/factories/ReactFactory.ts +15 -0
- package/src/core/factories/RustFactory.ts +128 -0
- package/src/core/factories/ServiceFactory.ts +27 -0
- package/src/core/factories/SocketFactory.ts +94 -0
- package/src/core/nodes/DatabaseNode.ts +175 -0
- package/src/core/nodes/ExpressMiddlewareNode.ts +98 -0
- package/src/core/nodes/ExpressMountNode.ts +94 -0
- package/src/core/nodes/ExternalApiNode.ts +53 -0
- package/src/core/nodes/ExternalFunctionNode.ts +77 -0
- package/src/core/nodes/FetchRequestNode.ts +105 -0
- package/src/core/nodes/HttpRouteNode.ts +113 -0
- package/src/core/nodes/NodeKind.ts +1 -0
- package/src/core/nodes/ReactNode.ts +78 -0
- package/src/core/nodes/RustCallNode.ts +96 -0
- package/src/core/nodes/RustFunctionNode.ts +112 -0
- package/src/core/nodes/RustImplNode.ts +78 -0
- package/src/core/nodes/RustMethodNode.ts +125 -0
- package/src/core/nodes/RustModuleNode.ts +84 -0
- package/src/core/nodes/RustStructNode.ts +80 -0
- package/src/core/nodes/RustTraitNode.ts +82 -0
- package/src/core/nodes/ServiceLayerNode.ts +183 -0
- package/src/core/nodes/SocketIONode.ts +177 -0
- package/src/core/nodes/SocketNode.ts +206 -0
- package/src/core/nodes/TypeNode.ts +46 -3
- package/src/core/nodes/TypeParameterNode.ts +91 -0
- package/src/core/nodes/index.ts +57 -0
- package/src/index.ts +60 -4
- package/src/plugins/InfraAnalyzer.ts +208 -0
- package/src/plugins/analysis/DatabaseAnalyzer.ts +27 -17
- package/src/plugins/analysis/ExpressAnalyzer.ts +51 -38
- package/src/plugins/analysis/ExpressResponseAnalyzer.ts +15 -12
- package/src/plugins/analysis/ExpressRouteAnalyzer.ts +56 -56
- package/src/plugins/analysis/FetchAnalyzer.ts +42 -52
- package/src/plugins/analysis/IncrementalAnalysisPlugin.ts +3 -2
- package/src/plugins/analysis/JSASTAnalyzer.ts +391 -2304
- package/src/plugins/analysis/NestJSRouteAnalyzer.ts +241 -0
- package/src/plugins/analysis/ReactAnalyzer.ts +33 -1085
- package/src/plugins/analysis/RustAnalyzer.ts +112 -116
- package/src/plugins/analysis/SQLiteAnalyzer.ts +23 -9
- package/src/plugins/analysis/ServiceLayerAnalyzer.ts +32 -10
- package/src/plugins/analysis/SocketAnalyzer.ts +601 -0
- package/src/plugins/analysis/SocketIOAnalyzer.ts +25 -34
- package/src/plugins/analysis/SystemDbAnalyzer.ts +15 -12
- package/src/plugins/analysis/ast/CollisionResolver.ts +137 -0
- package/src/plugins/analysis/ast/FunctionBodyContext.ts +291 -0
- package/src/plugins/analysis/ast/GraphBuilder.ts +274 -3180
- package/src/plugins/analysis/ast/IdGenerator.ts +81 -1
- package/src/plugins/analysis/ast/builders/AssignmentBuilder.ts +407 -0
- package/src/plugins/analysis/ast/builders/CallFlowBuilder.ts +255 -0
- package/src/plugins/analysis/ast/builders/ControlFlowBuilder.ts +470 -0
- package/src/plugins/analysis/ast/builders/CoreBuilder.ts +306 -0
- package/src/plugins/analysis/ast/builders/ModuleRuntimeBuilder.ts +452 -0
- package/src/plugins/analysis/ast/builders/MutationBuilder.ts +372 -0
- package/src/plugins/analysis/ast/builders/ReturnBuilder.ts +279 -0
- package/src/plugins/analysis/ast/builders/TypeSystemBuilder.ts +475 -0
- package/src/plugins/analysis/ast/builders/UpdateExpressionBuilder.ts +262 -0
- package/src/plugins/analysis/ast/builders/YieldBuilder.ts +287 -0
- package/src/plugins/analysis/ast/builders/index.ts +11 -0
- package/src/plugins/analysis/ast/builders/types.ts +65 -0
- package/src/plugins/analysis/ast/handlers/AnalyzerDelegate.ts +183 -0
- package/src/plugins/analysis/ast/handlers/BranchHandler.ts +313 -0
- package/src/plugins/analysis/ast/handlers/CallExpressionHandler.ts +347 -0
- package/src/plugins/analysis/ast/handlers/FunctionBodyHandler.ts +24 -0
- package/src/plugins/analysis/ast/handlers/LoopHandler.ts +240 -0
- package/src/plugins/analysis/ast/handlers/NestedFunctionHandler.ts +201 -0
- package/src/plugins/analysis/ast/handlers/NewExpressionHandler.ts +159 -0
- package/src/plugins/analysis/ast/handlers/PropertyAccessHandler.ts +112 -0
- package/src/plugins/analysis/ast/handlers/ReturnYieldHandler.ts +166 -0
- package/src/plugins/analysis/ast/handlers/ThrowHandler.ts +101 -0
- package/src/plugins/analysis/ast/handlers/TryCatchHandler.ts +262 -0
- package/src/plugins/analysis/ast/handlers/VariableHandler.ts +93 -0
- package/src/plugins/analysis/ast/handlers/index.ts +12 -0
- package/src/plugins/analysis/ast/types.ts +68 -9
- package/src/plugins/analysis/ast/utils/createParameterNodes.ts +118 -13
- package/src/plugins/analysis/ast/utils/extractNamesFromPattern.ts +166 -0
- package/src/plugins/analysis/ast/utils/getExpressionValue.ts +34 -0
- package/src/plugins/analysis/ast/utils/getMemberExpressionName.ts +33 -0
- package/src/plugins/analysis/ast/utils/index.ts +2 -0
- package/src/plugins/analysis/ast/visitors/ArgumentExtractor.ts +307 -0
- package/src/plugins/analysis/ast/visitors/ArrayElementExtractor.ts +172 -0
- package/src/plugins/analysis/ast/visitors/CallExpressionVisitor.ts +425 -1374
- package/src/plugins/analysis/ast/visitors/ClassVisitor.ts +43 -12
- package/src/plugins/analysis/ast/visitors/FunctionVisitor.ts +39 -8
- package/src/plugins/analysis/ast/visitors/MutationDetector.ts +211 -0
- package/src/plugins/analysis/ast/visitors/ObjectPropertyExtractor.ts +217 -0
- package/src/plugins/analysis/ast/visitors/PropertyAccessVisitor.ts +69 -4
- package/src/plugins/analysis/ast/visitors/TypeScriptVisitor.ts +232 -13
- package/src/plugins/analysis/ast/visitors/VariableVisitor.ts +8 -11
- package/src/plugins/analysis/ast/visitors/call-expression-helpers.ts +65 -0
- package/src/plugins/analysis/ast/visitors/call-expression-types.ts +179 -0
- package/src/plugins/analysis/react-internal/browser-api.ts +168 -0
- package/src/plugins/analysis/react-internal/hooks.ts +517 -0
- package/src/plugins/analysis/react-internal/jsx.ts +279 -0
- package/src/plugins/analysis/react-internal/types.ts +183 -0
- package/src/plugins/discovery/MonorepoServiceDiscovery.ts +6 -14
- package/src/plugins/enrichment/AliasTracker.ts +3 -1
- package/src/plugins/enrichment/ArgumentParameterLinker.ts +3 -1
- package/src/plugins/enrichment/CallbackCallResolver.ts +398 -0
- package/src/plugins/enrichment/ClosureCaptureEnricher.ts +3 -1
- package/src/plugins/enrichment/ConfigRoutingMapBuilder.ts +67 -0
- package/src/plugins/enrichment/ExpressHandlerLinker.ts +3 -1
- package/src/plugins/enrichment/ExternalCallResolver.ts +5 -8
- package/src/plugins/enrichment/FunctionCallResolver.ts +6 -9
- package/src/plugins/enrichment/HTTPConnectionEnricher.ts +3 -1
- package/src/plugins/enrichment/ImportExportLinker.ts +5 -3
- package/src/plugins/enrichment/InstanceOfResolver.ts +3 -1
- package/src/plugins/enrichment/MethodCallResolver.ts +48 -659
- package/src/plugins/enrichment/MountPointResolver.ts +9 -2
- package/src/plugins/enrichment/NodejsBuiltinsResolver.ts +13 -18
- package/src/plugins/enrichment/PrefixEvaluator.ts +6 -2
- package/src/plugins/enrichment/RejectionPropagationEnricher.ts +3 -1
- package/src/plugins/enrichment/RustFFIEnricher.ts +3 -1
- package/src/plugins/enrichment/ServiceConnectionEnricher.ts +472 -0
- package/src/plugins/enrichment/SocketConnectionEnricher.ts +228 -0
- package/src/plugins/enrichment/ValueDomainAnalyzer.ts +3 -1
- package/src/plugins/enrichment/method-call/MethodCallData.ts +299 -0
- package/src/plugins/enrichment/method-call/MethodCallDetectors.ts +70 -0
- package/src/plugins/enrichment/method-call/MethodCallErrorAnalysis.ts +131 -0
- package/src/plugins/enrichment/method-call/MethodCallIndexers.ts +83 -0
- package/src/plugins/enrichment/method-call/MethodCallResolution.ts +181 -0
- package/src/plugins/indexing/IncrementalModuleIndexer.ts +5 -10
- package/src/plugins/indexing/JSModuleIndexer.ts +17 -21
- package/src/plugins/indexing/RustModuleIndexer.ts +14 -13
- package/src/plugins/validation/AwaitInLoopValidator.ts +91 -0
- package/src/plugins/validation/PackageCoverageValidator.ts +181 -0
- package/src/plugins/validation/UnconnectedRouteValidator.ts +93 -0
- package/src/queries/NodeContext.ts +277 -0
- package/src/queries/findCallsInFunction.ts +11 -2
- package/src/queries/findContainingFunction.ts +14 -3
- package/src/queries/index.ts +13 -0
- package/src/resources/InfraResourceMapImpl.ts +119 -0
- package/src/resources/RoutingMapImpl.ts +133 -0
- package/src/storage/backends/RFDBServerBackend.ts +106 -77
- package/src/utils/findRfdbBinary.ts +22 -7
- package/src/utils/moduleResolution.ts +28 -1
- package/src/utils/resolveNodeFile.ts +18 -0
- package/src/version.ts +28 -0
|
@@ -26,12 +26,13 @@ import type {
|
|
|
26
26
|
import type { NodePath } from '@babel/traverse';
|
|
27
27
|
import { ASTVisitor, type VisitorModule, type VisitorCollections, type VisitorHandlers } from './ASTVisitor.js';
|
|
28
28
|
import type { AnalyzeFunctionBodyCallback } from './FunctionVisitor.js';
|
|
29
|
-
import type { DecoratorInfo, ParameterInfo, VariableDeclarationInfo } from '../types.js';
|
|
29
|
+
import type { DecoratorInfo, ParameterInfo, VariableDeclarationInfo, TypeParameterInfo } from '../types.js';
|
|
30
|
+
import { extractTypeParameters } from './TypeScriptVisitor.js';
|
|
30
31
|
import { ExpressionEvaluator } from '../ExpressionEvaluator.js';
|
|
31
32
|
import { createParameterNodes } from '../utils/createParameterNodes.js';
|
|
32
33
|
import type { ScopeTracker } from '../../../../core/ScopeTracker.js';
|
|
33
34
|
import { ClassNode, type ClassNodeRecord } from '../../../../core/nodes/ClassNode.js';
|
|
34
|
-
import {
|
|
35
|
+
import { computeSemanticIdV2 } from '../../../../core/SemanticId.js';
|
|
35
36
|
import { getLine, getColumn } from '../utils/location.js';
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -204,6 +205,21 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
207
|
|
|
208
|
+
// Extract type parameters (REG-303)
|
|
209
|
+
if (collections.typeParameters && (classNode as any).typeParameters) {
|
|
210
|
+
const typeParamInfos = extractTypeParameters(
|
|
211
|
+
(classNode as any).typeParameters,
|
|
212
|
+
classRecord.id,
|
|
213
|
+
'CLASS',
|
|
214
|
+
module.file,
|
|
215
|
+
classLine,
|
|
216
|
+
classColumn
|
|
217
|
+
);
|
|
218
|
+
for (const tp of typeParamInfos) {
|
|
219
|
+
(collections.typeParameters as TypeParameterInfo[]).push(tp);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
207
223
|
// Store ClassNodeRecord + TypeScript metadata
|
|
208
224
|
(classDeclarations as ClassInfo[]).push({
|
|
209
225
|
...classRecord,
|
|
@@ -267,7 +283,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
267
283
|
|
|
268
284
|
// Use semantic ID as primary ID (matching FunctionVisitor pattern)
|
|
269
285
|
const legacyId = `FUNCTION#${className}.${propName}#${module.file}#${propLine}:${propColumn}`;
|
|
270
|
-
const functionId =
|
|
286
|
+
const functionId = computeSemanticIdV2('FUNCTION', propName, module.file, scopeTracker.getNamedParent());
|
|
271
287
|
|
|
272
288
|
// Add method to class methods list for CONTAINS edges
|
|
273
289
|
currentClass.methods.push(functionId);
|
|
@@ -297,7 +313,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
297
313
|
|
|
298
314
|
// Create SCOPE for property function body
|
|
299
315
|
const propBodyScopeId = `SCOPE#${className}.${propName}:body#${module.file}#${propLine}`;
|
|
300
|
-
const propBodySemanticId =
|
|
316
|
+
const propBodySemanticId = computeSemanticIdV2('SCOPE', 'body', module.file, scopeTracker.getNamedParent());
|
|
301
317
|
(scopes as ScopeInfo[]).push({
|
|
302
318
|
id: propBodyScopeId,
|
|
303
319
|
semanticId: propBodySemanticId,
|
|
@@ -334,7 +350,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
334
350
|
|
|
335
351
|
// Use semantic ID as primary ID (matching FunctionVisitor pattern)
|
|
336
352
|
const legacyId = `FUNCTION#${className}.${methodName}#${module.file}#${methodLine}:${methodColumn}`;
|
|
337
|
-
const functionId =
|
|
353
|
+
const functionId = computeSemanticIdV2('FUNCTION', methodName, module.file, scopeTracker.getNamedParent());
|
|
338
354
|
|
|
339
355
|
// Add method to class methods list for CONTAINS edges
|
|
340
356
|
currentClass.methods.push(functionId);
|
|
@@ -355,6 +371,21 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
355
371
|
};
|
|
356
372
|
(functions as ClassFunctionInfo[]).push(funcData);
|
|
357
373
|
|
|
374
|
+
// Extract type parameters for methods (REG-303)
|
|
375
|
+
if (collections.typeParameters && (methodNode as any).typeParameters) {
|
|
376
|
+
const typeParamInfos = extractTypeParameters(
|
|
377
|
+
(methodNode as any).typeParameters,
|
|
378
|
+
functionId,
|
|
379
|
+
'FUNCTION',
|
|
380
|
+
module.file,
|
|
381
|
+
methodLine,
|
|
382
|
+
methodColumn
|
|
383
|
+
);
|
|
384
|
+
for (const tp of typeParamInfos) {
|
|
385
|
+
(collections.typeParameters as TypeParameterInfo[]).push(tp);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
358
389
|
// Extract method decorators
|
|
359
390
|
const methodNodeWithDecorators = methodNode as ClassMethod & { decorators?: Decorator[] };
|
|
360
391
|
if (methodNodeWithDecorators.decorators && methodNodeWithDecorators.decorators.length > 0 && decorators) {
|
|
@@ -376,7 +407,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
376
407
|
|
|
377
408
|
// Create SCOPE for method body
|
|
378
409
|
const methodBodyScopeId = `SCOPE#${className}.${methodName}:body#${module.file}#${methodLine}`;
|
|
379
|
-
const methodBodySemanticId =
|
|
410
|
+
const methodBodySemanticId = computeSemanticIdV2('SCOPE', 'body', module.file, scopeTracker.getNamedParent());
|
|
380
411
|
(scopes as ScopeInfo[]).push({
|
|
381
412
|
id: methodBodyScopeId,
|
|
382
413
|
semanticId: methodBodySemanticId,
|
|
@@ -410,7 +441,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
410
441
|
const { discriminator } = scopeTracker.enterCountedScope('static_block');
|
|
411
442
|
|
|
412
443
|
// Generate semantic ID for static block scope
|
|
413
|
-
const staticBlockScopeId =
|
|
444
|
+
const staticBlockScopeId = computeSemanticIdV2('SCOPE', `static_block#${discriminator}`, module.file, scopeTracker.getNamedParent());
|
|
414
445
|
|
|
415
446
|
// Add to class staticBlocks array for CONTAINS edge
|
|
416
447
|
if (!currentClass.staticBlocks) {
|
|
@@ -462,7 +493,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
462
493
|
// Handle as private method (function-valued property)
|
|
463
494
|
const funcNode = propNode.value as ArrowFunctionExpression | FunctionExpression;
|
|
464
495
|
|
|
465
|
-
const functionId =
|
|
496
|
+
const functionId = computeSemanticIdV2('FUNCTION', displayName, module.file, scopeTracker.getNamedParent());
|
|
466
497
|
|
|
467
498
|
// Add to class methods list for CONTAINS edges
|
|
468
499
|
currentClass.methods.push(functionId);
|
|
@@ -492,7 +523,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
492
523
|
}
|
|
493
524
|
|
|
494
525
|
// Create SCOPE for property function body
|
|
495
|
-
const propBodyScopeId =
|
|
526
|
+
const propBodyScopeId = computeSemanticIdV2('SCOPE', 'body', module.file, scopeTracker.getNamedParent());
|
|
496
527
|
(scopes as ScopeInfo[]).push({
|
|
497
528
|
id: propBodyScopeId,
|
|
498
529
|
semanticId: propBodyScopeId,
|
|
@@ -512,7 +543,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
512
543
|
scopeTracker.exitScope();
|
|
513
544
|
} else {
|
|
514
545
|
// Handle as private field (non-function property)
|
|
515
|
-
const variableId =
|
|
546
|
+
const variableId = computeSemanticIdV2('VARIABLE', displayName, module.file, scopeTracker.getNamedParent());
|
|
516
547
|
|
|
517
548
|
// Add to class properties list for HAS_PROPERTY edges
|
|
518
549
|
if (!currentClass.properties) {
|
|
@@ -568,7 +599,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
568
599
|
// For getter/setter, include kind in name for unique ID (e.g., "get:#prop", "set:#prop")
|
|
569
600
|
const kind = methodNode.kind as 'get' | 'set' | 'method';
|
|
570
601
|
const semanticName = (kind === 'get' || kind === 'set') ? `${kind}:${displayName}` : displayName;
|
|
571
|
-
const functionId =
|
|
602
|
+
const functionId = computeSemanticIdV2('FUNCTION', semanticName, module.file, scopeTracker.getNamedParent());
|
|
572
603
|
|
|
573
604
|
// Add method to class methods list for CONTAINS edges
|
|
574
605
|
currentClass.methods.push(functionId);
|
|
@@ -610,7 +641,7 @@ export class ClassVisitor extends ASTVisitor {
|
|
|
610
641
|
}
|
|
611
642
|
|
|
612
643
|
// Create SCOPE for method body
|
|
613
|
-
const methodBodyScopeId =
|
|
644
|
+
const methodBodyScopeId = computeSemanticIdV2('SCOPE', 'body', module.file, scopeTracker.getNamedParent());
|
|
614
645
|
(scopes as ScopeInfo[]).push({
|
|
615
646
|
id: methodBodyScopeId,
|
|
616
647
|
semanticId: methodBodyScopeId,
|
|
@@ -21,13 +21,13 @@ import type {
|
|
|
21
21
|
NewExpression
|
|
22
22
|
} from '@babel/types';
|
|
23
23
|
import type { NodePath } from '@babel/traverse';
|
|
24
|
-
import { ASTVisitor, type VisitorModule, type VisitorCollections, type VisitorHandlers
|
|
25
|
-
import { typeNodeToString } from './TypeScriptVisitor.js';
|
|
24
|
+
import { ASTVisitor, type VisitorModule, type VisitorCollections, type VisitorHandlers } from './ASTVisitor.js';
|
|
25
|
+
import { typeNodeToString, extractTypeParameters } from './TypeScriptVisitor.js';
|
|
26
26
|
import type { ScopeTracker } from '../../../../core/ScopeTracker.js';
|
|
27
27
|
import { IdGenerator } from '../IdGenerator.js';
|
|
28
28
|
import { createParameterNodes } from '../utils/createParameterNodes.js';
|
|
29
29
|
import { getLine, getColumn } from '../utils/location.js';
|
|
30
|
-
import type { ParameterInfo, PromiseExecutorContext } from '../types.js';
|
|
30
|
+
import type { ParameterInfo, PromiseExecutorContext, TypeParameterInfo } from '../types.js';
|
|
31
31
|
import { ConstructorCallNode } from '../../../../core/nodes/ConstructorCallNode.js';
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -102,7 +102,6 @@ export class FunctionVisitor extends ASTVisitor {
|
|
|
102
102
|
const functions = this.collections.functions ?? [];
|
|
103
103
|
const parameters = this.collections.parameters ?? [];
|
|
104
104
|
const scopes = this.collections.scopes ?? [];
|
|
105
|
-
const functionCounterRef = (this.collections.functionCounterRef ?? { value: 0 }) as CounterRef;
|
|
106
105
|
const scopeTracker = this.scopeTracker;
|
|
107
106
|
|
|
108
107
|
const analyzeFunctionBody = this.analyzeFunctionBody;
|
|
@@ -220,7 +219,7 @@ export class FunctionVisitor extends ASTVisitor {
|
|
|
220
219
|
|
|
221
220
|
// Generate ID using centralized IdGenerator
|
|
222
221
|
const idGenerator = new IdGenerator(scopeTracker);
|
|
223
|
-
const functionId = idGenerator.
|
|
222
|
+
const functionId = idGenerator.generateV2Simple('FUNCTION', node.id.name, module.file);
|
|
224
223
|
|
|
225
224
|
// Extract type info
|
|
226
225
|
const { names: paramNames, types: paramTypes } = extractParamInfo(node.params);
|
|
@@ -244,6 +243,22 @@ export class FunctionVisitor extends ASTVisitor {
|
|
|
244
243
|
start: node.start ?? undefined
|
|
245
244
|
});
|
|
246
245
|
|
|
246
|
+
// Extract type parameters (REG-303)
|
|
247
|
+
const typeParametersCollection = collections.typeParameters;
|
|
248
|
+
if (typeParametersCollection && (node as any).typeParameters) {
|
|
249
|
+
const typeParamInfos = extractTypeParameters(
|
|
250
|
+
(node as any).typeParameters,
|
|
251
|
+
functionId,
|
|
252
|
+
'FUNCTION',
|
|
253
|
+
module.file,
|
|
254
|
+
line,
|
|
255
|
+
getColumn(node)
|
|
256
|
+
);
|
|
257
|
+
for (const tp of typeParamInfos) {
|
|
258
|
+
(typeParametersCollection as TypeParameterInfo[]).push(tp);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
247
262
|
// Enter function scope BEFORE creating parameters (semantic IDs need function context)
|
|
248
263
|
scopeTracker.enterScope(node.id.name, 'FUNCTION');
|
|
249
264
|
|
|
@@ -251,7 +266,7 @@ export class FunctionVisitor extends ASTVisitor {
|
|
|
251
266
|
createParameterNodes(node.params, functionId, module.file, getLine(node), parameters as ParameterInfo[], scopeTracker);
|
|
252
267
|
|
|
253
268
|
// Create SCOPE for function body
|
|
254
|
-
const functionBodyScopeId = idGenerator.
|
|
269
|
+
const functionBodyScopeId = idGenerator.generateV2Simple('SCOPE', 'body', module.file);
|
|
255
270
|
(scopes as ScopeInfo[]).push({
|
|
256
271
|
id: functionBodyScopeId,
|
|
257
272
|
type: 'SCOPE',
|
|
@@ -294,7 +309,7 @@ export class FunctionVisitor extends ASTVisitor {
|
|
|
294
309
|
|
|
295
310
|
// Generate ID using centralized IdGenerator
|
|
296
311
|
const idGenerator = new IdGenerator(scopeTracker);
|
|
297
|
-
const functionId = idGenerator.
|
|
312
|
+
const functionId = idGenerator.generateV2Simple('FUNCTION', functionName, module.file);
|
|
298
313
|
|
|
299
314
|
// Extract type info
|
|
300
315
|
const { names: paramNames, types: paramTypes } = extractParamInfo(node.params);
|
|
@@ -319,6 +334,22 @@ export class FunctionVisitor extends ASTVisitor {
|
|
|
319
334
|
start: node.start ?? undefined
|
|
320
335
|
});
|
|
321
336
|
|
|
337
|
+
// Extract type parameters (REG-303)
|
|
338
|
+
const arrowTypeParamsCollection = collections.typeParameters;
|
|
339
|
+
if (arrowTypeParamsCollection && (node as any).typeParameters) {
|
|
340
|
+
const typeParamInfos = extractTypeParameters(
|
|
341
|
+
(node as any).typeParameters,
|
|
342
|
+
functionId,
|
|
343
|
+
'FUNCTION',
|
|
344
|
+
module.file,
|
|
345
|
+
line,
|
|
346
|
+
column
|
|
347
|
+
);
|
|
348
|
+
for (const tp of typeParamInfos) {
|
|
349
|
+
(arrowTypeParamsCollection as TypeParameterInfo[]).push(tp);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
322
353
|
// Enter function scope BEFORE creating parameters (semantic IDs need function context)
|
|
323
354
|
scopeTracker.enterScope(functionName, 'FUNCTION');
|
|
324
355
|
|
|
@@ -326,7 +357,7 @@ export class FunctionVisitor extends ASTVisitor {
|
|
|
326
357
|
createParameterNodes(node.params, functionId, module.file, line, parameters as ParameterInfo[], scopeTracker);
|
|
327
358
|
|
|
328
359
|
// Create SCOPE for arrow function body
|
|
329
|
-
const bodyScope = idGenerator.
|
|
360
|
+
const bodyScope = idGenerator.generateV2Simple('SCOPE', 'body', module.file);
|
|
330
361
|
(scopes as ScopeInfo[]).push({
|
|
331
362
|
id: bodyScope,
|
|
332
363
|
type: 'SCOPE',
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MutationDetector — detects array mutations (push/unshift/splice) and Object.assign calls.
|
|
3
|
+
*
|
|
4
|
+
* Creates ArrayMutationInfo and ObjectMutationInfo records for FLOWS_INTO edge
|
|
5
|
+
* generation in GraphBuilder.
|
|
6
|
+
* Extracted from CallExpressionVisitor.ts (REG-424).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { CallExpression } from '@babel/types';
|
|
10
|
+
import { ExpressionEvaluator } from '../ExpressionEvaluator.js';
|
|
11
|
+
import type { ArrayMutationInfo, ArrayMutationArgument, ObjectMutationInfo, ObjectMutationValue } from '../types.js';
|
|
12
|
+
import type { ScopeTracker } from '../../../../core/ScopeTracker.js';
|
|
13
|
+
import { computeSemanticId } from '../../../../core/SemanticId.js';
|
|
14
|
+
import type { VisitorModule, VisitorCollections } from './ASTVisitor.js';
|
|
15
|
+
|
|
16
|
+
export class MutationDetector {
|
|
17
|
+
/**
|
|
18
|
+
* Detect array mutation calls (push, unshift, splice) and collect mutation info
|
|
19
|
+
* for later FLOWS_INTO edge creation in GraphBuilder.
|
|
20
|
+
*
|
|
21
|
+
* REG-117: Added isNested, baseObjectName, propertyName for nested mutations.
|
|
22
|
+
*/
|
|
23
|
+
static detectArrayMutation(
|
|
24
|
+
callNode: CallExpression,
|
|
25
|
+
arrayName: string,
|
|
26
|
+
method: 'push' | 'unshift' | 'splice',
|
|
27
|
+
module: VisitorModule,
|
|
28
|
+
collections: VisitorCollections,
|
|
29
|
+
scopeTracker?: ScopeTracker,
|
|
30
|
+
isNested?: boolean,
|
|
31
|
+
baseObjectName?: string,
|
|
32
|
+
propertyName?: string
|
|
33
|
+
): void {
|
|
34
|
+
// Initialize collection if not exists
|
|
35
|
+
if (!collections.arrayMutations) {
|
|
36
|
+
collections.arrayMutations = [];
|
|
37
|
+
}
|
|
38
|
+
const arrayMutations = collections.arrayMutations as ArrayMutationInfo[];
|
|
39
|
+
|
|
40
|
+
const mutationArgs: ArrayMutationArgument[] = [];
|
|
41
|
+
|
|
42
|
+
// For splice, only arguments from index 2 onwards are insertions
|
|
43
|
+
// splice(start, deleteCount, item1, item2, ...)
|
|
44
|
+
callNode.arguments.forEach((arg, index) => {
|
|
45
|
+
// Skip start and deleteCount for splice
|
|
46
|
+
if (method === 'splice' && index < 2) return;
|
|
47
|
+
|
|
48
|
+
const argInfo: ArrayMutationArgument = {
|
|
49
|
+
argIndex: method === 'splice' ? index - 2 : index,
|
|
50
|
+
isSpread: arg.type === 'SpreadElement',
|
|
51
|
+
valueType: 'EXPRESSION' // Default
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
let actualArg = arg;
|
|
55
|
+
if (arg.type === 'SpreadElement') {
|
|
56
|
+
actualArg = arg.argument;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Determine value type and store coordinates for node lookup in GraphBuilder.
|
|
60
|
+
// IMPORTANT: Check ObjectExpression/ArrayExpression BEFORE extractLiteralValue
|
|
61
|
+
// to match the order in extractArguments (which creates the actual nodes).
|
|
62
|
+
// extractLiteralValue returns objects/arrays with all-literal properties as
|
|
63
|
+
// literal values, but extractArguments creates OBJECT_LITERAL/ARRAY_LITERAL nodes.
|
|
64
|
+
if (actualArg.type === 'ObjectExpression') {
|
|
65
|
+
argInfo.valueType = 'OBJECT_LITERAL';
|
|
66
|
+
argInfo.valueLine = actualArg.loc?.start.line;
|
|
67
|
+
argInfo.valueColumn = actualArg.loc?.start.column;
|
|
68
|
+
} else if (actualArg.type === 'ArrayExpression') {
|
|
69
|
+
argInfo.valueType = 'ARRAY_LITERAL';
|
|
70
|
+
argInfo.valueLine = actualArg.loc?.start.line;
|
|
71
|
+
argInfo.valueColumn = actualArg.loc?.start.column;
|
|
72
|
+
} else if (actualArg.type === 'Identifier') {
|
|
73
|
+
argInfo.valueType = 'VARIABLE';
|
|
74
|
+
argInfo.valueName = actualArg.name;
|
|
75
|
+
} else if (actualArg.type === 'CallExpression') {
|
|
76
|
+
argInfo.valueType = 'CALL';
|
|
77
|
+
argInfo.callLine = actualArg.loc?.start.line;
|
|
78
|
+
argInfo.callColumn = actualArg.loc?.start.column;
|
|
79
|
+
} else {
|
|
80
|
+
const literalValue = ExpressionEvaluator.extractLiteralValue(actualArg);
|
|
81
|
+
if (literalValue !== null) {
|
|
82
|
+
argInfo.valueType = 'LITERAL';
|
|
83
|
+
argInfo.literalValue = literalValue;
|
|
84
|
+
argInfo.valueLine = actualArg.loc?.start.line;
|
|
85
|
+
argInfo.valueColumn = actualArg.loc?.start.column;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
mutationArgs.push(argInfo);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Only record if there are actual insertions
|
|
93
|
+
if (mutationArgs.length > 0) {
|
|
94
|
+
const line = callNode.loc?.start.line ?? 0;
|
|
95
|
+
const column = callNode.loc?.start.column ?? 0;
|
|
96
|
+
|
|
97
|
+
let mutationId: string | undefined;
|
|
98
|
+
// Capture scope path for scope-aware lookup (REG-309)
|
|
99
|
+
const scopePath = scopeTracker?.getContext().scopePath ?? [];
|
|
100
|
+
|
|
101
|
+
if (scopeTracker) {
|
|
102
|
+
const discriminator = scopeTracker.getItemCounter(`ARRAY_MUTATION:${arrayName}.${method}`);
|
|
103
|
+
mutationId = computeSemanticId('ARRAY_MUTATION', `${arrayName}.${method}`, scopeTracker.getContext(), { discriminator });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
arrayMutations.push({
|
|
107
|
+
id: mutationId,
|
|
108
|
+
arrayName,
|
|
109
|
+
mutationScopePath: scopePath,
|
|
110
|
+
mutationMethod: method,
|
|
111
|
+
file: module.file,
|
|
112
|
+
line,
|
|
113
|
+
column,
|
|
114
|
+
insertedValues: mutationArgs,
|
|
115
|
+
// REG-117: Nested mutation fields
|
|
116
|
+
isNested,
|
|
117
|
+
baseObjectName,
|
|
118
|
+
propertyName
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Detect Object.assign(target, source1, source2, ...) calls.
|
|
125
|
+
* Creates ObjectMutationInfo for FLOWS_INTO edge generation in GraphBuilder.
|
|
126
|
+
*/
|
|
127
|
+
static detectObjectAssign(
|
|
128
|
+
callNode: CallExpression,
|
|
129
|
+
module: VisitorModule,
|
|
130
|
+
collections: VisitorCollections,
|
|
131
|
+
scopeTracker?: ScopeTracker
|
|
132
|
+
): void {
|
|
133
|
+
// Need at least 2 arguments: target and at least one source
|
|
134
|
+
if (callNode.arguments.length < 2) return;
|
|
135
|
+
|
|
136
|
+
// Initialize object mutations collection if not exists
|
|
137
|
+
if (!collections.objectMutations) {
|
|
138
|
+
collections.objectMutations = [];
|
|
139
|
+
}
|
|
140
|
+
const objectMutations = collections.objectMutations as ObjectMutationInfo[];
|
|
141
|
+
|
|
142
|
+
// First argument is target
|
|
143
|
+
const targetArg = callNode.arguments[0];
|
|
144
|
+
let targetName: string;
|
|
145
|
+
|
|
146
|
+
if (targetArg.type === 'Identifier') {
|
|
147
|
+
targetName = targetArg.name;
|
|
148
|
+
} else if (targetArg.type === 'ObjectExpression') {
|
|
149
|
+
targetName = '<anonymous>';
|
|
150
|
+
} else {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const line = callNode.loc?.start.line ?? 0;
|
|
155
|
+
const column = callNode.loc?.start.column ?? 0;
|
|
156
|
+
|
|
157
|
+
for (let i = 1; i < callNode.arguments.length; i++) {
|
|
158
|
+
let arg = callNode.arguments[i];
|
|
159
|
+
let isSpread = false;
|
|
160
|
+
|
|
161
|
+
if (arg.type === 'SpreadElement') {
|
|
162
|
+
isSpread = true;
|
|
163
|
+
arg = arg.argument;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const valueInfo: ObjectMutationValue = {
|
|
167
|
+
valueType: 'EXPRESSION',
|
|
168
|
+
argIndex: i - 1,
|
|
169
|
+
isSpread
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const literalValue = ExpressionEvaluator.extractLiteralValue(arg);
|
|
173
|
+
if (literalValue !== null) {
|
|
174
|
+
valueInfo.valueType = 'LITERAL';
|
|
175
|
+
valueInfo.literalValue = literalValue;
|
|
176
|
+
} else if (arg.type === 'Identifier') {
|
|
177
|
+
valueInfo.valueType = 'VARIABLE';
|
|
178
|
+
valueInfo.valueName = arg.name;
|
|
179
|
+
} else if (arg.type === 'ObjectExpression') {
|
|
180
|
+
valueInfo.valueType = 'OBJECT_LITERAL';
|
|
181
|
+
} else if (arg.type === 'ArrayExpression') {
|
|
182
|
+
valueInfo.valueType = 'ARRAY_LITERAL';
|
|
183
|
+
} else if (arg.type === 'CallExpression') {
|
|
184
|
+
valueInfo.valueType = 'CALL';
|
|
185
|
+
valueInfo.callLine = arg.loc?.start.line;
|
|
186
|
+
valueInfo.callColumn = arg.loc?.start.column;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Capture scope path for scope-aware lookup (REG-309)
|
|
190
|
+
const scopePath = scopeTracker?.getContext().scopePath ?? [];
|
|
191
|
+
|
|
192
|
+
let mutationId: string | undefined;
|
|
193
|
+
if (scopeTracker) {
|
|
194
|
+
const discriminator = scopeTracker.getItemCounter(`OBJECT_MUTATION:Object.assign:${targetName}`);
|
|
195
|
+
mutationId = computeSemanticId('OBJECT_MUTATION', `Object.assign:${targetName}`, scopeTracker.getContext(), { discriminator });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
objectMutations.push({
|
|
199
|
+
id: mutationId,
|
|
200
|
+
objectName: targetName,
|
|
201
|
+
mutationScopePath: scopePath,
|
|
202
|
+
propertyName: '<assign>',
|
|
203
|
+
mutationType: 'assign',
|
|
204
|
+
file: module.file,
|
|
205
|
+
line,
|
|
206
|
+
column,
|
|
207
|
+
value: valueInfo
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectPropertyExtractor — extracts object properties for HAS_PROPERTY edges.
|
|
3
|
+
*
|
|
4
|
+
* Handles nested objects, arrays, literals, variables, calls, and spread properties.
|
|
5
|
+
* Extracted from CallExpressionVisitor.ts (REG-424).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ObjectExpression, ObjectProperty } from '@babel/types';
|
|
9
|
+
import { ExpressionEvaluator } from '../ExpressionEvaluator.js';
|
|
10
|
+
import { ObjectLiteralNode } from '../../../../core/nodes/ObjectLiteralNode.js';
|
|
11
|
+
import { ArrayLiteralNode } from '../../../../core/nodes/ArrayLiteralNode.js';
|
|
12
|
+
import type { VisitorModule, VisitorCollections, CounterRef } from './ASTVisitor.js';
|
|
13
|
+
import type { ScopeTracker } from '../../../../core/ScopeTracker.js';
|
|
14
|
+
import type { ObjectLiteralInfo, ObjectPropertyInfo, ArrayLiteralInfo, ArrayElementInfo, LiteralInfo } from './call-expression-types.js';
|
|
15
|
+
import { ArrayElementExtractor } from './ArrayElementExtractor.js';
|
|
16
|
+
|
|
17
|
+
export class ObjectPropertyExtractor {
|
|
18
|
+
/**
|
|
19
|
+
* Extract object properties and create ObjectPropertyInfo records.
|
|
20
|
+
*
|
|
21
|
+
* Handles nested objects (recursive), nested arrays (delegates to ArrayElementExtractor),
|
|
22
|
+
* literal values, variable references, call expressions, and spread properties.
|
|
23
|
+
*/
|
|
24
|
+
static extract(
|
|
25
|
+
objectExpr: ObjectExpression,
|
|
26
|
+
objectId: string,
|
|
27
|
+
module: VisitorModule,
|
|
28
|
+
objectProperties: ObjectPropertyInfo[],
|
|
29
|
+
objectLiterals: ObjectLiteralInfo[],
|
|
30
|
+
objectLiteralCounterRef: CounterRef,
|
|
31
|
+
literals: LiteralInfo[],
|
|
32
|
+
literalCounterRef: CounterRef,
|
|
33
|
+
collections: VisitorCollections,
|
|
34
|
+
scopeTracker?: ScopeTracker
|
|
35
|
+
): void {
|
|
36
|
+
for (const prop of objectExpr.properties) {
|
|
37
|
+
const propLine = prop.loc?.start.line || 0;
|
|
38
|
+
const propColumn = prop.loc?.start.column || 0;
|
|
39
|
+
|
|
40
|
+
// Handle spread properties: { ...other }
|
|
41
|
+
if (prop.type === 'SpreadElement') {
|
|
42
|
+
const spreadArg = prop.argument;
|
|
43
|
+
const propertyInfo: ObjectPropertyInfo = {
|
|
44
|
+
objectId,
|
|
45
|
+
propertyName: '<spread>',
|
|
46
|
+
valueType: 'SPREAD',
|
|
47
|
+
file: module.file,
|
|
48
|
+
line: propLine,
|
|
49
|
+
column: propColumn
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
if (spreadArg.type === 'Identifier') {
|
|
53
|
+
propertyInfo.valueName = spreadArg.name;
|
|
54
|
+
propertyInfo.valueType = 'VARIABLE';
|
|
55
|
+
// REG-329: Capture scope path for spread variable resolution
|
|
56
|
+
propertyInfo.valueScopePath = scopeTracker?.getContext().scopePath ?? [];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
objectProperties.push(propertyInfo);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Handle regular properties
|
|
64
|
+
if (prop.type === 'ObjectProperty') {
|
|
65
|
+
const objProp = prop as ObjectProperty;
|
|
66
|
+
let propertyName: string;
|
|
67
|
+
|
|
68
|
+
// Get property name
|
|
69
|
+
if (objProp.key.type === 'Identifier') {
|
|
70
|
+
propertyName = objProp.key.name;
|
|
71
|
+
} else if (objProp.key.type === 'StringLiteral') {
|
|
72
|
+
propertyName = objProp.key.value;
|
|
73
|
+
} else if (objProp.key.type === 'NumericLiteral') {
|
|
74
|
+
propertyName = String(objProp.key.value);
|
|
75
|
+
} else {
|
|
76
|
+
propertyName = '<computed>';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const propertyInfo: ObjectPropertyInfo = {
|
|
80
|
+
objectId,
|
|
81
|
+
propertyName,
|
|
82
|
+
file: module.file,
|
|
83
|
+
line: propLine,
|
|
84
|
+
column: propColumn,
|
|
85
|
+
valueType: 'EXPRESSION'
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const value = objProp.value;
|
|
89
|
+
|
|
90
|
+
// Nested object literal - check BEFORE extractLiteralValue
|
|
91
|
+
if (value.type === 'ObjectExpression') {
|
|
92
|
+
// Use factory - do NOT pass argIndex for nested literals (uses 'obj' suffix)
|
|
93
|
+
const nestedObjectNode = ObjectLiteralNode.create(
|
|
94
|
+
module.file,
|
|
95
|
+
value.loc?.start.line || 0,
|
|
96
|
+
value.loc?.start.column || 0,
|
|
97
|
+
{
|
|
98
|
+
counter: objectLiteralCounterRef.value++
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
objectLiterals.push(nestedObjectNode as unknown as ObjectLiteralInfo);
|
|
102
|
+
const nestedObjectId = nestedObjectNode.id;
|
|
103
|
+
|
|
104
|
+
// Recursively extract nested properties
|
|
105
|
+
ObjectPropertyExtractor.extract(
|
|
106
|
+
value,
|
|
107
|
+
nestedObjectId,
|
|
108
|
+
module,
|
|
109
|
+
objectProperties,
|
|
110
|
+
objectLiterals,
|
|
111
|
+
objectLiteralCounterRef,
|
|
112
|
+
literals,
|
|
113
|
+
literalCounterRef,
|
|
114
|
+
collections,
|
|
115
|
+
scopeTracker
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
propertyInfo.valueType = 'OBJECT_LITERAL';
|
|
119
|
+
propertyInfo.nestedObjectId = nestedObjectId;
|
|
120
|
+
propertyInfo.valueNodeId = nestedObjectId;
|
|
121
|
+
}
|
|
122
|
+
// Nested array literal - check BEFORE extractLiteralValue
|
|
123
|
+
else if (value.type === 'ArrayExpression') {
|
|
124
|
+
const arrayLiteralCounterRef = (collections.arrayLiteralCounterRef ?? { value: 0 }) as CounterRef;
|
|
125
|
+
const arrayLiterals = collections.arrayLiterals ?? [];
|
|
126
|
+
const arrayElements = collections.arrayElements ?? [];
|
|
127
|
+
|
|
128
|
+
// Use factory - do NOT pass argIndex for nested literals (uses 'arr' suffix)
|
|
129
|
+
const nestedArrayNode = ArrayLiteralNode.create(
|
|
130
|
+
module.file,
|
|
131
|
+
value.loc?.start.line || 0,
|
|
132
|
+
value.loc?.start.column || 0,
|
|
133
|
+
{
|
|
134
|
+
counter: arrayLiteralCounterRef.value++
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
(arrayLiterals as ArrayLiteralInfo[]).push(nestedArrayNode as unknown as ArrayLiteralInfo);
|
|
138
|
+
const nestedArrayId = nestedArrayNode.id;
|
|
139
|
+
|
|
140
|
+
// Recursively extract array elements
|
|
141
|
+
ArrayElementExtractor.extract(
|
|
142
|
+
value,
|
|
143
|
+
nestedArrayId,
|
|
144
|
+
module,
|
|
145
|
+
arrayElements as ArrayElementInfo[],
|
|
146
|
+
arrayLiterals as ArrayLiteralInfo[],
|
|
147
|
+
arrayLiteralCounterRef,
|
|
148
|
+
objectLiterals,
|
|
149
|
+
objectLiteralCounterRef,
|
|
150
|
+
objectProperties,
|
|
151
|
+
literals,
|
|
152
|
+
literalCounterRef,
|
|
153
|
+
collections,
|
|
154
|
+
scopeTracker
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
propertyInfo.valueType = 'ARRAY_LITERAL';
|
|
158
|
+
propertyInfo.nestedArrayId = nestedArrayId;
|
|
159
|
+
propertyInfo.valueNodeId = nestedArrayId;
|
|
160
|
+
}
|
|
161
|
+
// Literal value (primitives only - objects/arrays handled above)
|
|
162
|
+
else {
|
|
163
|
+
const literalValue = ExpressionEvaluator.extractLiteralValue(value);
|
|
164
|
+
// Handle both non-null literals AND explicit null literals (NullLiteral)
|
|
165
|
+
if (literalValue !== null || value.type === 'NullLiteral') {
|
|
166
|
+
const literalId = `LITERAL#${propertyName}#${module.file}#${propLine}:${propColumn}:${literalCounterRef.value++}`;
|
|
167
|
+
literals.push({
|
|
168
|
+
id: literalId,
|
|
169
|
+
type: 'LITERAL',
|
|
170
|
+
value: literalValue,
|
|
171
|
+
valueType: typeof literalValue,
|
|
172
|
+
file: module.file,
|
|
173
|
+
line: propLine,
|
|
174
|
+
column: propColumn,
|
|
175
|
+
parentCallId: objectId,
|
|
176
|
+
argIndex: 0
|
|
177
|
+
});
|
|
178
|
+
propertyInfo.valueType = 'LITERAL';
|
|
179
|
+
propertyInfo.valueNodeId = literalId;
|
|
180
|
+
propertyInfo.literalValue = literalValue;
|
|
181
|
+
}
|
|
182
|
+
// Variable reference
|
|
183
|
+
else if (value.type === 'Identifier') {
|
|
184
|
+
propertyInfo.valueType = 'VARIABLE';
|
|
185
|
+
propertyInfo.valueName = value.name;
|
|
186
|
+
// REG-329: Capture scope path for scope-aware variable resolution
|
|
187
|
+
propertyInfo.valueScopePath = scopeTracker?.getContext().scopePath ?? [];
|
|
188
|
+
}
|
|
189
|
+
// Call expression
|
|
190
|
+
else if (value.type === 'CallExpression') {
|
|
191
|
+
propertyInfo.valueType = 'CALL';
|
|
192
|
+
propertyInfo.callLine = value.loc?.start.line;
|
|
193
|
+
propertyInfo.callColumn = value.loc?.start.column;
|
|
194
|
+
}
|
|
195
|
+
// Other expressions
|
|
196
|
+
else {
|
|
197
|
+
propertyInfo.valueType = 'EXPRESSION';
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
objectProperties.push(propertyInfo);
|
|
202
|
+
}
|
|
203
|
+
// Handle object methods: { foo() {} }
|
|
204
|
+
else if (prop.type === 'ObjectMethod') {
|
|
205
|
+
const propertyName = prop.key.type === 'Identifier' ? prop.key.name : '<computed>';
|
|
206
|
+
objectProperties.push({
|
|
207
|
+
objectId,
|
|
208
|
+
propertyName,
|
|
209
|
+
valueType: 'EXPRESSION',
|
|
210
|
+
file: module.file,
|
|
211
|
+
line: propLine,
|
|
212
|
+
column: propColumn
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|