/** * Shared build pipeline for deploy plan and apply. * * Runs: analyze → per-unit codegen → entry generation → bundle → configs * Outputs everything to .deploy// without deploying. */ import type { InspectorState } from '@pikku/inspector'; import type { DeploymentManifest } from './analyzer/manifest.js'; import type { Bundler } from './bundler/bundler.interface.js'; import type { BundleResult } from './bundler/types.js'; import type { ProviderAdapter } from './provider-adapter.js'; export interface BuildLogger { info(msg: string): void; error(msg: string): void; debug(msg: string): void; } export interface BuildPipelineResult { manifest: DeploymentManifest; providerDir: string; deploymentManifestPath: string; infraPath: string | null; projectId: string; bundled: BundleResult[]; bundleErrors: Array<{ unitName: string; error: string; }>; codegenErrors: Array<{ unitName: string; error: string; }>; } export declare function runBuildPipeline(options: { projectDir: string; projectId: string; provider: ProviderAdapter; inspectorState: InspectorState; serverlessIncompatible?: string[]; defaultTarget?: 'serverless' | 'server'; getEntryContext: (unitDir: string, pikkuDir: string, unit: DeploymentManifest['units'][0], state: InspectorState) => unknown; deployDir?: string; outDir?: string; /** Emit sourcemaps + per-unit `metafile.json` (debug-only). Default false. */ debugArtifacts?: boolean; logger: BuildLogger; /** Runtime-specific bundler (esbuild for node, Bun.build for bun). */ bundler: Bundler; }): Promise;