UNPKG

structure-validation

Version:

A Node.js CLI tool for validating codebase folder and file structure using a clean declarative configuration. Part of the guardz ecosystem for comprehensive TypeScript development.

45 lines 1.4 kB
import * as readline from 'readline'; export interface SmartInputOptions { validChoices: string[]; choiceRange: string; timeoutMs?: number; } export interface SmartInputResult { choice: string; requiresEnter: boolean; isValid: boolean; errorMessage?: string; } export declare class SmartInputService { private readonly rl; constructor(rl: readline.Interface); /** * Get user input with smart Enter key handling */ getSmartInput(options: SmartInputOptions): Promise<SmartInputResult>; /** * Process input and determine if Enter is required */ private processInput; /** * Determine if Enter key is required based on input and total options */ private shouldRequireEnter; /** * Display confirmation prompt and wait for Enter */ waitForConfirmation(message?: string): Promise<void>; /** * Display error message and wait for Enter */ displayErrorAndWait(errorMessage: string): Promise<void>; /** * Get additional input (like new filename or pattern) */ getAdditionalInput(prompt: string): Promise<string>; /** * Process input with smart handling and confirmation if needed */ processInputWithConfirmation(options: SmartInputOptions, onValidInput: (choice: string) => Promise<void>): Promise<void>; } //# sourceMappingURL=SmartInputService.d.ts.map