/** * Template Scanner * * Scans template directories for files to sync. * Recursively discovers files while respecting exclude patterns. */ import type { TemplateFile, TemplateSubdir } from './types.js'; /** * Scan result with metadata */ export interface ScanResult { /** Files found */ files: TemplateFile[]; /** Subdirectories scanned */ subdirectories: TemplateSubdir[]; /** Files skipped due to exclude patterns */ skipped: string[]; /** Scan duration in milliseconds */ durationMs: number; } /** * Scans template directories for files */ export declare class TemplateScanner { /** * Scan a directory for template files recursively * * @param rootPath - Root directory to scan (e.g., templates/base/.claude/) * @param subdirectories - Subdirectories to include * @param excludePatterns - Patterns to exclude * @returns Array of template files found */ static scanDirectory(rootPath: string, subdirectories?: TemplateSubdir[], excludePatterns?: string[]): Promise; /** * Scan with detailed result metadata * * @param rootPath - Root directory to scan * @param subdirectories - Subdirectories to include * @param excludePatterns - Patterns to exclude * @returns Detailed scan result */ static scan(rootPath: string, subdirectories?: TemplateSubdir[], excludePatterns?: string[]): Promise; /** * Recursively scan directory * * @param dirPath - Current directory path * @param basePath - Base path for relative path calculation * @param excludePatterns - Patterns to exclude * @returns Array of template files found */ private static scanRecursive; /** * Check if a file/directory should be excluded * * @param name - File or directory name * @param excludePatterns - Patterns to check against * @returns true if should be excluded */ private static shouldExclude; /** * Get all template subdirectories to sync */ static getSyncedSubdirs(): TemplateSubdir[]; /** * Get excluded subdirectories */ static getExcludedSubdirs(): string[]; /** * Check if a subdirectory should be synced * * @param subdir - Subdirectory name * @returns true if subdirectory should be synced */ static isSyncedSubdir(subdir: string): subdir is TemplateSubdir; /** * Check if a subdirectory should be excluded * * @param subdir - Subdirectory name * @returns true if subdirectory should be excluded */ static isExcludedSubdir(subdir: string): boolean; /** * Scan and hash files in one pass * * @param rootPath - Root directory to scan * @param subdirectories - Subdirectories to include * @returns Array of template files with hashes */ static scanAndHash(rootPath: string, subdirectories?: TemplateSubdir[]): Promise; /** * Get file count by subdirectory * * @param files - Array of template files * @returns Map of subdirectory to file count */ static getFileCountBySubdir(files: TemplateFile[]): Map; /** * Filter files by subdirectory * * @param files - Array of template files * @param subdir - Subdirectory to filter by * @returns Filtered array of files */ static filterBySubdir(files: TemplateFile[], subdir: string): TemplateFile[]; } //# sourceMappingURL=scanner.d.ts.map