sicua
Version:
A tool for analyzing project structure and dependencies
73 lines (72 loc) • 2.12 kB
TypeScript
import { ProjectAnalysisConfig } from "../types";
export interface ProjectStructureDetection {
projectType: "nextjs" | "react";
nextjsVersion?: string;
routerType?: "app" | "pages";
detectedSourceDirectory: string;
hasSourceDirectory: boolean;
availableDirectories: string[];
}
export declare class ConfigManager implements ProjectAnalysisConfig {
fileExtensions: string[];
rootComponentNames: string[];
srcDir: string;
outputFileName: string;
projectPath: string;
private _projectStructure;
private _isSourceDirDetected;
constructor(projectPath: string);
loadConfig(): Promise<void>;
/**
* Detect project structure and set appropriate defaults
*/
private detectProjectStructure;
/**
* Analyze the project structure to determine type and source directory
*/
private analyzeProjectStructure;
/**
* Determine the best source directory based on project structure
*/
private determineSourceDirectory;
/**
* Adjust root component names based on project type and structure
*/
private adjustRootComponentNames;
/**
* Update source directory (called by directory scanner)
*/
updateSourceDirectory(newSrcDir: string): void;
/**
* Get detected project structure information
*/
getProjectStructure(): ProjectStructureDetection | null;
/**
* Check if the source directory was auto-detected
*/
isSourceDirectoryDetected(): boolean;
/**
* Merge user configuration with detected defaults
*/
private mergeConfig;
/**
* Resolve all paths to absolute paths
*/
private resolvePaths;
/**
* Validate configuration and provide warnings for potential issues
*/
validateConfig(): string[];
/**
* Check if source directory contains files with configured extensions
*/
private checkForSourceFiles;
/**
* Get final configuration object
*/
getConfig(): ProjectAnalysisConfig;
/**
* Get configuration summary for debugging
*/
getConfigSummary(): string;
}