import { basename, resolve } from "pathe"; import { detectPackageManager, titleize, validateContentDir, } from "./scaffold.ts"; import type { InitAnswers, PackageManager, SourceKind, Template, } from "./scaffold.ts"; /** One prompt option: value plus display label and optional hint. */ interface PromptOption { hint?: string; label: string; value: Value; } /** * The prompt surface `collectAnswers` needs — structurally satisfied by the * `@clack/prompts` module itself, and by plain fakes in tests. Every prompt * resolves to a cancel symbol when the user aborts. */ export interface Prompter { multiselect: (opts: { initialValues?: SourceKind[]; message: string; options: PromptOption[]; required?: boolean; }) => Promise; select: (opts: { message: string; options: PromptOption