sicua
Version:
A tool for analyzing project structure and dependencies
32 lines (31 loc) • 1.62 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComponentAnalyzer = void 0;
const dependencyGraph_1 = require("./analysis/dependencyGraph");
const circularDependencies_1 = require("./analysis/circularDependencies");
const zombieClusters_1 = require("./analysis/zombieClusters");
const packageDependencies_1 = require("./analysis/packageDependencies");
class ComponentAnalyzer {
constructor(components, config, lookupService, pathResolver) {
this.components = components;
this.config = config;
this.lookupService = lookupService;
this.pathResolver = pathResolver;
}
async analyze() {
// Build dependency graph using shared optimized lookups
const graph = (0, dependencyGraph_1.buildDependencyGraph)(this.components, this.lookupService);
// Analyze package dependencies using shared optimized path resolution
const dependencyAnalysis = await (0, packageDependencies_1.analyzeDependencies)(this.components, this.config, this.pathResolver);
// Detect circular dependencies using shared optimized component lookups
const circularDependencies = (0, circularDependencies_1.detectCircularDependencies)(graph, this.lookupService);
// Detect zombie clusters using shared optimized component lookups
const zombieClusters = (0, zombieClusters_1.detectZombieComponentClusters)(this.components, this.lookupService);
return {
circularDependencies,
zombieClusters,
dependencyAnalysis,
};
}
}
exports.ComponentAnalyzer = ComponentAnalyzer;