UNPKG

qraft

Version:

A powerful CLI tool to qraft structured project setups from GitHub template repositories

76 lines 2.82 kB
import { BoxInfo } from '../types'; /** * Interactive prompt utilities for the qraft CLI */ export declare class InteractivePrompts { /** * Prompt for box selection from a list of available boxes * @param boxes Array of available boxes * @param registryName Name of the registry * @returns Promise<BoxInfo | null> Selected box or null if cancelled */ selectBox(boxes: BoxInfo[], registryName?: string): Promise<BoxInfo | null>; /** * Prompt for registry selection from available registries * @param registries Array of registry information * @returns Promise<string | null> Selected registry name or null if cancelled */ selectRegistry(registries: Array<{ name: string; repository: string; isDefault: boolean; }>): Promise<string | null>; /** * Prompt for target directory with validation * @param defaultPath Default target directory * @returns Promise<string> Target directory path */ promptTargetDirectory(defaultPath?: string): Promise<string>; /** * Prompt for confirmation with customizable message * @param message Confirmation message * @param defaultValue Default value (true/false) * @returns Promise<boolean> User confirmation */ confirm(message: string, defaultValue?: boolean): Promise<boolean>; /** * Prompt for overwrite confirmation with file details * @param filePaths Array of file paths that would be overwritten * @returns Promise<boolean> Whether to overwrite files */ confirmOverwrite(filePaths: string[]): Promise<boolean>; /** * Prompt for GitHub token input with validation * @param registryName Optional registry name for context * @returns Promise<string> GitHub token */ promptGitHubToken(registryName?: string): Promise<string>; /** * Prompt for registry configuration * @returns Promise<{name: string, repository: string, setAsDefault: boolean}> Registry configuration */ promptRegistryConfig(): Promise<{ name: string; repository: string; setAsDefault: boolean; }>; /** * Display box preview with manifest information * @param boxInfo Box information to preview */ previewBox(boxInfo: BoxInfo): Promise<void>; /** * Prompt for search/filter input * @param placeholder Placeholder text for the search * @returns Promise<string> Search query */ promptSearch(placeholder?: string): Promise<string>; /** * Show a loading spinner with message * @param message Loading message * @param promise Promise to wait for * @returns Promise result */ withSpinner<T>(message: string, promise: Promise<T>): Promise<T>; } //# sourceMappingURL=prompts.d.ts.map