/** * Module Response - the single owner of turning a module-serve failure into * an HTTP Response. * * `serveModule` (module-server.ts) has two very different reasons to fail a * request for the same status code: the module simply doesn't exist (a * cacheable miss), or the request was refused by an admission/protection * check (an uncacheable rejection). Those two cases must never share a * `Cache-Control` directive. A shared cache that reused a rejection across a * differently-admitted request would leak an authorization decision across a * security boundary. Naming the two shapes here, instead of re-spelling the * header pair inline at each call site, is what keeps that difference from * being silently "tidied away" by a future edit. * * @module modules/server/module-response */ /** * Ordinary module miss: nothing exists at this path. * * `no-cache` (revalidate before reuse) is safe here because the absence of a * resource is not a decision that varies by caller or credential, so it is * fine to remember and re-check. */ export declare function moduleNotFound(method: string, message?: string): Response; /** * Admission / protected-path rejection: the module exists, but this request * is not allowed to see it (protected path, production release manifest * admission, server-only module boundary, rejected dependency, ...). * * This must stay `no-store`. Unlike {@link moduleNotFound}, this response * reflects an authorization decision, not the absence of a resource, and * caching it would * risk serving (or hiding) that decision for a request it was never made for. * Do not change this to `no-cache` to "match" the not-found case; that is a * security regression, not a cleanup. */ export declare function moduleRejected(method: string, message?: string): Response; /** Malformed request the caller cannot fix by retrying identically. */ export declare function moduleBadRequest(method: string, message: string): Response; /** HTTP verb other than GET/HEAD. */ export declare function moduleMethodNotAllowed(method: string): Response; /** Server-side state required to admit the request (e.g. a release manifest) isn't ready. */ export declare function moduleServiceUnavailable(method: string, message: string): Response; /** The client's dependency-pinning cache key does not match a known snapshot. */ export declare function unknownDependencySnapshot(method: string): Response; //# sourceMappingURL=module-response.d.ts.map