@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
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MethodCallErrorAnalysis - Error analysis and suggestion generation.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from MethodCallResolver.ts (REG-463).
|
|
5
|
+
* Free functions that analyze resolution failures and generate
|
|
6
|
+
* context-aware suggestions for strict mode error reporting (REG-332).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { ResolutionStep, ResolutionFailureReason } from '../../../errors/GrafemaError.js';
|
|
10
|
+
import { LIBRARY_SEMANTIC_GROUPS } from './MethodCallData.js';
|
|
11
|
+
import type { MethodCallNode, ClassEntry } from './MethodCallData.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Analyze why method resolution failed (REG-332).
|
|
15
|
+
* Returns the failure reason and resolution chain for context-aware suggestions.
|
|
16
|
+
*/
|
|
17
|
+
export function analyzeResolutionFailure(
|
|
18
|
+
methodCall: MethodCallNode,
|
|
19
|
+
classMethodIndex: Map<string, ClassEntry>,
|
|
20
|
+
_variableTypes: Map<string, string>
|
|
21
|
+
): { reason: ResolutionFailureReason; chain: ResolutionStep[] } {
|
|
22
|
+
const { object, method, file } = methodCall;
|
|
23
|
+
const chain: ResolutionStep[] = [];
|
|
24
|
+
|
|
25
|
+
if (!object || !method) {
|
|
26
|
+
return { reason: 'unknown', chain };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Check if object is a known class name (static call)
|
|
30
|
+
if (classMethodIndex.has(object)) {
|
|
31
|
+
const classEntry = classMethodIndex.get(object)!;
|
|
32
|
+
chain.push({
|
|
33
|
+
step: `${object} class lookup`,
|
|
34
|
+
result: 'found',
|
|
35
|
+
file: classEntry.classNode.file as string | undefined,
|
|
36
|
+
line: classEntry.classNode.line as number | undefined,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
if (!classEntry.methods.has(method)) {
|
|
40
|
+
chain.push({
|
|
41
|
+
step: `${object}.${method} method`,
|
|
42
|
+
result: 'NOT FOUND in class',
|
|
43
|
+
});
|
|
44
|
+
return { reason: 'method_not_found', chain };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Check for local class in same file
|
|
49
|
+
const localKey = `${file}:${object}`;
|
|
50
|
+
if (classMethodIndex.has(localKey)) {
|
|
51
|
+
const classEntry = classMethodIndex.get(localKey)!;
|
|
52
|
+
chain.push({
|
|
53
|
+
step: `${object} local class`,
|
|
54
|
+
result: 'found in same file',
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
if (!classEntry.methods.has(method)) {
|
|
58
|
+
chain.push({
|
|
59
|
+
step: `${object}.${method} method`,
|
|
60
|
+
result: 'NOT FOUND',
|
|
61
|
+
});
|
|
62
|
+
return { reason: 'method_not_found', chain };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Check if this is a library call
|
|
67
|
+
if (LIBRARY_SEMANTIC_GROUPS[object]) {
|
|
68
|
+
const libInfo = LIBRARY_SEMANTIC_GROUPS[object];
|
|
69
|
+
chain.push({
|
|
70
|
+
step: `${object} lookup`,
|
|
71
|
+
result: `external library (${libInfo.semantic})`,
|
|
72
|
+
});
|
|
73
|
+
return { reason: 'external_dependency', chain };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Object type is unknown
|
|
77
|
+
chain.push({
|
|
78
|
+
step: `${object} type lookup`,
|
|
79
|
+
result: 'unknown (not in class index)',
|
|
80
|
+
});
|
|
81
|
+
chain.push({
|
|
82
|
+
step: `${object}.${method}`,
|
|
83
|
+
result: 'FAILED (no type information)',
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
return { reason: 'unknown_object_type', chain };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Generate context-aware suggestion based on failure reason (REG-332).
|
|
91
|
+
*/
|
|
92
|
+
export function generateContextualSuggestion(
|
|
93
|
+
object: string,
|
|
94
|
+
method: string,
|
|
95
|
+
reason: ResolutionFailureReason,
|
|
96
|
+
chain: ResolutionStep[]
|
|
97
|
+
): string {
|
|
98
|
+
switch (reason) {
|
|
99
|
+
case 'unknown_object_type': {
|
|
100
|
+
// Find the source in chain that shows "unknown"
|
|
101
|
+
const sourceStep = chain.find(s => s.result.includes('unknown'));
|
|
102
|
+
const sourceDesc = sourceStep?.step || 'the source';
|
|
103
|
+
return `Variable "${object}" has unknown type from ${sourceDesc}. ` +
|
|
104
|
+
`Add JSDoc: /** @type {${object}Class} */ or check imports.`;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
case 'class_not_imported':
|
|
108
|
+
return `Class "${object}" is not imported. Check your imports or ensure the class is defined.`;
|
|
109
|
+
|
|
110
|
+
case 'method_not_found':
|
|
111
|
+
return `Class "${object}" exists but has no method "${method}". ` +
|
|
112
|
+
`Check spelling or verify the method is defined in the class.`;
|
|
113
|
+
|
|
114
|
+
case 'external_dependency': {
|
|
115
|
+
const libInfo = LIBRARY_SEMANTIC_GROUPS[object];
|
|
116
|
+
if (libInfo?.suggestedPlugin) {
|
|
117
|
+
return `This call is to external library "${object}" (${libInfo.semantic}). ` +
|
|
118
|
+
`Consider using ${libInfo.suggestedPlugin} for semantic analysis.`;
|
|
119
|
+
}
|
|
120
|
+
return `This call is to external library "${object}". ` +
|
|
121
|
+
`Consider adding type stubs or a dedicated analyzer plugin.`;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
case 'circular_reference':
|
|
125
|
+
return `Alias chain for "${object}" is too deep (possible cycle). ` +
|
|
126
|
+
`Simplify variable assignments or check for circular references.`;
|
|
127
|
+
|
|
128
|
+
default:
|
|
129
|
+
return `Check if class "${object}" is imported and has method "${method}".`;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MethodCallIndexers - Index-building functions for method call resolution.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from MethodCallResolver.ts (REG-463).
|
|
5
|
+
* Free functions that build class-method and variable-type indexes from the graph.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { PluginContext } from '../../Plugin.js';
|
|
9
|
+
import type { Logger } from '@grafema/types';
|
|
10
|
+
import type { ClassEntry } from './MethodCallData.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Builds an index of classes and their methods for fast lookup.
|
|
14
|
+
* Each class is indexed by name and by file:name for local resolution.
|
|
15
|
+
*/
|
|
16
|
+
export async function buildClassMethodIndex(
|
|
17
|
+
graph: PluginContext['graph'],
|
|
18
|
+
logger: Logger
|
|
19
|
+
): Promise<Map<string, ClassEntry>> {
|
|
20
|
+
const index = new Map<string, ClassEntry>();
|
|
21
|
+
const startTime = Date.now();
|
|
22
|
+
let classCount = 0;
|
|
23
|
+
|
|
24
|
+
for await (const classNode of graph.queryNodes({ nodeType: 'CLASS' })) {
|
|
25
|
+
classCount++;
|
|
26
|
+
if (classCount % 50 === 0) {
|
|
27
|
+
logger.debug('Indexing classes', { count: classCount });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const className = classNode.name as string;
|
|
31
|
+
if (!className) continue;
|
|
32
|
+
|
|
33
|
+
const classEntry: ClassEntry = {
|
|
34
|
+
classNode,
|
|
35
|
+
methods: new Map()
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const containsEdges = await graph.getOutgoingEdges(classNode.id, ['CONTAINS']);
|
|
39
|
+
for (const edge of containsEdges) {
|
|
40
|
+
const childNode = await graph.getNode(edge.dst);
|
|
41
|
+
if (childNode && (childNode.type === 'METHOD' || childNode.type === 'FUNCTION')) {
|
|
42
|
+
if (childNode.name) {
|
|
43
|
+
classEntry.methods.set(childNode.name as string, childNode);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
index.set(className, classEntry);
|
|
49
|
+
|
|
50
|
+
// Also index by file for local resolution
|
|
51
|
+
const fileKey = `${classNode.file}:${className}`;
|
|
52
|
+
index.set(fileKey, classEntry);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const totalTime = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
56
|
+
logger.debug('Indexed class entries', { count: index.size, time: `${totalTime}s` });
|
|
57
|
+
|
|
58
|
+
return index;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Builds an index of variables and their types (from INSTANCE_OF edges).
|
|
63
|
+
*/
|
|
64
|
+
export async function buildVariableTypeIndex(
|
|
65
|
+
graph: PluginContext['graph'],
|
|
66
|
+
logger: Logger
|
|
67
|
+
): Promise<Map<string, string>> {
|
|
68
|
+
const startTime = Date.now();
|
|
69
|
+
const index = new Map<string, string>();
|
|
70
|
+
|
|
71
|
+
for await (const classNode of graph.queryNodes({ nodeType: 'CLASS' })) {
|
|
72
|
+
if (!classNode.name) continue;
|
|
73
|
+
|
|
74
|
+
const incomingEdges = await graph.getIncomingEdges(classNode.id, ['INSTANCE_OF']);
|
|
75
|
+
for (const edge of incomingEdges) {
|
|
76
|
+
index.set(edge.src.toString(), classNode.name as string);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
81
|
+
logger.debug('Built variable type index', { entries: index.size, time: `${elapsed}s` });
|
|
82
|
+
return index;
|
|
83
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MethodCallResolution - Core resolution logic for method calls.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from MethodCallResolver.ts (REG-463).
|
|
5
|
+
* Free functions that resolve method calls to their definitions
|
|
6
|
+
* by searching class indexes, variable types, and inheritance chains.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { PluginContext } from '../../Plugin.js';
|
|
10
|
+
import type { BaseNodeRecord } from '@grafema/types';
|
|
11
|
+
import type { MethodCallNode, ClassEntry } from './MethodCallData.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Attempts to resolve a method call to its definition.
|
|
15
|
+
*
|
|
16
|
+
* Resolution strategy (in order):
|
|
17
|
+
* 1. Direct class name match (static call)
|
|
18
|
+
* 2. Local class in same file
|
|
19
|
+
* 3. "this" reference to containing class
|
|
20
|
+
* 4. Variable type index (INSTANCE_OF)
|
|
21
|
+
*/
|
|
22
|
+
export async function resolveMethodCall(
|
|
23
|
+
methodCall: MethodCallNode,
|
|
24
|
+
classMethodIndex: Map<string, ClassEntry>,
|
|
25
|
+
variableTypes: Map<string, string>,
|
|
26
|
+
graph: PluginContext['graph'],
|
|
27
|
+
containingClassCache: Map<string, BaseNodeRecord | null>
|
|
28
|
+
): Promise<BaseNodeRecord | null> {
|
|
29
|
+
const { object, method, file } = methodCall;
|
|
30
|
+
|
|
31
|
+
if (!object || !method) return null;
|
|
32
|
+
|
|
33
|
+
// 1. Check if object is a class name directly (static call)
|
|
34
|
+
if (classMethodIndex.has(object)) {
|
|
35
|
+
const classEntry = classMethodIndex.get(object)!;
|
|
36
|
+
if (classEntry.methods.has(method)) {
|
|
37
|
+
return classEntry.methods.get(method)!;
|
|
38
|
+
}
|
|
39
|
+
// REG-400: Check parent classes via DERIVES_FROM chain
|
|
40
|
+
const inherited = await findMethodInParentClasses(
|
|
41
|
+
classEntry.classNode, method, classMethodIndex, graph
|
|
42
|
+
);
|
|
43
|
+
if (inherited) return inherited;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 2. Check local class in same file
|
|
47
|
+
const localKey = `${file}:${object}`;
|
|
48
|
+
if (classMethodIndex.has(localKey)) {
|
|
49
|
+
const classEntry = classMethodIndex.get(localKey)!;
|
|
50
|
+
if (classEntry.methods.has(method)) {
|
|
51
|
+
return classEntry.methods.get(method)!;
|
|
52
|
+
}
|
|
53
|
+
// REG-400: Check parent classes via DERIVES_FROM chain
|
|
54
|
+
const inherited = await findMethodInParentClasses(
|
|
55
|
+
classEntry.classNode, method, classMethodIndex, graph
|
|
56
|
+
);
|
|
57
|
+
if (inherited) return inherited;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 3. Check if object is "this" (reference to containing class)
|
|
61
|
+
if (object === 'this') {
|
|
62
|
+
let containingClass = containingClassCache.get(methodCall.id);
|
|
63
|
+
if (containingClass === undefined) {
|
|
64
|
+
containingClass = await findContainingClass(methodCall, graph);
|
|
65
|
+
containingClassCache.set(methodCall.id, containingClass);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (containingClass && classMethodIndex.has(containingClass.name as string)) {
|
|
69
|
+
const classEntry = classMethodIndex.get(containingClass.name as string)!;
|
|
70
|
+
if (classEntry.methods.has(method)) {
|
|
71
|
+
return classEntry.methods.get(method)!;
|
|
72
|
+
}
|
|
73
|
+
// REG-400: Check parent classes via DERIVES_FROM chain
|
|
74
|
+
const inherited = await findMethodInParentClasses(
|
|
75
|
+
classEntry.classNode, method, classMethodIndex, graph
|
|
76
|
+
);
|
|
77
|
+
if (inherited) return inherited;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// 4. Use variableTypes index
|
|
82
|
+
for (const [, className] of variableTypes.entries()) {
|
|
83
|
+
if (className && classMethodIndex.has(className)) {
|
|
84
|
+
const classEntry = classMethodIndex.get(className)!;
|
|
85
|
+
if (classEntry.methods.has(method)) {
|
|
86
|
+
return classEntry.methods.get(method)!;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* REG-400: Walk DERIVES_FROM inheritance chain to find inherited methods.
|
|
96
|
+
* Used when method is not found on the direct class.
|
|
97
|
+
*/
|
|
98
|
+
export async function findMethodInParentClasses(
|
|
99
|
+
classNode: BaseNodeRecord,
|
|
100
|
+
methodName: string,
|
|
101
|
+
classMethodIndex: Map<string, ClassEntry>,
|
|
102
|
+
graph: PluginContext['graph'],
|
|
103
|
+
maxDepth: number = 5,
|
|
104
|
+
visited: Set<string> = new Set()
|
|
105
|
+
): Promise<BaseNodeRecord | null> {
|
|
106
|
+
if (maxDepth <= 0) return null;
|
|
107
|
+
if (visited.has(classNode.id.toString())) return null;
|
|
108
|
+
visited.add(classNode.id.toString());
|
|
109
|
+
|
|
110
|
+
const derivesFromEdges = await graph.getOutgoingEdges(classNode.id, ['DERIVES_FROM']);
|
|
111
|
+
|
|
112
|
+
for (const edge of derivesFromEdges) {
|
|
113
|
+
const parentClass = await graph.getNode(edge.dst);
|
|
114
|
+
if (!parentClass || !parentClass.name) continue;
|
|
115
|
+
|
|
116
|
+
const parentEntry = classMethodIndex.get(parentClass.name as string);
|
|
117
|
+
if (parentEntry && parentEntry.methods.has(methodName)) {
|
|
118
|
+
return parentEntry.methods.get(methodName)!;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Recurse up the chain
|
|
122
|
+
const found = await findMethodInParentClasses(
|
|
123
|
+
parentClass, methodName, classMethodIndex, graph, maxDepth - 1, visited
|
|
124
|
+
);
|
|
125
|
+
if (found) return found;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Finds the class containing a given method call by traversing CONTAINS edges upward.
|
|
133
|
+
*/
|
|
134
|
+
export async function findContainingClass(
|
|
135
|
+
methodCall: MethodCallNode,
|
|
136
|
+
graph: PluginContext['graph']
|
|
137
|
+
): Promise<BaseNodeRecord | null> {
|
|
138
|
+
const incomingEdges = await graph.getIncomingEdges(methodCall.id, ['CONTAINS']);
|
|
139
|
+
|
|
140
|
+
for (const edge of incomingEdges) {
|
|
141
|
+
const parentNode = await graph.getNode(edge.src);
|
|
142
|
+
if (!parentNode) continue;
|
|
143
|
+
|
|
144
|
+
if (parentNode.type === 'CLASS') {
|
|
145
|
+
return parentNode;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const found = await findContainingClassRecursive(parentNode, graph, new Set());
|
|
149
|
+
if (found) return found;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Recursively traverses CONTAINS edges upward to find a CLASS ancestor.
|
|
157
|
+
*/
|
|
158
|
+
async function findContainingClassRecursive(
|
|
159
|
+
node: BaseNodeRecord,
|
|
160
|
+
graph: PluginContext['graph'],
|
|
161
|
+
visited: Set<string>
|
|
162
|
+
): Promise<BaseNodeRecord | null> {
|
|
163
|
+
if (visited.has(node.id.toString())) return null;
|
|
164
|
+
visited.add(node.id.toString());
|
|
165
|
+
|
|
166
|
+
const incomingEdges = await graph.getIncomingEdges(node.id, ['CONTAINS']);
|
|
167
|
+
|
|
168
|
+
for (const edge of incomingEdges) {
|
|
169
|
+
const parentNode = await graph.getNode(edge.src);
|
|
170
|
+
if (!parentNode) continue;
|
|
171
|
+
|
|
172
|
+
if (parentNode.type === 'CLASS') {
|
|
173
|
+
return parentNode;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const found = await findContainingClassRecursive(parentNode, graph, visited);
|
|
177
|
+
if (found) return found;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
@@ -13,7 +13,7 @@ import type { NodePath } from '@babel/traverse';
|
|
|
13
13
|
import type { ImportDeclaration, CallExpression, Identifier } from '@babel/types';
|
|
14
14
|
import { Plugin, createSuccessResult, createErrorResult } from '../Plugin.js';
|
|
15
15
|
import type { PluginContext, PluginResult, PluginMetadata } from '../Plugin.js';
|
|
16
|
-
import
|
|
16
|
+
import { NodeFactory } from '../../core/NodeFactory.js';
|
|
17
17
|
import { resolveModulePath } from '../../utils/moduleResolution.js';
|
|
18
18
|
|
|
19
19
|
|
|
@@ -176,15 +176,10 @@ export class IncrementalModuleIndexer extends Plugin {
|
|
|
176
176
|
const relativePath = context.rootPrefix
|
|
177
177
|
? `${context.rootPrefix}/${baseRelativePath}`
|
|
178
178
|
: baseRelativePath;
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
type: 'MODULE',
|
|
184
|
-
name: relativePath,
|
|
185
|
-
file: file,
|
|
186
|
-
contentHash: fileHash
|
|
187
|
-
} as unknown as NodeRecord;
|
|
179
|
+
const moduleNode = NodeFactory.createModuleWithContext(
|
|
180
|
+
{ file: relativePath, scopePath: [] },
|
|
181
|
+
{ contentHash: fileHash || '' }
|
|
182
|
+
);
|
|
188
183
|
|
|
189
184
|
await graph.addNode(moduleNode);
|
|
190
185
|
nodesCreated++;
|
|
@@ -8,6 +8,7 @@ import { join, resolve, dirname, relative, basename } from 'path';
|
|
|
8
8
|
import { createHash } from 'crypto';
|
|
9
9
|
import { minimatch } from 'minimatch';
|
|
10
10
|
import { Plugin, createErrorResult } from '../Plugin.js';
|
|
11
|
+
import { NodeFactory } from '../../core/NodeFactory.js';
|
|
11
12
|
import type { PluginContext, PluginResult, PluginMetadata } from '../Plugin.js';
|
|
12
13
|
// @ts-expect-error - no type declarations for node-source-walk
|
|
13
14
|
import Walker from 'node-source-walk';
|
|
@@ -85,7 +86,7 @@ export class JSModuleIndexer extends Plugin {
|
|
|
85
86
|
constructor() {
|
|
86
87
|
super();
|
|
87
88
|
this.walker = new Walker({
|
|
88
|
-
plugins: ['jsx', 'typescript']
|
|
89
|
+
plugins: ['jsx', 'typescript', 'decorators-legacy']
|
|
89
90
|
});
|
|
90
91
|
this.cache = new Map(); // Кеш зависимостей файла
|
|
91
92
|
this.testPatterns = DEFAULT_TEST_PATTERNS;
|
|
@@ -282,10 +283,15 @@ export class JSModuleIndexer extends Plugin {
|
|
|
282
283
|
const entrypoint = service.metadata?.entrypoint || service.path;
|
|
283
284
|
|
|
284
285
|
// Резолвим entrypoint относительно projectPath
|
|
285
|
-
const
|
|
286
|
+
const rawEntrypoint = entrypoint.startsWith('/')
|
|
286
287
|
? entrypoint
|
|
287
288
|
: join(projectPath, entrypoint);
|
|
288
289
|
|
|
290
|
+
// Resolve entrypoint to actual file (handles .js → .ts redirect, REG-427)
|
|
291
|
+
const absoluteEntrypoint = existsSync(rawEntrypoint)
|
|
292
|
+
? rawEntrypoint
|
|
293
|
+
: (resolveModulePathUtil(rawEntrypoint, { useFilesystem: true }) ?? rawEntrypoint);
|
|
294
|
+
|
|
289
295
|
logger.info('Building dependency tree', { service: service.name });
|
|
290
296
|
|
|
291
297
|
// DFS через стек (как в file2host.js)
|
|
@@ -321,9 +327,8 @@ export class JSModuleIndexer extends Plugin {
|
|
|
321
327
|
onProgress({
|
|
322
328
|
phase: 'indexing',
|
|
323
329
|
currentPlugin: 'JSModuleIndexer',
|
|
324
|
-
message: `${service.name}:
|
|
325
|
-
|
|
326
|
-
currentService: service.name
|
|
330
|
+
message: `${service.name}: ${visited.size} modules`,
|
|
331
|
+
currentService: service.name,
|
|
327
332
|
});
|
|
328
333
|
lastProgressReport = visited.size;
|
|
329
334
|
}
|
|
@@ -365,19 +370,12 @@ export class JSModuleIndexer extends Plugin {
|
|
|
365
370
|
const relativePath = context.rootPrefix
|
|
366
371
|
? `${context.rootPrefix}/${baseRelativePath}`
|
|
367
372
|
: baseRelativePath;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
// Construct MODULE node manually to preserve absolute file path for analyzers
|
|
373
|
+
// Create MODULE node via NodeFactory for proper branding
|
|
371
374
|
const isTest = this.isTestFile(currentFile);
|
|
372
|
-
const moduleNode =
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
file: currentFile, // Keep absolute path for file reading in analyzers
|
|
377
|
-
line: 0,
|
|
378
|
-
contentHash: fileHash || '',
|
|
379
|
-
isTest
|
|
380
|
-
};
|
|
375
|
+
const moduleNode = NodeFactory.createModuleWithContext(
|
|
376
|
+
{ file: relativePath, scopePath: [] },
|
|
377
|
+
{ contentHash: fileHash || '', isTest }
|
|
378
|
+
);
|
|
381
379
|
const moduleId = moduleNode.id;
|
|
382
380
|
|
|
383
381
|
logger.debug('Creating MODULE node', { moduleId: moduleNode.id });
|
|
@@ -448,10 +446,8 @@ export class JSModuleIndexer extends Plugin {
|
|
|
448
446
|
onProgress({
|
|
449
447
|
phase: 'indexing',
|
|
450
448
|
currentPlugin: 'JSModuleIndexer',
|
|
451
|
-
message: `${service.name}:
|
|
452
|
-
|
|
453
|
-
processedFiles: visited.size,
|
|
454
|
-
currentService: service.name
|
|
449
|
+
message: `${service.name}: ${visited.size} modules`,
|
|
450
|
+
currentService: service.name,
|
|
455
451
|
});
|
|
456
452
|
}
|
|
457
453
|
|
|
@@ -8,7 +8,7 @@ import { resolve, relative, basename, join } from 'path';
|
|
|
8
8
|
import { createHash } from 'crypto';
|
|
9
9
|
import { Plugin, createSuccessResult } from '../Plugin.js';
|
|
10
10
|
import type { PluginContext, PluginResult, PluginMetadata } from '../Plugin.js';
|
|
11
|
-
import
|
|
11
|
+
import { NodeFactory } from '../../core/NodeFactory.js';
|
|
12
12
|
|
|
13
13
|
// Test file patterns for Rust
|
|
14
14
|
const RUST_TEST_PATTERNS: RegExp[] = [
|
|
@@ -126,18 +126,19 @@ export class RustModuleIndexer extends Plugin {
|
|
|
126
126
|
const prefixedPath = context.rootPrefix
|
|
127
127
|
? `${context.rootPrefix}/${baseRelativePath}`
|
|
128
128
|
: baseRelativePath;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
129
|
+
|
|
130
|
+
const node = NodeFactory.createRustModule(
|
|
131
|
+
moduleName,
|
|
132
|
+
filePath,
|
|
133
|
+
hash,
|
|
134
|
+
prefixedPath,
|
|
135
|
+
{
|
|
136
|
+
isLib: basename(filePath) === 'lib.rs',
|
|
137
|
+
isMod: basename(filePath) === 'mod.rs',
|
|
138
|
+
isTest: this.isTestFile(filePath),
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
await graph.addNode(node);
|
|
141
142
|
|
|
142
143
|
nodesCreated++;
|
|
143
144
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AwaitInLoopValidator — detects sequential await in loops (REG-298)
|
|
3
|
+
*
|
|
4
|
+
* Performance issue: sequential `await` in a loop processes items one at a time
|
|
5
|
+
* when they could often be parallelized with `Promise.all()`.
|
|
6
|
+
*
|
|
7
|
+
* Detection: CALL nodes with `isAwaited=true AND isInsideLoop=true`
|
|
8
|
+
* (forward-registered during AST walk via `controlFlowState.loopDepth`).
|
|
9
|
+
*
|
|
10
|
+
* Creates `issue:performance` ISSUE nodes with AFFECTS edges to flagged calls.
|
|
11
|
+
*
|
|
12
|
+
* Datalog equivalent:
|
|
13
|
+
* await_in_loop(Call) :-
|
|
14
|
+
* node(Call, "CALL"),
|
|
15
|
+
* attr(Call, "isAwaited", true),
|
|
16
|
+
* attr(Call, "isInsideLoop", true).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { Plugin, createSuccessResult } from '../Plugin.js';
|
|
20
|
+
import type { PluginContext, PluginResult, PluginMetadata } from '../Plugin.js';
|
|
21
|
+
|
|
22
|
+
interface CallNode {
|
|
23
|
+
id: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
file?: string;
|
|
26
|
+
line?: number;
|
|
27
|
+
column?: number;
|
|
28
|
+
isAwaited?: boolean;
|
|
29
|
+
isInsideLoop?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class AwaitInLoopValidator extends Plugin {
|
|
33
|
+
get metadata(): PluginMetadata {
|
|
34
|
+
return {
|
|
35
|
+
name: 'AwaitInLoopValidator',
|
|
36
|
+
phase: 'VALIDATION',
|
|
37
|
+
dependencies: ['JSASTAnalyzer'],
|
|
38
|
+
creates: {
|
|
39
|
+
nodes: ['ISSUE'],
|
|
40
|
+
edges: ['AFFECTS']
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async execute(context: PluginContext): Promise<PluginResult> {
|
|
46
|
+
const { graph } = context;
|
|
47
|
+
const logger = this.log(context);
|
|
48
|
+
|
|
49
|
+
logger.info('Starting await-in-loop detection');
|
|
50
|
+
|
|
51
|
+
let issueCount = 0;
|
|
52
|
+
|
|
53
|
+
for await (const node of graph.queryNodes({ nodeType: 'CALL' })) {
|
|
54
|
+
const call = node as unknown as CallNode;
|
|
55
|
+
|
|
56
|
+
if (call.isAwaited && call.isInsideLoop) {
|
|
57
|
+
const callName = call.name || 'unknown';
|
|
58
|
+
const location = `${call.file}:${call.line || '?'}`;
|
|
59
|
+
|
|
60
|
+
if (context.reportIssue) {
|
|
61
|
+
await context.reportIssue({
|
|
62
|
+
category: 'performance',
|
|
63
|
+
severity: 'warning',
|
|
64
|
+
message: `Sequential await in loop at ${location} — consider Promise.all() for parallel execution`,
|
|
65
|
+
file: call.file || '',
|
|
66
|
+
line: call.line || 0,
|
|
67
|
+
column: call.column || 0,
|
|
68
|
+
targetNodeId: call.id,
|
|
69
|
+
context: {
|
|
70
|
+
type: 'AWAIT_IN_LOOP',
|
|
71
|
+
callName,
|
|
72
|
+
suggestion: 'Promise.all'
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
issueCount++;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (issueCount > 0) {
|
|
81
|
+
logger.info('Sequential await-in-loop issues found', { count: issueCount });
|
|
82
|
+
} else {
|
|
83
|
+
logger.info('No await-in-loop issues found');
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return createSuccessResult(
|
|
87
|
+
{ nodes: issueCount, edges: issueCount },
|
|
88
|
+
{ issueCount }
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
}
|