import { watch } from "../utils/webpack/bundle"; import webpack from "webpack"; import { Span } from "opentracing"; import { IProgram, Stage } from "./types"; import { PackageJson } from "../.."; import type { GatsbyWorkerPool } from "../utils/worker/pool"; type IActivity = any; export interface IBuildArgs extends IProgram { directory: string; sitePackageJson: PackageJson; prefixPaths: boolean; noUglify: boolean; logPages: boolean; writeToFile: boolean; profile: boolean; graphqlTracing: boolean; openTracingConfigFile: string; functionsPlatform?: string; functionsArch?: string; keepPageRenderer: boolean; } interface IBuildRendererResult { rendererPath: string; stats: webpack.Stats; close: ReturnType["close"]; } export declare function devSSRWillInvalidate(): void; export declare const getDevSSRWebpack: () => { recompileAndResumeWatching: (allowTimedFallback: boolean) => Promise<() => void>; needToRecompileSSRBundle: boolean; }; export declare const buildRenderer: (program: IProgram, stage: Stage, parentSpan?: IActivity) => Promise; export declare const buildPartialHydrationRenderer: (program: IProgram, stage: Stage, parentSpan?: IActivity) => Promise; export declare const deleteRenderer: (rendererPath: string) => Promise; export interface IRenderHtmlResult { unsafeBuiltinsUsageByPagePath: Record>; previewErrors: Record; slicesPropsPerPage: Record; sliceName: string; hasChildren: boolean; }>>; } export declare const doBuildPages: (rendererPath: string, pagePaths: Array, activity: IActivity, workerPool: GatsbyWorkerPool, stage: Stage) => Promise; export declare const buildHTML: ({ program, stage, pagePaths, activity, workerPool, }: { program: IProgram; stage: Stage; pagePaths: Array; activity: IActivity; workerPool: GatsbyWorkerPool; }) => Promise; export declare function buildHTMLPagesAndDeleteStaleArtifacts({ workerPool, parentSpan, program, }: { workerPool: GatsbyWorkerPool; parentSpan?: Span; program: IBuildArgs; }): Promise<{ toRegenerate: Array; toDelete: Array; }>; export declare function buildSlices({ program, workerPool, parentSpan, }: { workerPool: GatsbyWorkerPool; parentSpan?: Span; program: IBuildArgs; }): Promise; export declare function stitchSlicesIntoPagesHTML({ publicDir, parentSpan, }: { publicDir: string; parentSpan?: Span; }): Promise; export {};