| title | @pangular-inspector/devtools/ssr |
|---|---|
| description | Every symbol the @pangular-inspector/devtools/ssr entry point exports, with its declaration and JSDoc, generated from the package source. |
@pangular-inspector/devtools/ssr exports, generated from the package source.
Import from @pangular-inspector/devtools/ssr. This page is generated from packages/devtools/src/ssr.ts and the files it re-exports. Run pnpm docs:api after you change the public API.
Interface. Source: packages/devtools/src/ssr.ts.
The part of an h3 event the tracer reads.
interface NodeEventLike {
node: {req: IncomingMessage; res: ServerResponse};
}Function. Source: packages/devtools/src/ssr.ts.
An h3 or Nitro server middleware that traces page renders on Node, such as
Analog's: export default defineEventHandler(pangularSsrEventHandler()) in
src/server/middleware. It answers only a forced Client render; otherwise
it returns nothing, so the request goes on to the renderer.
function pangularSsrEventHandler(
options: PangularSsrOptions = {},
): (event: NodeEventLike) => true | undefined;Function. Source: packages/devtools/src/ssr.ts.
The Node (req, res, next) tracer behind the hub's ssrMiddleware, for a
server that renders on Node without the Express hub, such as Fastify.
function pangularSsrMiddleware(
options: PangularSsrOptions = {},
): (req: IncomingMessage, res: ServerResponse, next: (error?: unknown) => void) => void;Interface. Source: packages/devtools/src/ssr-fetch.ts.
interface PangularSsrOptions {
/** Path prefixes that are never traced, such as the hub base. */
skip?: string[];
/**
* The app's browser build folder, which holds `index.csr.html`. Needed to
* force a Client render from the panel. It is read with `node:fs` when an
* override asks for it.
*/
browserDistFolder?: string;
}Type. Source: packages/devtools/src/ssr-fetch.ts.
A web-standard request handler, such as AngularAppEngine.handle or app.fetch.
type WebRequestHandler<Args extends unknown[], Result> = (
request: Request,
...rest: Args
) => Result | Promise<Result>;Function. Source: packages/devtools/src/ssr.ts.
Wraps a web-standard SSR handler ((request: Request) => Promise<Response>),
such as AngularAppEngine.handle, a Hono or h3 app's fetch, or a Nitro
route, so each page it renders shows in the SSR & HTTP tab.
function withPangularSsr<Args extends unknown[], Result extends Response | null | undefined>(
handler: (request: Request, ...rest: Args) => Result | Promise<Result>,
options: PangularSsrOptions = {},
): (request: Request, ...rest: Args) => Promise<Result>;