export type RenderDeployFilesOptions = { /** App name, kebab-case (e.g. "publicstatus", "kumiko-studio"). */ readonly appName: string; /** Container port the app listens on. Default 3000. */ readonly port?: number; /** GitHub org for the published image-tag. Default "cosmicdriftgamestudio". */ readonly githubOrg?: string; /** Destination directory (absolute or relative to cwd). The `deploy/` * subdir is created inside this. Default: process.cwd(). */ readonly destination?: string; /** Source-tree root for optional-dir detection (seeds/, …). Defaults to * `destination`. Lets the caller scaffold into one dir while detecting * optional surfaces in another (rare — mostly destination = sourceDir). */ readonly sourceDir?: string; }; export type ScaffoldDeployOptions = RenderDeployFilesOptions & { /** Overwrite existing files instead of skipping them. */ readonly force?: boolean; }; declare const REGISTRY_CONFIG_FILES: readonly ["bunfig.toml", ".npmrc"]; export type RegistryConfigFile = (typeof REGISTRY_CONFIG_FILES)[number]; /** Detected optional-dirs/layout traits in the app's source-tree. Drives * which COPY blocks the Dockerfile-template emits. */ export type ScaffoldDeployDetected = { /** ES-Operations seed-migrations (`seeds/`). Required for apps that * use the es-ops feature. */ readonly hasSeeds: boolean; /** Private @cosmicdriftgamestudio/* GH-Packages → Dockerfile needs to * pass NPM_AUTH_TOKEN as build-arg + re-export it as $GITHUB_TOKEN inside * the build-stage (bunfig.toml/.npmrc read $GITHUB_TOKEN). */ readonly hasPrivateGhPackages: boolean; /** A `workspaces` root, or a `file:`/`workspace:`/`link:` dependency spec * — bun needs the whole build context on disk to resolve the lockfile, * so the Dockerfile does `COPY . .` before `bun install` instead of * copying manifests first for layer-cache. */ readonly installFromFullTree: boolean; /** Which of bunfig.toml/.npmrc exist at the source root — copied ahead of * `bun install` in the manifests-first install variant. */ readonly registryConfigFiles: readonly RegistryConfigFile[]; /** DB user for migrate-step.sh's DATABASE_URL — from * `package.json#kumiko.deploy.dbUser`, default = appName. */ readonly dbUser: string; /** DB name for migrate-step.sh's DATABASE_URL — from * `package.json#kumiko.deploy.dbName`, default = appName. */ readonly dbName: string; }; export type ScaffoldedFile = { readonly path: string; readonly written: boolean; readonly reason?: "exists" | "force"; }; export type ScaffoldDeployResult = { readonly destination: string; readonly files: readonly ScaffoldedFile[]; /** What scaffoldDeploy detected in the source-tree and used to gate * conditional Dockerfile blocks. Surfaced so the CLI can report it * ("hasSeeds=true → /app/seeds COPY emitted"). */ readonly detected: ScaffoldDeployDetected; }; export type RenderedDeployFile = { /** Template-relative output filename (e.g. "Dockerfile"). */ readonly output: string; /** Absolute path this would be written to. */ readonly path: string; readonly content: string; }; export type RenderDeployFilesResult = { readonly deployDir: string; readonly files: readonly RenderedDeployFile[]; readonly detected: ScaffoldDeployDetected; }; export type DeployDriftEntry = { readonly path: string; readonly reason: "missing" | "differs"; }; export type CheckDeployDriftResult = { readonly drifted: readonly DeployDriftEntry[]; readonly detected: ScaffoldDeployDetected; }; /** Pure: computes the rendered deploy files for `options` without touching * disk beyond reading the app's source-tree (package.json, seeds/, * registry-config files) and the shipped templates. */ export declare function renderDeployFiles(options: RenderDeployFilesOptions): RenderDeployFilesResult; export declare function scaffoldDeploy(options: ScaffoldDeployOptions): ScaffoldDeployResult; /** Read-only: compares the rendered deploy files against what's on disk * without writing anything. */ export declare function checkDeployDrift(options: RenderDeployFilesOptions): CheckDeployDriftResult; export declare function render(source: string, subs: Readonly>, flags: Readonly>): string; export {};