UNPKG

matterbridge

Version:
38 lines 1.76 kB
/** * This file contains the createZip function. * * @file createZip.ts * @author Luca Liguori * @date 2025-02-16 * @version 1.0.0 * * Copyright 2025, 2026, 2027 Luca Liguori. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /** * Creates a ZIP archive from the specified source pattern or directory and writes it to the specified output path. * * @param {string} outputPath - The path where the output ZIP file will be written. * @param {string[]} sourcePaths - The source pattern or directory to be zipped (use path.join for sourcePath). * @returns {Promise<number>} - A promise that resolves to the total number of bytes written to the ZIP file. * * @remarks * This function uses the `archiver` library to create a ZIP archive. It sets the compression level to 9 (maximum compression). * The function ensures that the output file is properly closed after the archiving process is complete. * It logs the progress and the total number of bytes written to the console. * * This function uses the `glob` library to match files based on the source pattern (internally converted in posix). */ export declare function createZip(outputPath: string, ...sourcePaths: string[]): Promise<number>; //# sourceMappingURL=createZip.d.ts.map