import { type PromptRunner } from './prompt.js'; import type { Style } from './style.js'; export interface WizardAnswers { readonly target: string; readonly name: string; readonly features: readonly string[]; readonly binary: boolean; readonly force: boolean; } /** What the flags already settled, so the wizard skips asking again. */ export interface WizardDefaults { readonly target: string | undefined; readonly name: string | undefined; readonly features: readonly string[]; /** `undefined` asks; a boolean skips the question, the way `target` does. */ readonly binary: boolean | undefined; readonly force: boolean; readonly cwd: string; } /** * The questions, in the order the answers are needed. * * The directory, package name and force questions are skipped when there is * nothing to ask: a target given on the command line, a package name that is * already legal, a directory that is already empty. Running * `bunx @dunx/create-app my-api` in a clean directory therefore asks the two that * nothing else can answer, features and the binary build. */ export declare class Wizard { #private; constructor(runner: PromptRunner, style: Style); run(defaults: WizardDefaults): Promise; } /** * A package name npm will take, from a directory name it will not. Uppercase and * the characters npm forbids both become a hyphen, and a leading dot, underscore * or hyphen is dropped. */ export declare const slug: (value: string) => string;