import fsExtra from "fs-extra"; import semVer from "semver"; import { OutputBundleOptions, RoutesManifest, AdapterMetadata, MiddlewareManifest } from "./interfaces.js"; import { NextConfigComplete } from "next/dist/server/config-shared.js"; export declare const copy: typeof fsExtra.copy, exists: typeof import("fs").exists.__promisify__ & typeof import("fs").exists, writeFile: typeof import("fs").writeFile.__promisify__ & typeof import("fs").writeFile, readJson: typeof import("jsonfile").readFile, readdir: typeof import("fs").readdir.__promisify__ & typeof import("fs").readdir, readFileSync: typeof fsExtra.readFileSync, existsSync: typeof fsExtra.existsSync, ensureDir: typeof fsExtra.ensureDir; export declare const satisfies: typeof semVer.satisfies; export declare function checkNextJSVersion(version: string | undefined): void; export declare function loadConfig(root: string, projectRoot: string): Promise; /** * Loads the route manifest from the standalone directory. * @param standalonePath The path to the standalone directory. * @param distDir The path to the dist directory. * @return The route manifest. */ export declare function loadRouteManifest(standalonePath: string, distDir: string): RoutesManifest; /** * Loads the middleware manifest from the standalone directory. * @param standalonePath The path to the standalone directory. * @param distDir The path to the dist directory. * @return The middleware manifest. */ export declare function loadMiddlewareManifest(standalonePath: string, distDir: string): MiddlewareManifest; /** * Writes the route manifest to the standalone directory. * @param standalonePath The path to the standalone directory. * @param distDir The path to the dist directory. * @param customManifest The route manifest to write. */ export declare function writeRouteManifest(standalonePath: string, distDir: string, customManifest: RoutesManifest): Promise; export declare const isMain: (meta: ImportMeta) => boolean; /** * Provides the paths in the output bundle for the built artifacts. * @param rootDir The root directory of the uploaded source code. * @param appDir The path to the application source code, relative to the root. * @return The output bundle paths. */ export declare function populateOutputBundleOptions(rootDir: string, appDir: string, nextBuildDirectory: string): OutputBundleOptions; /** * Copy static assets and other resources into the standlone directory, also generates the bundle.yaml * @param rootDir The root directory of the uploaded source code. * @param outputBundleOptions The target location of built artifacts in the output bundle. * @param nextBuildDirectory The location of the .next directory. */ export declare function generateBuildOutput(rootDir: string, appDir: string, opts: OutputBundleOptions, nextBuildDirectory: string, nextVersion: string, adapterMetadata: AdapterMetadata): Promise; export declare function getAdapterMetadata(): AdapterMetadata; export declare function validateOutputDirectory(opts: OutputBundleOptions, nextBuildDirectory: string): Promise;