UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

57 lines 1.76 kB
import { ZipExtractor } from '../type'; import { Fs } from '../../../domain/fs'; /** * ZIP extractor implementation using JSZip * Note: In a real implementation, you would use a library like JSZip or node-stream-zip */ export declare class JsZipExtractor implements ZipExtractor { private fs; constructor(fs: Fs); /** * Extract ZIP file to target directory */ extract(zipPath: string, targetDir: string): Promise<void>; /** * List contents of ZIP file */ list(zipPath: string): Promise<string[]>; /** * Real implementation of ZIP extraction using JSZip */ private extractZipData; /** * Extract a single ZIP entry (file or directory) */ private extractSingleEntry; /** * Real implementation of ZIP content listing using JSZip */ private listZipContents; } /** * Browser-compatible ZIP extractor using Web APIs */ export declare class WebZipExtractor implements ZipExtractor { private fs; constructor(fs: Fs); extract(zipPath: string, targetDir: string): Promise<void>; list(zipPath: string): Promise<string[]>; } /** * Mock ZIP extractor for testing */ export declare class MockZipExtractor implements ZipExtractor { private mockContents; setMockContents(zipPath: string, contents: string[]): void; extract(zipPath: string, targetDir: string): Promise<void>; list(zipPath: string): Promise<string[]>; } /** * Factory function to create appropriate ZIP extractor */ export declare function newZipExtractor(fs: Fs, environment?: 'node' | 'browser'): ZipExtractor; /** * Creates a mock ZIP extractor for testing */ export declare function newMockZipExtractor(): MockZipExtractor; //# sourceMappingURL=zipextractor.d.ts.map