///
import type { Arguments as Flags } from 'yargs-parser';
import type { AstroConfig, AstroUserConfig, CLIFlags } from '../../@types/astro';
import fs from 'node:fs';
export declare const LEGACY_ASTRO_CONFIG_KEYS: Set;
/** Turn raw config values into normalized values */
export declare function validateConfig(userConfig: any, root: string, cmd: string): Promise;
/** Convert the generic "yargs" flag object into our own, custom TypeScript object. */
export declare function resolveFlags(flags: Partial): CLIFlags;
export declare function resolveRoot(cwd?: string | URL): string;
interface LoadConfigOptions {
cwd?: string;
flags?: Flags;
cmd: string;
validate?: boolean;
/** Invalidate when reloading a previously loaded config */
isRestart?: boolean;
fsMod?: typeof fs;
}
interface ResolveConfigPathOptions {
cwd?: string;
flags?: Flags;
fs: typeof fs;
}
/**
* Resolve the file URL of the user's `astro.config.js|cjs|mjs|ts` file
*/
export declare function resolveConfigPath(configOptions: ResolveConfigPathOptions): Promise;
interface OpenConfigResult {
userConfig: AstroUserConfig;
astroConfig: AstroConfig;
flags: CLIFlags;
root: string;
}
/** Load a configuration file, returning both the userConfig and astroConfig */
export declare function openConfig(configOptions: LoadConfigOptions): Promise;
/** Attempt to resolve an Astro configuration object. Normalize, validate, and return. */
export declare function resolveConfig(userConfig: AstroUserConfig, root: string, flags: CLIFlags | undefined, cmd: string): Promise;
export declare function createDefaultDevConfig(userConfig?: AstroUserConfig, root?: string): Promise;
export {};