/** * Config G8 — build lifecycle hooks (`hooks.lifecycle`). * * Runs configured script paths around compile / generate. Fail-closed: * non-zero exit aborts the CLI command. Distinct from git pre-commit hooks * (`hooks.provider` / `manifest install-hooks`). */ export type LifecyclePhase = 'beforeCompile' | 'afterGenerate'; export interface LifecycleHooksConfig { beforeCompile?: string[]; afterGenerate?: string[]; } /** Flat git-hook fields plus optional G8 lifecycle (backward compatible). */ export interface HooksWithLifecycle { skipInCi?: boolean; provider?: 'husky' | 'simple-git-hooks'; runFmt?: boolean; runValidate?: boolean; lifecycle?: LifecycleHooksConfig; } export interface RunLifecycleHooksOptions { cwd: string; /** When true, list scripts without executing. */ dryRun?: boolean; /** Injected runner for tests. */ runScript?: (scriptPath: string, cwd: string) => Promise; } /** Default: spawn `node` (with tsx import for TypeScript). */ export declare function defaultRunLifecycleScript(scriptPath: string, cwd: string): Promise; /** * Execute lifecycle scripts for a phase in declaration order. * No-op when the phase has no scripts configured. */ export declare function runLifecycleHooks(phase: LifecyclePhase, hooks: HooksWithLifecycle | undefined, opts: RunLifecycleHooksOptions): Promise; /** Load build config hooks (if any) and run a lifecycle phase. */ export declare function runLifecycleHooksFromCwd(phase: LifecyclePhase, cwd?: string, opts?: Omit): Promise; //# sourceMappingURL=lifecycle-hooks.d.ts.map