@ts-common/azure-js-dev-tools
Version:
Developer dependencies for TypeScript related projects
47 lines • 1.63 kB
TypeScript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
/**
* The result of doing a compression.
*/
export interface CompressionResult {
errors: Error[];
warnings: Error[];
}
/**
* An object that can compress files and folders.
*/
export interface Compressor {
/**
* Zip the provided files.
* @param filePaths The files to zip.
* @param outputFilePath The file path where the zipped file will go.
*/
zipFiles(filePaths: string | string[], outputFilePath: string): Promise<CompressionResult>;
/**
* Zip the provided folder.
* @param folderPath The path to the folder to zip.
* @param outputFilePath The file path where the zipped file will go.
*/
zipFolder(folderPath: string, outputFilePath: string): Promise<CompressionResult>;
}
/**
* A fake Compressor.
*/
export declare class FakeCompressor implements Compressor {
readonly errors: Error[];
readonly warnings: Error[];
zipFiles(filePaths: string | string[], outputFilePath: string): Promise<CompressionResult>;
zipFolder(folderPath: string, outputFilePath: string): Promise<CompressionResult>;
}
/**
* A Compressor that uses the archiver NPM package to do compression.
*/
export declare class ArchiverCompressor implements Compressor {
private zip;
zipFiles(filePaths: string | string[], outputFilePath: string): Promise<CompressionResult>;
zipFolder(folderPath: string, outputFilePath: string): Promise<CompressionResult>;
}
//# sourceMappingURL=compressor.d.ts.map