From f6c9cc2fa6a167594c82428faf22dc59dbba7404 Mon Sep 17 00:00:00 2001 From: Chris Talkington Date: Sun, 7 Mar 2021 15:33:21 -0600 Subject: [PATCH] Update zip.js --- lib/plugins/zip.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/plugins/zip.js b/lib/plugins/zip.js index ca92f377..df6f0743 100644 --- a/lib/plugins/zip.js +++ b/lib/plugins/zip.js @@ -14,6 +14,7 @@ var util = require('archiver-utils'); * @param {String} [options.comment] Sets the zip archive comment. * @param {Boolean} [options.forceLocalTime=false] Forces the archive to contain local file times instead of UTC. * @param {Boolean} [options.forceZip64=false] Forces the archive to contain ZIP64 headers. + * @param {Boolean} [options.namePrependSlash=false] Prepends a forward slash to archive file paths. * @param {Boolean} [options.store=false] Sets the compression method to STORE. * @param {Object} [options.zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options} */ @@ -25,6 +26,7 @@ var Zip = function(options) { options = this.options = util.defaults(options, { comment: '', forceUTC: false, + namePrependSlash: false, store: false }); @@ -90,6 +92,7 @@ module.exports = Zip; * @property {String} [comment] Sets the zip archive comment. * @property {Boolean} [forceLocalTime=false] Forces the archive to contain local file times instead of UTC. * @property {Boolean} [forceZip64=false] Forces the archive to contain ZIP64 headers. + * @prpperty {Boolean} [namePrependSlash=false] Prepends a forward slash to archive file paths. * @property {Boolean} [store=false] Sets the compression method to STORE. * @property {Object} [zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options} * to control compression. @@ -102,6 +105,7 @@ module.exports = Zip; * @property {String} name Sets the entry name including internal path. * @property {(String|Date)} [date=NOW()] Sets the entry date. * @property {Number} [mode=D:0755/F:0644] Sets the entry permissions. + * @property {Boolean} [namePrependSlash=ZipOptions.namePrependSlash] Prepends a forward slash to archive file paths. * @property {String} [prefix] Sets a path prefix for the entry name. Useful * when working with methods like `directory` or `glob`. * @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing