import { Page } from 'playwright';
export interface SecurityAnalysis {
    environmentVariables: {
        exposed: string[];
        properlyPrefixed: string[];
        warnings: string[];
    };
    headers: {
        csp: boolean;
        xFrameOptions: string;
        permissionsPolicy: boolean;
        cors: string;
        missingHeaders: string[];
    };
}
export interface ServerActionMonitor {
    invocations: Array<{
        action: string;
        timestamp: Date;
        duration: number;
        payloadSize: number;
        revalidations: string[];
        error?: string;
    }>;
    totalInvocations: number;
    avgExecutionTime: number;
    largestPayload: number;
}
export interface EdgeRuntimeInfo {
    routes: string[];
    unsupportedAPIs: string[];
    bundleSize: string;
    coldStart: string;
    warnings: string[];
}
export interface PPRAnalysis {
    staticShells: string[];
    dynamicHoles: Array<{
        component: string;
        reason: string;
        size: number;
    }>;
    streamingPerformance: {
        ttfb: number;
        chunks: number;
        totalTime: number;
    };
    suspenseBoundaries: number;
}
/**
 * NextJS Advanced Features Module
 *
 * Handles security analysis, server actions, edge runtime, and PPR analysis.
 * This module provides insights into Next.js advanced features and security.
 */
export declare class NextJSAdvancedFeatures {
    private page?;
    private serverActions;
    private hmrMetrics;
    attachToPage(page: Page): Promise<void>;
    getSecurityAnalysis(): Promise<SecurityAnalysis>;
    getServerActionMonitor(): Promise<ServerActionMonitor>;
    getEdgeRuntimeInfo(): Promise<EdgeRuntimeInfo>;
    getPPRAnalysis(): Promise<PPRAnalysis>;
    getHMRAnalysis(): Promise<{
        updates: number;
        failures: number;
        avgUpdateTime: number;
        statePreservation: boolean;
        recentUpdates: Array<{
            timestamp: Date;
            duration: number;
            files: string[];
            success: boolean;
        }>;
    }>;
    debugRoute(): Promise<{
        currentRoute: string;
        routeType: 'page' | 'api' | 'middleware';
        renderingMethod: 'SSG' | 'SSR' | 'ISR' | 'CSR';
        dataFetching: string[];
        cacheStatus: string;
        issues: string[];
        performance: {
            renderTime: number;
            hydrationTime: number;
            totalTime: number;
        };
    }>;
    analyzeServerClientFlow(): Promise<{
        serverComponents: number;
        clientComponents: number;
        hydrationMismatches: string[];
        bundleSplitting: {
            serverChunks: string[];
            clientChunks: string[];
            sharedChunks: string[];
        };
        performance: {
            serverRenderTime: number;
            clientHydrationTime: number;
            totalTime: number;
        };
    }>;
    monitorRSCStream(): Promise<AsyncIterable<{
        timestamp: Date;
        chunk: string;
        component: string;
        size: number;
    }>>;
    private setupSecurityAuditing;
    private setupServerActionMonitoring;
    private setupHMRMonitoring;
}
//# sourceMappingURL=nextjs-advanced-features.d.ts.map