//#region src/lib/config.d.ts /** * Configuration authored in `flue.config.ts`. Only the fields declared by * this interface are accepted. */ interface UserFlueConfig { /** * Build and development target. Required unless `--target` is passed to the * CLI. There is no default. * * - `'node'` builds a Node.js server. * - `'cloudflare'` builds a Workers-compatible application. */ target?: 'node' | 'cloudflare'; /** * Project root. Must not be empty. Relative values loaded from a * configuration file resolve from the directory containing that file; * relative inline values resolve from the caller's working directory. * Defaults to the config directory, or to the search directory when no * configuration file is loaded. * * Flue uses `/.flue` when it exists as a directory, otherwise * `/src` when it exists as a directory, otherwise ``. */ root?: string; /** * Build output directory. Must not be empty. Relative values loaded from a * configuration file resolve from the directory containing that file; * relative inline values resolve from the caller's working directory. Paths * do not resolve from {@link UserFlueConfig.root}. Defaults to `/dist`. */ output?: string; } /** Fully resolved configuration consumed by the rest of the CLI. */ interface FlueConfig { /** Selected build and development target. */ target: 'node' | 'cloudflare'; /** Absolute project-root path. */ root: string; /** Absolute directory from which authored modules are discovered. */ sourceRoot: string; /** Absolute build-output path. */ output: string; } /** * Provides type checking and editor completion for `flue.config.ts`. Returns * the configuration unchanged. * * ```ts * import { defineConfig } from '@flue/cli/config'; * * export default defineConfig({ * target: 'node', * }); * ``` */ declare function defineConfig(config: UserFlueConfig): UserFlueConfig; //#endregion export { type FlueConfig, type UserFlueConfig, defineConfig };