ailock
Version:
AI-Proof File Guard - Protect sensitive files from accidental AI modifications
36 lines • 1.1 kB
TypeScript
/**
* Glob pattern validation and matching for file operations
*/
export declare class GlobValidator {
private readonly maxPatternLength;
private readonly dangerousPatterns;
/**
* Validate a glob pattern for safety
*/
validateGlobPattern(pattern: string): void;
/**
* Find files matching glob patterns
*/
findMatchingFiles(patterns: string[], options?: {
cwd?: string;
ignore?: string[];
absolute?: boolean;
}): Promise<string[]>;
/**
* Create an ignore instance from gitignore-style patterns
*/
createIgnoreFilter(patterns: string[]): (path: string) => boolean;
/**
* Load patterns from a gitignore-style file
*/
loadPatternsFromFile(filePath: string): string[];
/**
* Check if a path matches any of the given patterns
*/
matchesPattern(filePath: string, patterns: string[]): boolean;
/**
* Expand glob patterns to actual file paths
*/
expandPatterns(patterns: string[], cwd?: string): Promise<string[]>;
}
//# sourceMappingURL=GlobValidator.d.ts.map