import type yargs from "yargs"; import type { OpenNextConfig } from "../../../api/config.js"; export type WithWranglerArgs = T & { wranglerArgs: string[]; wranglerConfigPath: string | undefined; env: string | undefined; }; export declare const nextAppDir: any; /** * Print headers and warnings for the CLI. * * @param command */ export declare function printHeaders(command: string): void; /** * Compile the OpenNext config. * * When users do not specify a custom config file (using `--openNextConfigPath`), * the CLI will offer to create one. * * When users specify a custom config file but it doesn't exist, we throw an Error. * * @throws If a custom config path is provided but the file does not exist. * @throws If no config file is found and the user declines to create one. * * @param configPath Optional path to the config file. Absolute or relative to cwd. * @returns The compiled OpenNext config and the build directory. * */ export declare function compileConfig(configPath: string | undefined): Promise<{ config: import("@opennextjs/aws/types/open-next.js").OpenNextConfig; buildDir: string; }>; /** * Retrieve the OpenNext config compiled by the build, and ensure it is for Cloudflare. * * The compiled config is looked up in the default build output first. When it is not there, the * source config is compiled to resolve a custom `buildOutputPath`. * * Exits the process when the compiled config can not be found, i.e. the app was not built. * * @returns OpenNext config. */ export declare function retrieveCompiledConfig(): Promise<{ config: any; }>; /** * Normalize the OpenNext options and set the logging level. * * @param config * @param buildDir Directory to use when building the application * @returns Normalized options. */ export declare function getNormalizedOptions(config: OpenNextConfig, buildDir?: any): { appBuildOutputPath: string; appPackageJsonPath: string; appPath: string; appPublicPath: string; buildDir: string; config: import("@opennextjs/aws/types/open-next.js").OpenNextConfig; debug: boolean; minify: boolean; monorepoRoot: string; nextVersion: string; openNextVersion: string; openNextDistDir: string; outputDir: string; packager: "npm" | "pnpm" | "yarn" | "bun"; tempBuildDir: string; }; /** * Read the Wrangler config. * * @param args Wrangler environment and config path. * @returns Wrangler config. */ export declare function readWranglerConfig(args: WithWranglerArgs): Promise; /** * Adds flags for the wrangler config path and environment to the yargs configuration. */ export declare function withWranglerOptions(args: T): yargs.Argv<{ config: string | undefined; } & { configPath: string | undefined; } & { env: string | undefined; }>; type WranglerInputArgs = { configPath: string | undefined; config: string | undefined; env: string | undefined; remote?: boolean | undefined; }; /** * * @param args * @returns The inputted args, and an array of arguments that can be given to wrangler commands, including the `--config` and `--env` args. */ export declare function withWranglerPassthroughArgs>(args: T): WithWranglerArgs; export {};