UNPKG

@vladimirdukelic/revolutionary-ui-factory

Version:

Revolutionary UI Factory System v2 - Generate ANY UI component for ANY framework with 60-95% code reduction

127 lines (126 loc) 2.94 kB
/** * Revolutionary UI Factory - Project Detector * Analyzes project structure and detects installed frameworks, libraries, and tools */ export interface DetectedPackage { name: string; version: string; type: 'framework' | 'ui-library' | 'icon-library' | 'design-tool' | 'color-tool' | 'font' | 'utility'; installed: boolean; currentVersion?: string; latestVersion?: string; needsUpdate?: boolean; } export interface ProjectAnalysis { projectName: string; projectPath: string; packageManager: 'npm' | 'yarn' | 'pnpm' | 'bun'; frameworks: DetectedPackage[]; uiLibraries: DetectedPackage[]; iconLibraries: DetectedPackage[]; designTools: DetectedPackage[]; colorTools: DetectedPackage[]; fonts: DetectedPackage[]; utilities: DetectedPackage[]; buildTools: string[]; hasTypeScript: boolean; hasTailwind: boolean; hasESLint: boolean; hasPrettier: boolean; testingFrameworks: string[]; recommendations: Recommendation[]; } export interface Recommendation { type: string; packages: string[]; reason: string; priority: 'high' | 'medium' | 'low'; } export declare class ProjectDetector { private projectPath; private packageJson; private packageLockJson; private dependencies; private devDependencies; constructor(projectPath?: string); /** * Main analysis function */ analyze(): Promise<ProjectAnalysis>; /** * Load package.json */ private loadPackageJson; /** * Detect package manager */ private detectPackageManager; /** * Detect installed frameworks */ private detectFrameworks; /** * Detect UI libraries */ private detectUILibraries; /** * Detect icon libraries */ private detectIconLibraries; /** * Detect design tools */ private detectDesignTools; /** * Detect color tools */ private detectColorTools; /** * Detect fonts */ private detectFonts; /** * Detect common utilities */ private detectUtilities; /** * Detect build tools */ private detectBuildTools; /** * Detect testing frameworks */ private detectTestingFrameworks; /** * Check if TypeScript is installed */ private hasTypeScript; /** * Check if Tailwind is installed */ private hasTailwind; /** * Check if ESLint is installed */ private hasESLint; /** * Check if Prettier is installed */ private hasPrettier; /** * Check if a package is installed */ private isPackageInstalled; /** * Get package version */ private getPackageVersion; /** * Check if package needs update */ private needsUpdate; /** * Generate recommendations based on analysis */ private generateRecommendations; }