/** * Build command - generates and pushes resources to Tinybird branches */ import { type DevMode } from "../config.js"; import { type BuildFromIncludeResult } from "../../generator/index.js"; import { type BuildApiResult } from "../../api/build.js"; /** * Build command options */ export interface BuildCommandOptions { /** Working directory (defaults to cwd) */ cwd?: string; /** Skip pushing to API (just generate) */ dryRun?: boolean; /** Override the token from config (used for branch tokens) */ tokenOverride?: string; /** Override the devMode from config */ devModeOverride?: DevMode; /** Copy the last partition of production data when creating a branch */ lastPartition?: boolean; } /** * Branch info included in build result */ export interface BuildBranchInfo { /** Git branch name */ gitBranch: string | null; /** Tinybird branch name */ tinybirdBranch: string | null; /** Whether the branch was newly created */ wasCreated: boolean; /** Dashboard URL for the branch */ dashboardUrl?: string; /** Whether using local mode */ isLocal: boolean; } /** * Build command result */ export interface BuildCommandResult { /** Whether the build was successful */ success: boolean; /** Build result with generated resources */ build?: BuildFromIncludeResult; /** Build API result (if not dry run) */ deploy?: BuildApiResult; /** Branch info (when building to a branch) */ branchInfo?: BuildBranchInfo; /** Error message if failed */ error?: string; /** Duration in milliseconds */ durationMs: number; } /** * Run the build command * * Builds resources and pushes to Tinybird branches (not main). * Use runDeploy for deploying to production. * * @param options - Build options * @returns Build command result */ export declare function runBuild(options?: BuildCommandOptions): Promise; //# sourceMappingURL=build.d.ts.map