import type { Context } from './context.js'; export type PhaseId = 'preflight' | 'prompts' | 'host' | 'db' | 'db-init' | 'env' | 'deps' | 'scaffold' | 'seed-admin' | 'seed-docs' | 'wire' | 'routes' | 'ui' | 'verify'; export type PhaseState = 'pending' | 'partial' | 'done' | 'blocked'; export type PackageManager = 'pnpm' | 'npm' | 'yarn' | 'bun'; /** Stable CLI identifier for a database-backed storage adapter. */ export type DatabaseAdapterId = 'postgres' | 'mysql'; export type DbStrategy = 'existing' | 'docker'; export interface FileWrite { path: string; contents: string; mode?: 'create' | 'overwrite' | 'patch' | 'delete'; before?: string; } export interface ShellCommand { command: string; args: string[]; cwd?: string; } export interface Plan { writes: FileWrite[]; commands: ShellCommand[]; notes: string[]; preconditions?: PlanPrecondition[]; } export interface TreeSnapshotEntry { path: string; type: 'directory' | 'file' | 'other'; contents?: string; } export type PlanPrecondition = { type: 'file'; path: string; contents: string | null; } | { type: 'tree'; path: string; entries: TreeSnapshotEntry[]; } | { type: 'value'; key: string; value: string; }; export interface PhaseResult { state: PhaseState; notes?: string[]; } export interface Phase { id: PhaseId; title: string; defaultMode: 'confirm' | 'auto'; detect(ctx: Context): Promise; plan(ctx: Context): Promise; apply(plan: Plan, ctx: Context): Promise; } export interface Answers { dbAdapter?: DatabaseAdapterId; dbStrategy?: DbStrategy; dbHost?: string; dbPort?: number; dbName?: string; dbUser?: string; adminPath?: string; signInPath?: string; uiDir?: string; examples?: boolean; importDocs?: boolean; pm?: PackageManager; adminEmail?: string; } export interface InstallState { version: 1; startedAt: string; completedPhases: PhaseId[]; answers: Answers; wireSubEdits: Record; } //# sourceMappingURL=types.d.ts.map