import type { ResolvedSdocsConfig } from '../types.js'; /** The sdocs package version (this file sits at dist/server, package.json two up). */ export declare function sdocsVersion(): string; /** * Remove staging directories whose owner is gone. A killed dev server (or a crash) * never reaches cleanBuildFiles, so these otherwise accumulate one per run — four of * them, ~3.5 MB, had piled up in one project before this existed. * * Liveness is decided by the recorded pid, NOT by age: two sdocs servers on different * ports are a normal thing to run, and sweeping by mtime would delete the other one's * directory out from under it. A directory with no pid file predates this and is * treated as abandoned; anything unreadable is left alone, since deleting what we * cannot explain is the worse failure. */ declare function sweepAbandonedStagingDirs(parent: string): Promise; /** Generate the staging directory with entry files for dev mode */ export declare function generateDevFiles(config: ResolvedSdocsConfig, cwd: string): Promise; /** Generate the staging directory with entry + preview HTML files for build mode */ export declare function generateBuildFiles(config: ResolvedSdocsConfig, cwd: string): Promise<{ sdocsDir: string; inputs: Record; }>; /** Remove a staging directory created by generateDevFiles/generateBuildFiles */ export declare function cleanBuildFiles(stagingDir: string): Promise; /** Internals exposed for tests only. */ export declare const __testing: { sweepAbandonedStagingDirs: typeof sweepAbandonedStagingDirs; }; export {};