export interface ScannedViewRenderer { rendererKey: string; rendererId: string; type: "page" | "component" | "fragment"; method?: string; /** HTTP status code this renderer handles (e.g., 401, 404, 500). Undefined = default (200/success). */ statusCode?: number; fragmentLocation?: string; fragmentId?: string; relativePath: string; /** Path to `_..sse.tsx` (sibling SSE renderer for this fragment). */ sseRendererPath?: string; /** Conflicting SSE renderer aliases for the same fragment. */ sseRendererConflicts?: string[]; renderParamWarning?: "missing" | "any" | "unknown"; } /** Streaming frame renderers for one compatibility key. */ export interface ScannedStreamRenderer { rendererKey: string; relativePath: string; /** Render exports found in the file (renderShell/renderItem/renderSummary/renderError). */ exports: string[]; } export interface ScannedMethodModule { method: string; operationId?: string; relativePath: string; exports: string[]; isRaw: boolean; looseSchemas: string[]; allowUnknownKeysSchemas?: string[]; redundantStripSchemas?: string[]; } export interface ScannedRoute { viewId: string; path: string; paramNames: string[]; relativePath: string; metadataExports: string[]; methodModules: ScannedMethodModule[]; /** @deprecated use metadataExports or methodModules. */ handlerExports: string[]; methods: string[]; renderers: ScannedViewRenderer[]; /** Per-theme streaming renderers (streaming views only). */ streamRenderers: ScannedStreamRenderer[]; sseRelativePath?: string; /** All detected SSE handler paths; more than one is ambiguous. */ sseRelativePaths?: string[]; sseMethod?: string; hasSseHandler: boolean; /** Whether sse.ts exports a `tickSchema` for SSE message validation. */ sseHasTickSchema?: boolean; /** Whether index.ts exports an `ItemSchema` (streaming view, see spec/streaming.md). */ hasItemSchema: boolean; /** Whether index.ts exports a `SummarySchema`. */ hasSummarySchema: boolean; /** Whether any route handler is created with createRawHandler(). */ isRaw: boolean; /** Route metadata schema names that use loose anyvali validators. */ looseSchemas: string[]; allowUnknownKeysSchemas?: string[]; redundantStripSchemas?: string[]; hasRouteImpl: boolean; } export interface ScannedShellFragment { id: string; kind: "fragment" | "block"; relativePath: string; } export interface ScanResult { routes: ScannedRoute[]; shellFragments: ScannedShellFragment[]; dependencyAliases: Record; generatedDir: string; pluginImportPath: string; pluginExports: string[]; pluginLifecycleOverrides: ScannedPluginLifecycleOverride[]; } export interface ScannedPluginLifecycleOverride { method: "init" | "run" | "dispose"; line: number; callsSuper: boolean; awaitsOrReturnsSuper: boolean; } /** * Scan the `bp-routes/` directory tree and build a data structure * describing all routes, UI renderers, components, and fragments. * * @param baseDir - The directory containing `bp-routes/`. The * `.bp-generated/` output directory is placed as a sibling. */ export declare function scanRoutes(baseDir: string, dependencyAliases?: Record): ScanResult; //# sourceMappingURL=scanner.d.ts.map