import { type ReleaseMode } from '@substrat-run/contracts'; /** * `substrat init --ci github` — write the deploy workflow into the repo. * * The dashboard's one-click setup commits this same file for a builder who connected the * GitHub App; this is the path for everyone else — a builder who owns their own CI, or one * who wants the release-train shape rather than the trunk-based default. Both render from * the ONE generator in `@substrat-run/contracts`, so the two paths cannot diverge. * * Why it exists at all: the workflow encodes a version-label discipline (a prerelease label * for every non-release push, so previews and the test env never claim or advance the * coordinate the repo owns) that is real, load-bearing, and completely undiscoverable from * `--help`. Every vertical would otherwise re-derive it, and get it wrong the way our own * registry got holes punched in it (#509). */ export interface InitCiOptions { /** Repo root to write into. */ dir: string; /** The vertical's bare slug. */ slug: string; /** The branch whose pushes deploy prod. */ branch: string; /** Control-plane API base baked into the workflow. */ cpUrl: string; release: ReleaseMode; /** Overwrite an existing file (default: refuse, so a customized workflow is never clobbered). */ force: boolean; /** Where to write, relative to `dir`. */ path?: string; /** * The vertical's directory inside the repo (`--path`), for a monorepo whose package is * not the repo root. Rendered into the workflow: pushes and previews build this * directory, and the triggers only fire on changes that can affect it. */ packageDir?: string; } export declare const DEFAULT_WORKFLOW_PATH = ".github/workflows/substrat-deploy.yml"; export interface InitCiResult { /** Absolute path written. */ file: string; /** True when a file was already there and `--force` replaced it. */ overwritten: boolean; } /** * Render and write the workflow. Refuses to clobber an existing file without `force`: * this file is meant to be edited after generation (it is a normal workflow, not a managed * artifact), so silently overwriting a builder's edits would be the worst possible default. */ export declare function writeCiWorkflow(opts: InitCiOptions): InitCiResult; /** * The repo's default branch, best-effort, for the `--branch` default. Reads * `.git/HEAD` rather than shelling out to git: the CLI must run where git may not be * installed, and a wrong guess here only means the builder passes `--branch`. */ export declare function detectDefaultBranch(dir: string): string; /** The follow-up a generated workflow needs before its first run can authenticate. */ export declare function nextStepsMessage(slug: string, release: ReleaseMode): string; //# sourceMappingURL=init.d.ts.map