import type { EcoPagesAppConfig } from '../../types/internal-types.js'; import type { EcoBuildPlugin } from '../contracts/build-types.js'; import type { BuildOptions, BuildTranspileProfile } from '../contracts/build-contracts.js'; import type { BuildProfile } from './build-runtime.js'; /** * Resolves app-owned server plugins plus JSX ownership for one config. * * @remarks * Always goes through {@link getAppServerBuildPlugins} so sealed-manifest and * source-transform apps share one plugin list with the alias resolver. Used by * both request assembly and unified-graph cache keys. */ export declare function resolveServerAppBuildPlugins(appConfig: EcoPagesAppConfig): EcoBuildPlugin[]; /** * Merges caller plugins with app-owned manifest plugins. * * @remarks * App-manifest plugins cannot be silently replaced by same-name caller plugins. * Unique caller plugins are prepended so first-wins Rolldown hooks (for example * React vendor/alias rewrites) still run before general app loaders. Use * `excludeAppBuildPlugins` on browser requests to omit app-owned plugins. */ export declare function mergeCallerBuildPlugins(appPlugins: EcoBuildPlugin[], callerPlugins?: EcoBuildPlugin[]): EcoBuildPlugin[]; export type ServerBuildRequestInput = Partial & { entrypoints: BuildOptions['entrypoints']; profile?: Extract; }; export type BrowserBuildRequestInput = Partial & { entrypoints: BuildOptions['entrypoints']; profile: BuildTranspileProfile; excludeAppBuildPlugins?: string[]; }; /** * Assembles a complete server-oriented {@link BuildOptions} before scheduling. * * @remarks * Defaults `profile` to `'route-module'`. Plugins are * {@link resolveServerAppBuildPlugins} plus unique caller contributions via * {@link mergeCallerBuildPlugins}. Source transforms are applied on every * compilation target, so server module loading shares browser attribution. */ export declare function createServerBuildRequest(appConfig: EcoPagesAppConfig, input: ServerBuildRequestInput): BuildOptions; /** * Assembles a complete browser-oriented {@link BuildOptions} before scheduling. * * @remarks * Applies {@link resolveBuildProfileOptions} for `'browser-hmr'` (browser target * defaults), then overlays {@link getAppTranspileOptions} for the given * {@link BuildTranspileProfile}. That profile selects transpile settings only; * the {@link BuildRuntime} executor slot is chosen later by the caller * (typically {@link BrowserBundleService}). * * Always attaches {@link getAppSourceTransforms}. App browser plugins come from * {@link getAppBrowserBuildPlugins} (includes JSX ownership); use * `excludeAppBuildPlugins` to omit app-owned names. Caller plugins cannot * replace app-manifest names ({@link mergeCallerBuildPlugins}). */ export declare function createBrowserBuildRequest(appConfig: EcoPagesAppConfig, input: BrowserBuildRequestInput): BuildOptions;