import type { PageModuleBuildImportOptions } from './page-module-import.service.js'; import { RouteModuleDependencyHasher, type RouteModuleDependencyHashes } from './route-module-dependency-hasher.js'; import { type RouteModuleBuildCacheLookup, type RouteModuleBuildCacheManifest, type RouteModuleStaticRenderCacheContext } from './route-module-build-manifest.js'; export type { RouteModuleDependencyHashes }; type RouteModuleBuildCacheDependencies = { readManifest: (manifestPath: string) => RouteModuleBuildCacheManifest | undefined; writeManifest: (manifestPath: string, manifest: RouteModuleBuildCacheManifest) => void; exists: (filePath: string) => boolean; getCorePackageVersion: () => string; createDependencyHasher: () => RouteModuleDependencyHasher; }; /** * Persists route-module transpile and static-render metadata under one server outdir. */ export declare class RouteModuleBuildCache { private readonly manifestPath; private readonly dependencies; private readonly dependencyHasher; private manifest; private manifestLoaded; constructor(outdir: string, dependencies?: Partial); lookup(options: PageModuleBuildImportOptions & { fileHash: string; }): RouteModuleBuildCacheLookup | undefined; recordBuild(options: PageModuleBuildImportOptions & { fileHash: string; outputPath: string; dependencyModulePaths?: readonly string[]; }): void; isIncrementalStaticGenerationAvailable(context: RouteModuleStaticRenderCacheContext): boolean; ensureIncrementalStaticGenerationContext(context: RouteModuleStaticRenderCacheContext): void; canReuseStaticRender(options: { sourceFile: string; pathname: string; renderedOutputPath: string; context: RouteModuleStaticRenderCacheContext; force?: boolean; }): boolean; lookupStaticRender(options: { filePath: string; pathname: string; sourceHash: string; renderedOutputPath: string; context: RouteModuleStaticRenderCacheContext; }): boolean; recordStaticRender(options: { filePath: string; pathname: string; sourceHash: string; renderedOutputPath: string; context: RouteModuleStaticRenderCacheContext; }): void; resetMemory(): void; /** * Removes every persisted route-module entry after development invalidation. * * @remarks * Server bundles may externalize generated modules whose source dependencies * are not present in the route bundle's dependency graph. Keeping an entry * after its server graph changes can therefore reload a route that still * imports an obsolete external bundle. */ clearDevelopmentEntries(): void; pruneStaleRenderedOutputs(activePathnames: ReadonlySet): string[]; private loadManifest; private persistManifest; }