import type { PackageManagerId } from '../shared/package-managers.js'; import type { ScaffoldTemplateVariables } from './scaffold.js'; import type { BuiltInTemplateId } from './template-registry.js'; /** * Ensures the scaffold target directory exists and is empty unless explicitly allowed. * * @param targetDir Absolute project directory that will receive scaffold output. * @param allowExisting Whether an existing non-empty directory should be accepted. * @returns A promise that resolves once the directory precondition is satisfied. */ export declare function ensureScaffoldDirectory(targetDir: string, allowExisting?: boolean): Promise; /** * Format the actionable error message used when a scaffold target directory * already exists and is not empty. * * @param targetDir Absolute path to the target directory being evaluated. * @returns A human-readable error string with next-step guidance. */ export declare function formatNonEmptyTargetDirectoryError(targetDir: string): string; /** * Writes built-in starter manifest files into a scaffolded project. * * @param targetDir Absolute scaffold target directory. * @param templateId Built-in template id being scaffolded. * @param variables Resolved scaffold template variables. * @returns A promise that resolves after all starter manifests are written. */ export declare function writeStarterManifestFiles(targetDir: string, templateId: string, variables: ScaffoldTemplateVariables): Promise; /** * Seed REST-derived persistence artifacts into a newly scaffolded built-in * project before the first manual `sync-rest` run. * * @param targetDir Absolute scaffold target directory. * @param templateId Built-in template id being scaffolded. * @param variables Resolved scaffold template variables for the project. * @returns A promise that resolves after any required persistence artifacts are generated. */ export declare function seedBuiltInPersistenceArtifacts(targetDir: string, templateId: BuiltInTemplateId, variables: ScaffoldTemplateVariables): Promise; /** * Detects whether a scaffolded project declares the workspace project model. * * @param projectDir Absolute scaffold target directory. * @returns `true` when the project metadata identifies a workspace scaffold. */ export declare function isWorkspaceProject(projectDir: string): boolean; /** * Detects whether a scaffolded project is the official workspace template. * * @param projectDir Absolute scaffold target directory. * @returns `true` when the project metadata identifies the official workspace template. */ export declare function isOfficialWorkspaceProject(projectDir: string): boolean; /** * Adds migration scripts and starter workspace files to the official workspace template. * * @param projectDir Absolute scaffold target directory. * @param packageManager Package manager used for generated script commands. * @returns A promise that resolves after scripts and migration starter files are written. */ export declare function applyWorkspaceMigrationCapability(projectDir: string, packageManager: PackageManagerId): Promise;