import { Config } from "./types.js"; //#region src/lib/loader.d.ts /** * Default file names tried (in order) when {@link loadConfigFromFile} is called without an * explicit path. We accept `.ts` first because that's the documented format; `.mjs` and `.js` * fall out for free since jiti handles all of them. */ declare const DEFAULT_CONFIG_FILENAMES: readonly ["neon.ts", "neon.mts", "neon.js", "neon.mjs"]; interface LoadConfigOptions { /** Explicit absolute or cwd-relative path to a config file. Takes precedence over the search. */ path?: string; /** Starting directory for the upward search. Defaults to `process.cwd()`. */ cwd?: string; /** * Hard ceiling for the upward walk — once `current === stopAt` the search returns * `null` even if no `.git` boundary was hit. Defaults to the OS home directory so * stray runs from outside any repo never leak into the user's `~` files. */ stopAt?: string; } /** * Load a `neon.ts` (or any other supported extension) and return the validated {@link Config}. * * Behavior: * - When `path` is set, that file is loaded directly. The file must exist and must default-export * a value produced by `defineConfig()`. * - When `path` is omitted, we walk up from `cwd` picking the **closest** file matching * {@link DEFAULT_CONFIG_FILENAMES}. The walk is monorepo-friendly: intermediate * `package.json` files do **not** stop it, so a single `neon.ts` lifted to the workspace * root keeps working when invoked from inside any sub-package. The walk terminates at the * first directory containing `.git`, at `stopAt`, or at the filesystem root. * * jiti is loaded lazily so that callers who pass an already-resolved `Config` to `pushConfig` * never pay the import cost. */ declare function loadConfigFromFile(options?: LoadConfigOptions): Promise<{ config: Config; resolvedPath: string; }>; //#endregion export { DEFAULT_CONFIG_FILENAMES, LoadConfigOptions, loadConfigFromFile }; //# sourceMappingURL=loader.d.ts.map