@shopify/cli-kit
Version:
A set of utilities, interfaces, and models that are common across all the platform features
63 lines (62 loc) • 1.6 kB
TypeScript
interface ZipOptions {
/**
* The absolute path to the directory to be zipped.
*/
inputDirectory: string;
/**
* The absolute path to the output zip file.
*/
outputZipPath: string;
/**
* Pattern(s) to match when adding files to zip, uses glob expressions.
*/
matchFilePattern?: string | string[];
}
/**
* It zips a directory and by default normalizes the paths to be forward-slash.
* Even with forward-slash paths, zip files should still be able to be opened on
* Windows.
*
* @param options - ZipOptions.
*/
export declare function zip(options: ZipOptions): Promise<void>;
export interface BrotliOptions {
/**
* The directory to compress.
*/
inputDirectory: string;
/**
* The path where the compressed file will be saved.
*/
outputPath: string;
/**
* An optional glob pattern to match files.
*/
matchFilePattern?: string | string[];
/**
* Brotli compression level (0-11, default: 11).
*/
level?: number;
}
/**
* Options for decompressing a Brotli compressed tar archive.
*/
export interface DecompressionOptions {
/**
* Path to the compressed file.
*/
inputFile: string;
/**
* Directory where files should be extracted.
*/
outputDirectory: string;
}
/**
* It compresses a directory with Brotli.
* First creates a tar archive to preserve directory structure,
* then compresses it with Brotli.
*
* @param options - BrotliOptions.
*/
export declare function brotliCompress(options: BrotliOptions): Promise<void>;
export {};