UNPKG

@morodomi/ait3

Version:

AIT³ Development Platform - AI + Ticket + Test + Tool driven development methodology

42 lines (41 loc) 1.23 kB
/** * Common file utilities used across services */ export declare class FileUtils { /** * Check if a file exists */ static exists(filePath: string): Promise<boolean>; /** * Check if any of the given files exist */ static anyExists(basePath: string, files: string[]): Promise<boolean>; /** * Read and parse JSON file */ static readJson<T = unknown>(filePath: string): Promise<T | null>; /** * Read text file */ static readText(filePath: string): Promise<string | null>; /** * Read package.json from a directory */ static readPackageJson(dirPath: string): Promise<unknown>; /** * Read composer.json from a directory */ static readComposerJson(dirPath: string): Promise<unknown>; /** * Read pyproject.toml from a directory */ static readPyprojectToml(dirPath: string): Promise<string | null>; /** * Extract version from version string (removes prefixes like ^, ~, >=) */ static extractVersion(versionString?: string): string | undefined; /** * Generate filename for ticket based on ID and title */ static generateTicketFilename(id: string, title: string): string; }