UNPKG

willow-cli

Version:

CLI for installing Willow Design System components

52 lines 1.55 kB
import type { ProjectType } from '../types/index.js'; export interface WillowError extends Error { code?: string; context?: Record<string, unknown>; suggestions?: string[]; } export declare class WillowCliError extends Error implements WillowError { code?: string; context?: Record<string, unknown>; suggestions?: string[]; constructor(message: string, options?: { code?: string; context?: Record<string, unknown>; suggestions?: string[]; }); } /** * Enhanced error handling with user-friendly messages and recovery suggestions */ export declare function handleError(error: unknown, context?: string): void; /** * Graceful error handling for individual operations */ export declare function safeExecute<T>(operation: () => Promise<T>, errorContext: string, options?: { fallback?: T; retries?: number; logWarning?: boolean; }): Promise<T | undefined>; /** * Validate and recover from common project issues */ export declare function validateAndRecover(projectType: ProjectType): Promise<{ valid: boolean; recoverable: boolean; issues: string[]; }>; /** * Progress tracking with error recovery */ export declare class ProgressTracker { private steps; private currentStep; addStep(name: string): void; executeStep<T>(stepName: string, operation: () => Promise<T>): Promise<T>; getProgress(): { completed: number; total: number; failed: number; }; summarize(): void; } //# sourceMappingURL=errorHandling.d.ts.map