woaru
Version:
Universal Project Setup Autopilot - Analyze and automatically configure development tools for ANY programming language
50 lines • 2.3 kB
TypeScript
/**
* WOARU Filename Helper for Standardized Report Filenames
* Provides consistent, sortable timestamp-based naming conventions
*/
export declare class FilenameHelper {
/**
* Generates standardized report filename with sortable timestamp
* Format: woaru_[befehl_typ]_report_[YYYY]-[MM]-[DD]_[HH]-[MM]-[SS]_[TZ].md
* @param commandType - The type of command (e.g., 'analyze', 'review', 'git')
* @returns Standardized filename with timestamp and timezone
* @example
* FilenameHelper.generateReportFilename('analyze')
* // Returns: 'woaru_analyze_report_2024-07-14_15-30-45_+0200.md'
*/
static generateReportFilename(commandType: string): string;
/**
* Extracts timestamp from WOARU report filename for sorting purposes
* @param filename - The filename to extract timestamp from
* @returns Sortable timestamp string (YYYY-MM-DD_HH-MM-SS) or null if not found
* @example
* FilenameHelper.extractTimestampFromFilename('woaru_analyze_report_2024-07-14_15-30-45_+0200.md')
* // Returns: '2024-07-14_15-30-45'
*/
static extractTimestampFromFilename(filename: string): string | null;
/**
* Sorts WOARU report files by timestamp (newest first)
* @param filenames - Array of filenames to sort
* @returns Array of filenames sorted by timestamp (newest first)
*/
static sortReportsByTimestamp(filenames: string[]): string[];
/**
* Gets the latest (newest) report filename from a list
* @param filenames - Array of filenames to search
* @returns The newest report filename or null if none found
*/
static getLatestReport(filenames: string[]): string | null;
/**
* Validates if filename follows WOARU report naming convention
* @param filename - The filename to validate
* @returns True if filename follows the standard WOARU report format
*/
static isValidReportFilename(filename: string): boolean;
/**
* Extracts command type from standardized WOARU filename
* @param filename - The filename to extract command type from
* @returns Command type (e.g., 'analyze', 'review') or null if not found
*/
static extractCommandType(filename: string): string | null;
}
//# sourceMappingURL=filenameHelper.d.ts.map