import { type FileSystem } from "../../src/platform/index.js"; import type { InitRuntime, InitTemplate } from "../commands/init/types.js"; import { type EnvPromptResult } from "../utils/env-prompt.js"; import { type PackageManager } from "../utils/package-manager.js"; import type { EnvVarConfig, IntegrationName, TemplateFile } from "../../templates/types.js"; export interface CreateProjectRequest { name?: string; parentDir: string; template: InitTemplate; runtime: InitRuntime; integrations: IntegrationName[]; environmentValues: Record; conflictPolicy: "fail" | "overwrite"; installDependencies: boolean; initializeGit: boolean; includePackageMetadata: boolean; } export interface CreateProjectResult { projectDir: string; projectName?: string; createdPaths: string[]; packageManager: PackageManager; dependencyInstallation: "installed" | "failed" | "skipped"; gitInitialization: "initialized" | "failed" | "skipped"; setupTips: string[]; } export type ProjectCreationEvent = { kind: "dependency-installation-started"; packageManager: PackageManager; } | { kind: "dependency-installation-finished"; packageManager: PackageManager; status: "installed" | "failed"; }; export interface ProjectCreationObserver { onEvent(event: ProjectCreationEvent): void | Promise; } export interface CreateProjectDependencies { observer?: ProjectCreationObserver; /** Filesystem capability used for preflight and materialization. */ fileSystem?: FileSystem; resolveEnvironmentFiles?: (variables: EnvVarConfig[], values: Record) => Promise>; } export declare function createProject(request: CreateProjectRequest, dependencies?: CreateProjectDependencies): Promise; /** * Slugs other product surfaces use for a template this CLI names differently. * * Studio's "blank" project is the CLI's `minimal` starter. Mapping the two * vocabularies here is what lets a hosted caller materialize the same bytes * `veryfront init` writes instead of copying a separately maintained project. */ export declare const SCAFFOLD_TEMPLATE_ALIASES: Readonly>; /** Canonical starter template for a slug, or `null` when nothing matches. */ export declare function resolveScaffoldTemplate(slug: string): InitTemplate | null; /** Every template slug a caller may ask for, canonical names and aliases. */ export declare function listScaffoldTemplates(): string[]; /** What to build: which starter, under what name, for which runtime. */ export interface MaterializeScaffoldRequest { /** Canonical template name or a slug from {@link SCAFFOLD_TEMPLATE_ALIASES}. */ template: string; /** * Written into `package.json#name`. Validated exactly as `veryfront init` * validates it, so neither path can produce a project the other rejects. */ projectName?: string; runtime?: InitRuntime; integrations?: IntegrationName[]; environmentValues?: Record; /** Include `package.json` (and `deno.json` on the Deno runtime). */ includePackageMetadata?: boolean; } /** A new project: every file it starts with, plus anything worth telling the author. */ export interface MaterializedScaffold { /** Canonical template the requested slug resolved to. */ template: InitTemplate; /** Complete project contents, sorted by path. */ files: TemplateFile[]; tips: string[]; } /** * Produce the complete contents of a new project without touching a disk. * * This is the artifact a hosted "create project" flow should write, so a * project created outside the CLI is byte-identical to one `veryfront init` * scaffolds from the same template. It runs the same assembly and the same * `package.json` / `deno.json` / `.gitignore` / `.env` generators that * {@link createProject} writes, so the two cannot report different files for * the same request. */ export declare function materializeScaffold(request: MaterializeScaffoldRequest): Promise; //# sourceMappingURL=project-creation.d.ts.map