import { NativeTraceDeps } from "./native-packages.js"; import { ResolvedFunctionConfig } from "@neon/config"; //#region src/lib/function-bundle.d.ts /** Deploy-level ZIP. `@neon/config`'s FunctionBundler returns a file map. */ type FunctionBundler = (fn: ResolvedFunctionConfig) => Promise; /** * Prepended to the ESM bundle. Bundled dependencies are frequently CommonJS, but an ESM * output (`format: "esm"`) has no `require` / `__filename` / `__dirname` in scope — so any * bundled CJS code that calls `require(...)` would fail at load with * `Dynamic require of "x" is not supported`. Re-create those globals via `createRequire` * so CJS and ESM dependencies coexist in the single `index.mjs`. */ declare const ESM_CJS_INTEROP_BANNER = "import{createRequire as ___cr}from'module';import{fileURLToPath as ___f}from'url';import{dirname as ___d}from'path';const require=___cr(import.meta.url);const __filename=___f(import.meta.url);const __dirname=___d(__filename);"; type FunctionBundleOptions = { nativeDeps?: Partial; /** Callers own advisory output because this library has no output sink. */ onWarning?: (message: string) => void; }; /** * Honors `fn.bundler`. The packaged CLI never calls this — it injects its own * bundler so esbuild stays out of the pkg graph. */ declare function buildFunctionBundle(fn: ResolvedFunctionConfig, options?: FunctionBundleOptions): Promise; //#endregion export { ESM_CJS_INTEROP_BANNER, FunctionBundler, buildFunctionBundle }; //# sourceMappingURL=function-bundle.d.ts.map