/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Minimal static file server that honours HTTP Range requests (206) — Python's `http.server` does * not, and PMTiles reads via Range, so it can't be served by it. Used to preview/render a local * `.pmtiles` tileset (e.g. the race-dot map, via `mailwoman tiger race-dots-map --serve`). Not for * production; the deployed tiles go through the tile worker. * * Internal helper module — no standalone command. */ import { type Server } from "node:http"; /** * Options for {@linkcode serveWithRangeSupport}. */ export interface ServeRangeOptions { /** * Directory to serve. Default `/tmp`. */ dir?: string; /** * Port to listen on. Default 8899. */ port?: number; } /** * A running range-capable static server, resolved once listening. */ export interface RangeServer { dir: string; port: number; server: Server; close: () => void; } /** * Serve `dir` over localhost with HTTP Range support. Resolves once the server is listening; the caller owns the * lifetime (`close()` to stop — commands typically hold the process open instead). */ export declare function serveWithRangeSupport(options?: ServeRangeOptions, report?: (line: string) => void): Promise; //# sourceMappingURL=serve-range.d.ts.map