import { type Layout, type Pkg, type PackageManager } from './detect.js'; /** Everything `init` changed, so `remove` can undo exactly that and nothing else. */ export interface Manifest { /** Files init created. Relative to the repo root, posix separators. */ files: string[]; /** Existing files where init inserted marked lines. */ edits: string[]; dependency?: { dir: string; pm: PackageManager; workspace?: string; }; /** The exact text init put in a .env file, so remove can take back precisely that and never a value you typed. */ env?: { file: string; created: boolean; added: string; }; /** Text appended to other files (CODEOWNERS), same idea: exact text, so remove takes back precisely that. */ appended?: { file: string; created: boolean; added: string; }[]; /** Repo secrets set by `blazeresolver app` (BLAZE_APP_ID and the private key), so remove can delete them. */ secrets?: string[]; } export declare const CONFIG_FILE = "blazeresolver.config.json"; export interface InitOptions { cwd: string; repo?: string; branch?: string; test?: string; build?: string; /** Installs dependencies (with network) before tests, which then run offline. Detected when omitted. */ install?: string; /** Run tests with network access instead of offline in a container. */ noSandbox?: boolean; /** Container image for offline tests. Defaults to node:-bookworm-slim. */ sandboxImage?: string; /** Run this blazeresolver version in the workflow and widget instead of `latest`. */ pin?: string; /** The fix job uses a GitHub App token (run `blazeresolver app` to create one). */ app?: boolean; /** Folder of the backend / frontend, relative to the repo root. Detected when omitted. */ backend?: string; frontend?: string; /** Overwrite files that already exist. */ force?: boolean; /** Skip installing the blazeresolver dependency. */ noInstall?: boolean; log?: (line: string) => void; /** Confirms or corrects what was detected. Omit to accept the detection (scripts, CI). */ ask?: (question: string, fallback: string) => Promise; } export interface InitResult { root: string; repo: string; layout: { frontend?: string; backend?: string; handler: Layout['handler']; }; manifest: Manifest; endpoint: string; /** Steps init could not do safely and printed for the user instead. */ manual: string[]; } /** * What to add to a .env so it has BlazeResolver's variables: only the ones it is missing, never touching a line that is * already there. Returns undefined when nothing is missing. */ export declare function envAddition(existing: string | undefined): string | undefined; export declare function runInit(opts: InitOptions): Promise; export declare function installArgs(pm: PackageManager, pkg: Pkg, workspace: boolean, root: string): [string, string[], string]; export declare function uninstallArgs(pm: PackageManager, dir: string, workspace: string | undefined, root: string): [string, string[], string]; //# sourceMappingURL=init.d.ts.map