/** * Shared `Bun.build` runner used by both the `tekir` CLI bin and the * in-process `tekir()` build dispatcher. Single source of truth for flag * parsing, default externals, the autoload inliner, and `--plugin` * loading. Returns a boolean so callers can decide their own exit code * and run post-build cleanup (e.g. the Vite frontend's `dist/client` * removal). */ import { type ParsedBuildArgs } from './args'; export interface RunBuildLogger { info(message: string): void; warn(message: string): void; error(message: string): void; } export interface RunBuildOptions { /** Extra Bun plugins added after the autoload inliner and user `--plugin`s. */ extraPlugins?: any[]; /** Extra externals merged with the framework defaults and `--external` flags. */ extraExternals?: readonly string[]; /** Working directory that resolves `--plugin` relative paths. Defaults to `process.cwd()`. */ cwd?: string; /** Logger sink. Defaults to `console`. */ logger?: RunBuildLogger; /** Override the parsed args directly (skips `parseBuildArgs`). */ parsed?: ParsedBuildArgs; } /** * Run `Bun.build` (or compile) for `entry` using the given CLI flags. * Returns `true` on success, `false` on any failure (parse, plugin load, * Bun.build error). Does not call `process.exit`; the caller decides. */ export declare function runBuild(entry: string, argv: string[], options?: RunBuildOptions): Promise; export { parseBuildArgs, BuildArgsError } from './args'; export type { ParsedBuildArgs, SourcemapMode } from './args';