/** * Auto-Discovery Engine * * Automatically discovers and sorts Step files and Async Task files. * * Key features: * 1. File scanning: Scans all .js files in specified directory * 2. Pattern validation: Validates if filename matches pattern (/^\d+-.*\.js$/) * 3. Number extraction: Extracts number part from filename * 4. Size-based sorting: Sorts in ascending order by number (100 < 200 < 300) * 5. Duplicate validation: Checks for duplicate numbers */ import { StepInfo, AsyncTaskInfo, AutoDiscoveryOptions } from './types'; /** * Auto-Discovery Engine class */ export declare class AutoDiscovery { private readonly options; constructor(options: AutoDiscoveryOptions); /** * Discover and sort Step files * * @returns Sorted Step list * @throws {Error} When directory does not exist or duplicate numbers found */ discoverSteps(): Promise; /** * Discover Async Task files * * @returns Async Task list */ discoverAsyncTasks(): Promise; /** * Validate no duplicates * * @param steps - Step list * @throws {Error} When duplicate numbers found */ private validateNoDuplicates; /** * Load Step function * * @param filePath - File path * @returns Step function */ private loadStepFunction; /** * Load Async Task function * * @param filePath - File path * @returns Async Task function */ private loadAsyncTaskFunction; } /** * Discover and sort Steps (helper function) * * @param directory - Steps directory path * @param pattern - Filename pattern (default: /^\d+-.*\.(js|ts)$/) * @param allowDuplicates - Allow duplicate numbers (default: false) * @returns Sorted Step list */ export declare function discoverSteps(directory: string, pattern?: RegExp, allowDuplicates?: boolean): Promise; /** * Discover Async Tasks (helper function) * * @param directory - Async tasks directory path * @returns Async Task list */ export declare function discoverAsyncTasks(directory: string): Promise; //# sourceMappingURL=auto-discovery.d.ts.map