RouteMiddlewareManifest
The server-only middleware of the routes, as the build emits it.
The server-only middleware of the routes, as the build emits it. Nothing here reaches the browser.
Import#
ts
import type { RouteMiddlewareManifest } from "@shadow-js/dusk/server";
Signature#
ts
interface RouteMiddlewareManifest {
/** Route-level middleware (a page's or layout's `middleware` export), by route id. */
readonly routes: Readonly<Record<string, MiddlewareModule>>;
/** `_middleware` files, by folder relative to the routes directory (`""` for the root). */
readonly directories: Readonly<Record<string, MiddlewareModule>>;
/** For each page route id, the folders whose `_middleware` applies to it, outermost first. */
readonly pages: Readonly<Record<string, readonly string[]>>;
/** For each API route id, the folders whose `_middleware` applies to it, outermost first. */
readonly apis: Readonly<Record<string, readonly string[]>>;
}
Members#
| Name | Type | Description |
|---|---|---|
routes |
readonly routes: Readonly<Record<string, MiddlewareModule>> |
Route-level middleware (a page's or layout's middleware export), by route id. |
directories |
readonly directories: Readonly<Record<string, MiddlewareModule>> |
_middleware files, by folder relative to the routes directory ("" for the root). |
pages |
readonly pages: Readonly<Record<string, readonly string[]>> |
For each page route id, the folders whose _middleware applies to it, outermost first. |
apis |
readonly apis: Readonly<Record<string, readonly string[]>> |
For each API route id, the folders whose _middleware applies to it, outermost first. |