@analogjs/router 3.0.0-beta.19 → 3.0.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ import type { ApplicationConfig } from '@angular/core';
2
+ import type { ServerContext } from '@analogjs/router/tokens';
3
+ export type PageEndpointModule = {
4
+ load?: (ctx: unknown) => unknown;
5
+ action?: (ctx: unknown) => unknown;
6
+ };
7
+ export type ServerRender = (url: string, document: string, context: ServerContext) => Promise<string | ReadableStream<Uint8Array>>;
8
+ /** Everything the request handler needs from the app, as lazy imports. */
9
+ export type AnalogServerManifest = {
10
+ apiPrefix: string;
11
+ /** The HTML document to render around the app, for a request URL. */
12
+ template: (url: string) => Promise<string>;
13
+ /** The app's SSR entry (`main.server.ts` default export). */
14
+ render: () => Promise<ServerRender>;
15
+ /** The app's server config (`app.config.server.ts`). */
16
+ config: () => Promise<ApplicationConfig>;
17
+ /** Every `*.server.ts`, imported so server functions register. */
18
+ serverFnModules: (() => Promise<unknown>)[];
19
+ /** Page endpoint route → `*.server.ts` module. */
20
+ pageEndpoints: Record<string, () => Promise<PageEndpointModule>>;
21
+ };
22
+ /**
23
+ * Filled in at build time by the platform's server build, the same way the
24
+ * router plugin fills in `ANALOG_ROUTE_FILES`. Empty without it.
25
+ */
26
+ export declare const ANALOG_SERVER_MANIFEST: Partial<AnalogServerManifest>;