import type { BunPlugin } from 'bun'; /** * Paths under `dir` (absolute when `dir` is absolute) of every `.ts` file whose * source declares a `@controller`. Detection is a text match for `@controller(` * (not real parsing), so an occurrence inside a comment or string would also match. * * @param dir - directory scanned recursively (`.ts` files only) * @returns the matching paths under `dir` (absolute when `dir` is absolute), sorted lexicographically */ export declare function scanControllerFiles(dir: string): Promise; /** Options for {@link turnoverPlugin}. */ export interface TurnoverPluginOptions { /** Directory to scan for controllers (default: the first entrypoint's directory). */ dir?: string; } /** * A `Bun.build` plugin that makes auto-discovery survive bundling: * * ```ts * import { turnoverPlugin } from "turnover/bundler"; * * await Bun.build({ * entrypoints: ["./src/server.ts"], * outdir: "./dist", * target: "bun", * plugins: [turnoverPlugin()], * }); * ``` * * It scans for `@controller` files at build time and injects a static import of * each into the entrypoint(s), so they're bundled and self-register — the same * set the runtime scan would have found. Your entry keeps calling `createApp()` * with no arguments; nothing in the app changes. * * @param options - plugin options (e.g. the `dir` to scan for controllers) * @returns a `Bun.build` plugin that injects discovered controller imports */ export declare function turnoverPlugin(options?: TurnoverPluginOptions): BunPlugin; //# sourceMappingURL=bundler.d.ts.map