import type { BuildResult } from '../../build/build-adapter.js'; import type { BuildTranspileProfile } from '../../build/build-adapter.js'; import type { EcoBuildPlugin } from '../../build/contracts/build-types.js'; import type { EcoPagesAppConfig } from '../../types/internal-types.js'; /** * Browser-oriented build request accepted by {@link BrowserBundleService}. * * @remarks * `profile` is a {@link BuildTranspileProfile} (transpile settings only). * `executor` selects the {@link BuildRuntime} concurrency slot: * - `'hmr'` + (`hmr-entrypoint` | `hmr-runtime`) → `'browser-hmr'` * - everything else (including `browser-script`, and `'build'`) → `'route-module'` * * Defaults `executor` to `'hmr'`. Request options are always assembled with * browser-hmr *defaults* via {@link createBrowserBuildRequest}; only the * concurrency/dedupe wrapper differs. * * Uses request-scope {@link requestBuildDedupe} plus in-flight * {@link DedupingBuildExecutor} coalescing; both key on * {@link createBuildRequestIdentity}. */ export type BrowserBundleOptions = { entrypoints: string[] | Record; outdir?: string; outbase?: string; naming?: string; conditions?: string[]; define?: Record; minify?: boolean; treeshaking?: boolean; splitting?: boolean; root?: string; bundle?: boolean; externalPackages?: boolean; external?: string[]; plugins?: EcoBuildPlugin[]; executor?: 'build' | 'hmr'; profile: BuildTranspileProfile; excludeAppBuildPlugins?: string[]; }; type BrowserBundleGroupedOptions = Omit; export interface BrowserBundleExecutor { bundle(options: BrowserBundleOptions): Promise; } export type BrowserBundleGroupedEntry = { entrypoint: string; entryName: string; }; /** * App-owned boundary for browser-oriented bundle work. * * @remarks * Owns shared browser transpile defaults and ensures browser builds run through * the app-owned executor rather than direct backend calls. Assembles a complete * request via {@link createBrowserBuildRequest} before scheduling. */ export declare class BrowserBundleService implements BrowserBundleExecutor { private readonly appConfig; constructor(appConfig: EcoPagesAppConfig); /** * Runs one browser-targeted build through the app-owned executor. * * @remarks * Browser defaults, app-owned browser plugins, and * {@link getAppSourceTransforms | app source transforms} are applied here * so HMR and asset generation do not recreate that policy at each call site. */ bundle(options: BrowserBundleOptions): Promise; bundleGroupedEntries(entries: BrowserBundleGroupedEntry[], options: BrowserBundleGroupedOptions): Promise; } export {};