/** * Preview command - creates ephemeral preview branch and deploys resources */ import { type DevMode } from "../config.js"; /** * Preview command options */ export interface PreviewCommandOptions { /** Working directory (defaults to cwd) */ cwd?: string; /** Skip pushing to API (just generate) */ dryRun?: boolean; /** Validate deploy with Tinybird API without applying */ check?: boolean; /** Override preview branch name */ name?: string; /** Override the devMode from config */ devModeOverride?: DevMode; } /** * Preview command result */ export interface PreviewCommandResult { /** Whether the preview was successful */ success: boolean; /** Branch information */ branch?: { name: string; id: string; token: string; url: string; created_at: string; }; /** Build statistics */ build?: { datasourceCount: number; pipeCount: number; }; /** Deploy result */ deploy?: { result: string; }; /** Error message if failed */ error?: string; /** Duration in milliseconds */ durationMs: number; } /** * Generate preview branch name with format: tmp_ci_${branch} * * Uses a deterministic name based on the git branch so that Vercel preview * deployments can find the branch by name. * * @param gitBranch - Current git branch name (or null) * @returns Preview branch name */ export declare function generatePreviewBranchName(gitBranch: string | null): string; /** * Run the preview command * * Creates an ephemeral preview branch and deploys resources to it. * Preview branches are not cached and are meant for CI/testing. * * @param options - Preview options * @returns Preview command result */ export declare function runPreview(options?: PreviewCommandOptions): Promise; //# sourceMappingURL=preview.d.ts.map