/** * OpenNext build orchestration for Next.js and Payload applications. * * Resolves `@opennextjs/aws` from the app's own node_modules (not from * deploy-core's dependencies) and runs the build with timeout handling, * stream cleanup, and credential masking. * * For Payload apps, generates the import map before building, with the * Payload CLI the app resolves. */ import { type Result } from "@fjall/generator"; import { type ChildEnvPolicy } from "@fjall/util"; import type { DeployCallbacks } from "../../types/callbacks.js"; import type { DeployOptions } from "../../types/params.js"; import type { ApplicationOperation } from "../../types/operations.js"; /** Default build timeout: 10 minutes */ export declare const BUILD_TIMEOUT_MS = 600000; /** Timeout for Payload import map generation: 30 seconds */ export declare const IMPORT_MAP_TIMEOUT_MS = 30000; /** The bin Payload's manifest names for its CLI. */ export declare const PAYLOAD_CLI_BIN = "payload"; /** The Payload CLI command that writes the import map. */ export declare const PAYLOAD_IMPORT_MAP_ARGS: readonly ["generate:importmap"]; /** * Run the OpenNext build for a Next.js or Payload application. * * Checks pattern and options internally — returns `success(undefined)` * when build is not needed (wrong pattern, skipBuild, infraOnly). * * Must be called BEFORE the detection pipeline and BEFORE the * `deployOnly` early-return check, so built artefacts are available * for CDK synth. */ export declare function runOpenNextBuild(operation: ApplicationOperation, pattern: string | null | undefined, callbacks: DeployCallbacks, childEnvPolicy: ChildEnvPolicy, options?: DeployOptions, abortSignal?: AbortSignal): Promise>;