UNPKG

@re-shell/cli

Version:

Full-stack development platform uniting microservices and microfrontends. Build complete applications with .NET (ASP.NET Core Web API, Minimal API), Java (Spring Boot, Quarkus, Micronaut, Vert.x), Rust (Actix-Web, Warp, Rocket, Axum), Python (FastAPI, Dja

89 lines (88 loc) 2.92 kB
export interface WorkspaceInfo { name: string; path: string; type: 'app' | 'package' | 'lib' | 'tool'; dependencies: string[]; devDependencies: string[]; framework?: string; buildScript?: string; testScript?: string; } export interface ImpactAnalysisResult { changedFiles: string[]; affectedWorkspaces: WorkspaceInfo[]; buildOrder: string[]; testOrder: string[]; totalImpact: number; criticalPath: string[]; recommendations: string[]; analysisTime: number; } export interface ChangeImpactOptions { maxDepth: number; includeTests: boolean; includeDevDependencies: boolean; buildOptimization: boolean; parallelAnalysis: boolean; } export interface DependencyGraph { nodes: Map<string, WorkspaceInfo>; edges: Map<string, string[]>; reverseEdges: Map<string, string[]>; } export interface ImpactRule { pattern: RegExp; affects: string[]; severity: 'low' | 'medium' | 'high' | 'critical'; action: 'rebuild' | 'test' | 'lint' | 'deploy'; description: string; } export declare class ChangeImpactAnalyzer { private rootPath; private dependencyGraph; private changeDetector; private impactRules; private options; constructor(rootPath: string, options?: Partial<ChangeImpactOptions>); initialize(): Promise<void>; analyzeChangeImpact(changedFiles?: string[]): Promise<ImpactAnalysisResult>; analyzeFileImpact(filePath: string): Promise<{ file: string; workspaces: string[]; severity: 'low' | 'medium' | 'high' | 'critical'; rules: ImpactRule[]; }>; getImpactVisualization(changedFiles: string[]): Promise<{ nodes: Array<{ id: string; label: string; type: string; affected: boolean; }>; edges: Array<{ from: string; to: string; type: string; }>; legend: Record<string, string>; }>; private buildDependencyGraph; private discoverWorkspaces; private extractWorkspaceDependencies; private inferWorkspaceType; private detectFramework; private findFileOwnerWorkspace; private findDependentWorkspaces; private calculateBuildOrder; private calculateTestOrder; private findCriticalPath; private generateRecommendations; private getDefaultImpactRules; private severityLevel; addImpactRule(rule: ImpactRule): void; getDependencyGraph(): DependencyGraph; getWorkspaceInfo(name: string): WorkspaceInfo | undefined; getAllWorkspaces(): WorkspaceInfo[]; } export declare function createChangeImpactAnalyzer(rootPath: string, options?: Partial<ChangeImpactOptions>): Promise<ChangeImpactAnalyzer>; export declare function analyzeChangeImpact(rootPath: string, changedFiles?: string[], options?: Partial<ChangeImpactOptions>): Promise<ImpactAnalysisResult>;