import type { Locales, MiddlewareHandler, RouteData, SerializedRouteData, SSRComponentMetadata, SSRLoadedRenderer, SSRResult } from '../../@types/astro.js'; import type { SinglePageBuiltModule } from '../build/types.js'; import type { RoutingStrategies } from '../config/schema.js'; export type ComponentPath = string; export type StylesheetAsset = { type: 'inline'; content: string; } | { type: 'external'; src: string; }; export interface RouteInfo { routeData: RouteData; file: string; links: string[]; scripts: ({ children: string; stage: string; } | { type: 'inline' | 'external'; value: string; })[]; styles: StylesheetAsset[]; } export type SerializedRouteInfo = Omit & { routeData: SerializedRouteData; }; export type ImportComponentInstance = () => Promise; export type SSRManifest = { adapterName: string; routes: RouteInfo[]; site?: string; base: string; trailingSlash: 'always' | 'never' | 'ignore'; buildFormat: 'file' | 'directory' | 'preserve'; compressHTML: boolean; assetsPrefix?: string; renderers: SSRLoadedRenderer[]; /** * Map of directive name (e.g. `load`) to the directive script code */ clientDirectives: Map; entryModules: Record; assets: Set; componentMetadata: SSRResult['componentMetadata']; pageModule?: SinglePageBuiltModule; pageMap?: Map; i18n: SSRManifestI18n | undefined; middleware: MiddlewareHandler; }; export type SSRManifestI18n = { fallback?: Record; routing: RoutingStrategies; locales: Locales; defaultLocale: string; domainLookupTable: Record; }; export type SerializedSSRManifest = Omit & { routes: SerializedRouteInfo[]; assets: string[]; componentMetadata: [string, SSRComponentMetadata][]; clientDirectives: [string, string][]; };