/** * Cache Analysis Module * * Analyzes which files can be reused from previous deployments. * Extracted from orchestrator.ts for better maintainability. */ import type { FileReference, DependencyNode } from '../analysis/index.js'; import type { InscribedFile } from '../inscription/inscription.types.js'; import type { ChunkManifest } from '../chunking/index.js'; import type { ChunkedFileInfo, OrchestratorCallbacks } from '../orchestration/orchestration.types.js'; /** * Result of cache analysis */ export interface CacheAnalysisResult { cachedCount: number; cachedFiles: string[]; chunkedFilesInfo: ChunkedFileInfo[]; cachedChunkManifests: ChunkManifest[]; hasChunkedFiles: boolean; } /** * Determines if an inscription can be reused from a previous deployment * * @param filePath - Path of the file * @param fileRef - File reference from analysis * @param previousInscription - Previous inscription (if exists) * @param urlMap - URL mapping for dependencies * @returns True if inscription can be reused */ declare function canReuseInscription(filePath: string, fileRef: FileReference, previousInscription: InscribedFile | undefined, urlMap: Map): boolean; /** * Analyzes which files can be cached from previous deployments * * Determines: * - Which files have unchanged content and dependencies (can be reused) * - Which chunked files can be cached * - Whether the service worker can be cached * * @param order - Ordered list of file paths * @param graph - Dependency graph * @param previousInscriptions - Map of previous inscriptions * @param primaryContentUrl - Content delivery URL * @param callbacks - Optional progress callbacks * @returns Cache analysis result */ export declare function analyzeCachedFiles(order: string[], graph: Map, previousInscriptions: Map, primaryContentUrl: string, callbacks?: OrchestratorCallbacks): Promise; /** * Helper function to check if an inscription can be reused * Exported for use in wave processing */ export { canReuseInscription }; //# sourceMappingURL=analyzer.d.ts.map