/** * @angular-modernizer/plugin-angular - Architecture Types * * Type definitions for architectural analysis and dependency management. */ export interface DependencyNode { /** Module/file path */ path: string; /** Layer this module belongs to */ layer: ArchitectureLayer; /** Dependencies this module imports */ dependencies: DependencyEdge[]; /** Modules that import this module */ dependents: string[]; /** Type of module */ type: ModuleType; } export interface DependencyEdge { /** Target module path */ target: string; /** Type of import */ importType: ImportType; /** Import statement location */ location: { file: string; line: number; column: number; }; /** Imported symbols */ symbols: string[]; } export declare enum ArchitectureLayer { FOUNDATION = "foundation",// Core utilities, singletons, base infrastructure DOMAIN = "domain",// Business logic, domain models, business rules APPLICATION = "application",// Application services, use cases, orchestrators INFRASTRUCTURE = "infrastructure",// External dependencies, data access, frameworks PRESENTATION = "presentation",// UI components, controllers, views SHARED = "shared",// Cross-cutting concerns, common utilities CORE = "core",// Alias for FOUNDATION (Angular-specific) FEATURES = "features",// Feature modules (Angular-specific) MAIN = "main",// Main app infrastructure (Angular-specific) OFFLINE = "offline",// Offline/PWA functionality (Angular-specific) CONFIGURATION = "configuration",// Configuration, environment settings TESTING = "testing" } export declare enum ModuleType { COMPONENT = "component", SERVICE = "service", DIRECTIVE = "directive", PIPE = "pipe", MODULE = "module", MODEL = "model", UTILITY = "utility", CONFIG = "config" } export declare enum ImportType { RELATIVE = "relative",// ./ or ../ imports ABSOLUTE = "absolute",// @core/, @shared/, etc. BARREL = "barrel",// index.ts exports DYNAMIC = "dynamic",// import() statements TYPE_ONLY = "type-only" } export interface ArchitectureViolation { /** Violation type */ type: ViolationType; /** Source module */ source: string; /** Target module */ target: string; /** Severity level */ severity: 'error' | 'warning' | 'info'; /** Description of the violation */ description: string; /** Suggested fix */ suggestedFix: string; /** Location of the violation */ location: { file: string; line: number; column: number; }; /** Additional metadata */ metadata?: Record; } export declare enum ViolationType { LAYER_VIOLATION = "layer-violation", CIRCULAR_DEPENDENCY = "circular-dependency", GOD_OBJECT = "god-object", SINGLE_RESPONSIBILITY = "single-responsibility", OPEN_CLOSED = "open-closed", DIRECT_INSTANTIATION = "direct-instantiation", MISSING_INTERFACE = "missing-interface", SERVICE_LOCATOR = "service-locator", DUMB_SMART_VIOLATION = "dumb-smart-violation", SMART_DUMB_VIOLATION = "smart-dumb-violation", TIGHT_COUPLING = "tight-coupling", MISSING_ABSTRACTION = "missing-abstraction" } export interface MigrationPlan { /** Plan identifier */ id: string; /** Description of the migration */ description: string; /** Violations this plan addresses */ violations: ArchitectureViolation[]; /** Steps to execute the migration */ steps: MigrationStep[]; /** Estimated effort */ effort: 'low' | 'medium' | 'high' | 'critical'; /** Risk level */ risk: 'low' | 'medium' | 'high'; /** Prerequisites for this migration */ prerequisites: string[]; } export interface MigrationStep { /** Step description */ description: string; /** Type of operation */ type: 'create-interface' | 'move-file' | 'update-imports' | 'create-service' | 'refactor-class'; /** Files affected */ affectedFiles: string[]; /** Code changes required */ changes: CodeChange[]; } export interface CodeChange { /** File to modify */ file: string; /** Type of change */ type: 'add' | 'remove' | 'replace'; /** Location in file */ location: { startLine: number; startColumn: number; endLine?: number; endColumn?: number; }; /** New content */ content: string; /** Old content (for replace operations) */ oldContent?: string; } export interface ArchitectureConfig { /** Layer definitions */ layers: Partial<{ [key in ArchitectureLayer]: { /** Allowed to import from these layers */ canImportFrom: ArchitectureLayer[]; /** Path patterns for this layer */ pathPatterns: string[]; /** Module types allowed in this layer */ allowedTypes: ModuleType[]; }; }>; /** Boundary rules */ boundaries: { /** Maximum circular dependency depth allowed */ maxCircularDepth: number; /** Maximum class size (methods) */ maxClassSize: number; /** Maximum service dependencies */ maxServiceDependencies: number; }; } //# sourceMappingURL=types.d.ts.map