@dudousxd/nestjs-telescope
Version:
Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.
21 lines • 1.17 kB
TypeScript
/**
* Append a `Set-Cookie` header to the response WITHOUT clobbering any cookies
* already queued by the host (auth or otherwise). Platform-agnostic raw write —
* no-ops gracefully if the response can't be unwrapped.
*/
export declare function appendSetCookie(response: unknown, cookie: string): void;
/**
* Did something already write to this response?
*
* Used to decide whether a host's `unauthenticatedPage` hook actually produced a page. A hook that
* returns without writing (an early `return`, a forgotten `await`, a template that resolved to
* nothing) would otherwise leave the request hanging forever — the browser spins until it times
* out, with no error anywhere. Checking this lets the caller fall back to serving the SPA.
*/
export declare function responseAlreadyWritten(response: unknown): boolean;
/**
* Write a full HTML page on the raw response and END it. Used by the dashboard's SPA shell route,
* which is non-passthrough so a host's `unauthenticatedPage` can take the response over instead.
*/
export declare function sendHtml(response: unknown, status: number, html: string): void;
//# sourceMappingURL=auth-response.d.ts.map