UNPKG

ai-debug-local-mcp

Version:

🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh

99 lines • 3.06 kB
/** * NextJS Rendering & SSR Module * * Phase 3 of NextJS Debug Engine Enhanced modularization following the proven * 4-module architecture pattern. This module contains SSR/SSG analysis, * React Server Components debugging, and data fetching functionality. * * Contains rendering functionality: * - Server-Side Rendering (SSR) analysis and debugging * - Static Site Generation (SSG) and ISR monitoring * - React Server Components (RSC) inspection * - Data fetching pattern analysis and optimization * - Server/Client boundary analysis * * @module nextjs-rendering-ssr * @since Cycle 23 - July 13, 2025 */ import { Page } from 'playwright'; export interface DataFetchingAnalysis { method: 'fetch with cache' | 'fetch no-store' | 'getServerSideProps' | 'getStaticProps' | 'server-action'; cacheStatus: 'HIT' | 'MISS' | 'STALE' | 'NONE'; revalidateTime?: number; waterfalls: Array<{ component: string; fetchTime: string; blocking: boolean; parallel?: string[]; }>; } export interface ServerClientBoundary { component: string; type: 'server' | 'client'; depth: number; children: ServerClientBoundary[]; props: Record<string, any>; serializedSize?: number; } export interface RSCStreamInfo { timestamp: Date; chunk: string; componentName?: string; propsSize: number; isError: boolean; } export interface HydrationInfo { hasErrors: boolean; mismatchedElements: Array<{ selector: string; serverHTML: string; clientHTML: string; }>; hydrationTime: number; suppressedWarnings: string[]; } export declare class NextJSRenderingSSR { private page; constructor(page: Page); setupRenderingMonitoring(): Promise<void>; getDataFetchingAnalysis(): Promise<DataFetchingAnalysis[]>; debugRoute(): Promise<{ route: any; dataFetching: DataFetchingAnalysis[]; rendering: { method: string; hydrationTime?: number; serverComponents?: number; clientComponents?: number; }; performance: { TTFB: number; renderTime: number; hydrationTime: number; }; }>; analyzeServerClientFlow(): Promise<{ boundaries: ServerClientBoundary[]; dataFlow: Array<{ from: string; to: string; type: 'props' | 'state' | 'context'; size: number; }>; optimizations: string[]; }>; private getServerClientBoundaries; monitorRSCStream(): Promise<AsyncIterable<RSCStreamInfo>>; detectHydrationIssues(): Promise<HydrationInfo>; analyzeSSRPerformance(): Promise<{ serverRenderTime: number; hydrationTime: number; totalBlockingTime: number; recommendations: string[]; }>; isSSRPage(): Promise<boolean>; isSSGPage(): Promise<boolean>; isISRPage(): Promise<boolean>; isAppRouter(): Promise<boolean>; } //# sourceMappingURL=nextjs-rendering-ssr.d.ts.map