UNPKG

gather-ts

Version:

A powerful code analysis and packaging tool designed for creating AI-friendly code representations for javascript and typescript projects.

37 lines (36 loc) 1.17 kB
import { IFileSystem } from "@/utils/filesystem/interfaces/IFileSystem"; import { ILogger } from "@/utils/logging/interfaces/ILogger"; import { IService } from "@/types/services"; export interface IIgnoreHandlerDeps { fileSystem: IFileSystem; logger: ILogger; } export interface IIgnoreHandlerOptions { debug?: boolean; extraPatterns?: string[]; } export interface ILoadPatternsOptions { skipGitignore?: boolean; validate?: boolean; } export interface IIgnoreHandler extends IService { shouldIgnore(filePath: string): boolean; validateFilePath(filePath: string): void; getPatterns(): string[]; addPattern(pattern: string): void; removePattern(pattern: string): boolean; resetPatterns(): void; printDebugInfo(filePath: string): void; initialize(): Promise<void>; cleanup(): void; } export interface IPatternValidationResult { isValid: boolean; normalizedPattern?: string; error?: string; } export interface IIgnorePatternValidator { validatePattern(pattern: string): string; parsePattern(pattern: string): IPatternValidationResult; validatePatterns(patterns: string[]): string[]; }