UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

63 lines (62 loc) 1.85 kB
import { SpecialFileCoverage } from "../types"; /** * Scans Next.js app directory for special files and builds coverage analysis */ export declare class SpecialFileCoverageScanner { private appDirectory; private validExtensions; constructor(appDirectory: string); /** * Scans a route path for all special files coverage */ scanRouteSpecialFiles(routePath: string): SpecialFileCoverage; /** * Gets all special files for a specific route segment */ getSegmentSpecialFiles(routeSegment: string): SpecialFileCoverage; /** * Checks if a specific special file exists in a directory */ hasSpecialFile(directory: string, fileName: string): boolean; /** * Gets the full path of a special file if it exists */ getSpecialFilePath(directory: string, fileName: string): string | null; /** * Scans for all layout files in the route hierarchy */ private scanLayoutFiles; /** * Scans for template file - only the closest one matters */ private scanTemplateFile; /** * Scans for error file - only the closest one matters */ private scanErrorFile; /** * Scans for loading file - only the closest one matters */ private scanLoadingFile; /** * Scans for not-found file - only the closest one matters */ private scanNotFoundFile; /** * Scans for layout files in a specific directory */ private scanLayoutInDirectory; /** * Scans for a specific special file in a directory */ private scanSpecialFileInDirectory; /** * Gets coverage summary for a route */ getCoverageSummary(coverage: SpecialFileCoverage): { totalFiles: number; existingFiles: number; missingFiles: string[]; coveragePercentage: number; }; }