UNPKG

nostr-deploy-server

Version:

Node.js server for hosting static websites under npub subdomains using Nostr protocol and Blossom servers

52 lines 1.41 kB
export interface SSRResult { html: string; contentType: string; status: number; } export interface SSROptions { timeout?: number; waitUntil?: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2'; viewport?: { width: number; height: number; }; userAgent?: string; } export declare class SSRHelper { private browser; private config; private activePageCount; constructor(); private initializeBrowser; private ensureBrowser; /** * Render a static site using Puppeteer */ renderPage(url: string, originalContent: Buffer, contentType: string, options?: SSROptions): Promise<SSRResult>; /** * Enhance HTML with SSR-specific optimizations */ private enhanceHtmlForSSR; /** * Check if a file should be SSR rendered */ shouldRenderSSR(contentType: string, path: string): boolean; /** * Close the browser and cleanup */ close(): Promise<void>; /** * Fix incorrect MIME types for assets during SSR * Copied from BlossomHelper to handle same MIME type issues */ private fixMimeTypeForSSR; /** * Check if the MIME type is correct for the given file extension */ private isMimeTypeCorrectForExtension; /** * Get content type from file path */ private getContentTypeFromPath; } //# sourceMappingURL=ssr.d.ts.map