export interface PackageJsonConfig { scripts?: Record; [key: string]: unknown; } export interface TsConfigJson { compilerOptions?: { outDir?: string; rootDir?: string; [key: string]: unknown; }; [key: string]: unknown; } /** Read and parse package.json from the given directory */ export declare function readPackageJson(cwd: string): PackageJsonConfig | null; /** Read and parse tsconfig.json from the given directory */ export declare function readTsConfig(cwd: string, configPath?: string): TsConfigJson | null; /** Check if a file exists and has a .js or .mjs extension */ export declare function isJavaScriptConfig(cwd: string, baseName: string): boolean; /** Check if a configuration file exists (any extension) */ export declare function configFileExists(cwd: string, baseName: string): string | null; /** Generic interface for framework configuration with output directory */ export interface FrameworkConfig { /** The detected output directory from the config */ outputDir?: string | null; /** The full configuration object (framework-specific) */ config: any; /** The file path where the config was loaded from */ filepath: string; } /** Load Webpack configuration using cosmiconfig */ export declare function loadWebpackConfig(cwd: string): Promise; /** Load Vite configuration using cosmiconfig */ export declare function loadViteConfig(cwd: string): Promise; /** Load Rollup configuration using cosmiconfig */ export declare function loadRollupConfig(cwd: string): Promise; /** Load SWC configuration using cosmiconfig */ export declare function loadSwcConfig(cwd: string): Promise;