import type { OptionsSync } from 'cosmiconfig'; export interface FileLoaderOptions extends Partial { /** * basename of config file, defaults to `.env`. * * In other words, `.env.yaml`, `.env.yml`, `.env.json`, `.env.toml`, `.env.js` * will be searched by default. */ basename?: string; /** * Use given file directly, instead of recursively searching in directory tree. */ absolutePath?: string; /** * The directory to search from, defaults to `process.cwd()`. See: https://github.com/davidtheclark/cosmiconfig#explorersearch */ searchFrom?: string; /** * If "true", ignore environment variable substitution. * Default: true */ ignoreEnvironmentVariableSubstitution?: boolean; /** * If "true", disallow undefined environment variables. * Default: true */ disallowUndefinedEnvironmentVariables?: boolean; } /** * File loader loads configuration with `cosmiconfig` from file system. * * It is designed to be easy to use by default: * 1. Searching for configuration file starts at `process.cwd()`, and continues * to search up the directory tree until it finds some acceptable configuration. * 2. Various extensions are supported, such as `.json`, `.yaml`, `.toml`, `.js` and `.cjs`. * 3. Configuration base name defaults to .env (so the full name is `.env.json` or `.env.yaml`), * separate file for each environment is also supported. For example, if current `NODE_ENV` is * development, `.env.development.json` has higher priority over `.env.json`. * * @see https://github.com/davidtheclark/cosmiconfig * @param options cosmiconfig initialize options. See: https://github.com/davidtheclark/cosmiconfig#cosmiconfigoptions */ export declare const fileLoader: (options?: FileLoaderOptions) => (() => Record);