import { NodeTarget, Target, SeaEnhancedOptions, NodeVersion, NodeOs } from './types'; export type GetNodejsExecutableOptions = { useLocalNode?: boolean; nodePath?: string; }; export type SeaConfig = { disableExperimentalSEAWarning: boolean; useSnapshot: boolean; useCodeCache: boolean; assets?: Record; }; export type SeaOptions = { seaConfig?: SeaConfig; signature?: boolean; targets: (NodeTarget & Partial)[]; } & GetNodejsExecutableOptions; /** Wider than NodeTarget: host platforms include e.g. `linuxstatic`. */ type PlatformArch = { platform: string; arch: string; }; /** Where a target's node archive lives and how it is named. */ interface NodeDist { os: NodeOs; /** Arch segment of the archive name, e.g. `x64` or `x64-musl`. */ archiveArch: string; /** Release root holding `index.json` and `/`. */ baseUrl: string; } /** * musl (`alpine`), riscv64 and loong64 builds are only published on * unofficial-builds.nodejs.org; everything else is on nodejs.org/dist. */ export declare function getNodeDist(target: PlatformArch): NodeDist; /** Archive name plus the URLs of the archive and its checksum list. */ export declare function getNodeArchive({ os, archiveArch, baseUrl }: NodeDist, nodeVersion: NodeVersion): { fileName: string; url: string; checksumUrl: string; }; /** * Get the latest Node.js version covering a partial range that every * dist has a build for. Accepts `22`, `22.22`, or `22.22.2`; returns the * canonical v-prefixed triple the rest of the file expects. */ export declare function getNodeVersion(dists: readonly NodeDist[], range: string): Promise; /** Resolve the one Node.js version (e.g. `v22.22.2`) used by every target. */ export declare function resolveSharedNodeVersion(targets: readonly NodeTarget[], opts: GetNodejsExecutableOptions): Promise; /** * Patch mach-O __LINKEDIT (non-SEA only) and ad-hoc sign the binary. * * The __LINKEDIT patch exists for the classic pkg flow: pkg appends the * VFS payload to the end of the binary, and codesign only hashes content * covered by __LINKEDIT — so the segment must be extended to include the * payload before signing. * * Pass `isSea: true` to skip the patch. For SEA binaries postject * already creates a dedicated NODE_SEA `LC_SEGMENT_64` (per the * [Node.js SEA docs](https://nodejs.org/api/single-executable-applications.html)) * and __LINKEDIT already sits at the file tail with * `filesize = file.length - fileoff`, so the patch is a no-op on the * resulting Mach-O. The docs call for just `codesign --sign -` after * postject, which is what `signMachOExecutable` does. */ export declare function signMacOSIfNeeded(output: string, target: NodeTarget & Partial, signature?: boolean, isSea?: boolean): Promise; /** * SEA prep blobs are Node-version specific (e.g. Node 25.8 added an * exec_argv_extension header field), so a single blob cannot be safely * baked into binaries of different Node versions. Reject mixed-range * target lists up front: one range resolves to one version, the newest * every target's release root has (unofficial-builds can lag nodejs.org). */ export declare function assertSingleTargetRange(targets: (NodeTarget & Partial)[]): void; /** * Index into `targets` of the first entry whose platform+arch match * `host`, or -1 when no target is runnable on the host. Exported for * unit testing step 1 of the SEA blob-generator selection without * spinning up a full pkg invocation. */ export declare function pickMatchingHostTargetIndex(host: PlatformArch, targets: readonly PlatformArch[]): number; /** Create NodeJS executable using the enhanced SEA pipeline (walker + refiner + assets) */ export declare function seaEnhanced(entryPoint: string, opts: SeaEnhancedOptions): Promise; /** Create NodeJS executable using sea */ export default function sea(entryPoint: string, opts: SeaOptions): Promise; export {}; //# sourceMappingURL=sea.d.ts.map