diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 0711cc00..74d8ddb2 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,14 +1,14 @@ { "name": "action-download-artifact", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "node_modules/@actions/artifact": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.1.0.tgz", - "integrity": "sha512-shO+w/BAnzRnFhfsgUao8sxjByAMqDdfvek2LLKeCueBKXoTrAcp7U/hs9Fdx+z9g7Q0mbIrmHAzAAww4HK1bQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.1.1.tgz", + "integrity": "sha512-Vv4y0EW0ptEkU+Pjs5RGS/0EryTvI6s79LjSV9Gg/h+O3H/ddpjhuX/Bi/HZE4pbNPyjGtQjbdFWphkZhmgabA==", "dependencies": { - "@actions/core": "^1.2.6", + "@actions/core": "^1.9.1", "@actions/http-client": "^2.0.1", "tmp": "^0.2.1", "tmp-promise": "^3.0.2" @@ -35,9 +35,9 @@ } }, "node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", "dependencies": { "tunnel": "^0.0.6" } @@ -144,9 +144,9 @@ } }, "node_modules/adm-zip": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.9.tgz", - "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz", + "integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==", "engines": { "node": ">=6.0" } @@ -157,9 +157,9 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -181,11 +181,11 @@ "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, "node_modules/filesize": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-9.0.11.tgz", - "integrity": "sha512-gTAiTtI0STpKa5xesyTA9hA3LX4ga8sm2nWRcffEa1L/5vQwb4mj2MdzMkoHoGv4QzfDshQZuYscQSf8c4TKOA==", + "version": "10.0.7", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.0.7.tgz", + "integrity": "sha512-iMRG7Qo9nayLoU3PNCiLizYtsy4W1ClrapeCwEgtiQelOAOuRJiw4QaLI+sSr8xr901dgHv+EYP2bCusGZgoiA==", "engines": { - "node": ">= 0.4.0" + "node": ">= 10.4.0" } }, "node_modules/fs.realpath": { @@ -246,9 +246,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", "dependencies": { "whatwg-url": "^5.0.0" }, diff --git a/node_modules/@actions/artifact/lib/internal/download-http-client.js b/node_modules/@actions/artifact/lib/internal/download-http-client.js index a3d16f8c..d01b73eb 100644 --- a/node_modules/@actions/artifact/lib/internal/download-http-client.js +++ b/node_modules/@actions/artifact/lib/internal/download-http-client.js @@ -172,6 +172,13 @@ class DownloadHttpClient { }; const resetDestinationStream = (fileDownloadPath) => __awaiter(this, void 0, void 0, function* () { destinationStream.close(); + // await until file is created at downloadpath; node15 and up fs.createWriteStream had not created a file yet + yield new Promise(resolve => { + destinationStream.on('close', resolve); + if (destinationStream.writableFinished) { + resolve(); + } + }); yield utils_1.rmFile(fileDownloadPath); destinationStream = fs.createWriteStream(fileDownloadPath); }); diff --git a/node_modules/@actions/artifact/lib/internal/download-http-client.js.map b/node_modules/@actions/artifact/lib/internal/download-http-client.js.map index 597c9f87..c82645f1 100644 --- a/node_modules/@actions/artifact/lib/internal/download-http-client.js.map +++ b/node_modules/@actions/artifact/lib/internal/download-http-client.js.map @@ -1 +1 @@ -{"version":3,"file":"download-http-client.js","sourceRoot":"","s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ACf,CAAC,CAAC;yBACD,IAAI,CAAC,MAAM,CAAC;yBACZ,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;wBACnB,IAAI,CAAC,KAAK,CACR,sEAAsE,CACvE,CAAA;wBACD,iBAAiB,CAAC,KAAK,EAAE,CAAA;wBACzB,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC;yBACD,IAAI,CAAC,iBAAiB,CAAC;yBACvB,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;wBAChB,OAAO,EAAE,CAAA;oBACX,CAAC,CAAC;yBACD,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;wBACnB,IAAI,CAAC,KAAK,CACR,wDAAwD,iBAAiB,CAAC,IAAI,EAAE,CACjF,CAAA;wBACD,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC,CAAA;iBACL;qBAAM;oBACL,QAAQ,CAAC,OAAO;yBACb,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;wBACnB,IAAI,CAAC,KAAK,CACR,gEAAgE,CACjE,CAAA;wBACD,iBAAiB,CAAC,KAAK,EAAE,CAAA;wBACzB,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC;yBACD,IAAI,CAAC,iBAAiB,CAAC;yBACvB,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;wBAChB,OAAO,EAAE,CAAA;oBACX,CAAC,CAAC;yBACD,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;wBACnB,IAAI,CAAC,KAAK,CACR,wDAAwD,iBAAiB,CAAC,IAAI,EAAE,CACjF,CAAA;wBACD,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC,CAAA;iBACL;YACH,CAAC,CAAC,CAAA;YACF,OAAM;QACR,CAAC;KAAA;CACF;AAvUD,gDAuUC"} \ No newline at end of file +{"version":3,"file":"download-http-client.js","sourceRoot":"","sources":["../../src/internal/download-http-client.ts"],"names":[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C,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC,CAAA;iBACL;YACH,CAAC,CAAC,CAAA;YACF,OAAM;QACR,CAAC;KAAA;CACF;AA9UD,gDA8UC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/package.json b/node_modules/@actions/artifact/package.json index 8b204dd7..eb2e8fc8 100644 --- a/node_modules/@actions/artifact/package.json +++ b/node_modules/@actions/artifact/package.json @@ -1,6 +1,6 @@ { "name": "@actions/artifact", - "version": "1.1.0", + "version": "1.1.1", "preview": true, "description": "Actions artifact lib", "keywords": [ @@ -37,7 +37,7 @@ "url": "https://github.com/actions/toolkit/issues" }, "dependencies": { - "@actions/core": "^1.2.6", + "@actions/core": "^1.9.1", "@actions/http-client": "^2.0.1", "tmp": "^0.2.1", "tmp-promise": "^3.0.2" diff --git a/node_modules/@actions/http-client/lib/proxy.js b/node_modules/@actions/http-client/lib/proxy.js index 528ffe40..76abb723 100644 --- a/node_modules/@actions/http-client/lib/proxy.js +++ b/node_modules/@actions/http-client/lib/proxy.js @@ -26,6 +26,10 @@ function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; if (!noProxy) { return false; @@ -51,11 +55,22 @@ function checkBypass(reqUrl) { .split(',') .map(x => x.trim().toUpperCase()) .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { + if (upperNoProxyItem === '*' || + upperReqHosts.some(x => x === upperNoProxyItem || + x.endsWith(`.${upperNoProxyItem}`) || + (upperNoProxyItem.startsWith('.') && + x.endsWith(`${upperNoProxyItem}`)))) { return true; } } return false; } exports.checkBypass = checkBypass; +function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return (hostLower === 'localhost' || + hostLower.startsWith('127.') || + hostLower.startsWith('[::1]') || + hostLower.startsWith('[0:0:0:0:0:0:0:1]')); +} //# sourceMappingURL=proxy.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/proxy.js.map b/node_modules/@actions/http-client/lib/proxy.js.map index 4440de9b..b8206790 100644 --- a/node_modules/@actions/http-client/lib/proxy.js.map +++ b/node_modules/@actions/http-client/lib/proxy.js.map @@ -1 +1 @@ -{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,MAAW;IACrC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAA;IAE7C,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE;QACvB,OAAO,SAAS,CAAA;KACjB;IAED,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE;QACrB,IAAI,QAAQ,EAAE;YACZ,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;SAChE;aAAM;YACL,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;SAC9D;IACH,CAAC,CAAC,EAAE,CAAA;IAEJ,IAAI,QAAQ,EAAE;QACZ,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;KACzB;SAAM;QACL,OAAO,SAAS,CAAA;KACjB;AACH,CAAC;AApBD,kCAoBC;AAED,SAAgB,WAAW,CAAC,MAAW;IACrC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,OAAO,KAAK,CAAA;KACb;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;IACxE,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,KAAK,CAAA;KACb;IAED,6BAA6B;IAC7B,IAAI,OAA2B,CAAA;IAC/B,IAAI,MAAM,CAAC,IAAI,EAAE;QACf,OAAO,GAAG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CAAC,IAAI,OAAO,EAAE,CAAC,CAAA;KACrD;IAED,uCAAuC;IACvC,KAAK,MAAM,gBAAgB,IAAI,OAAO;SACnC,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAChC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QACjB,IACE,gBAAgB,KAAK,GAAG;YACxB,aAAa,CAAC,IAAI,CAChB,CAAC,CAAC,EAAE,CACF,CAAC,KAAK,gBAAgB;gBACtB,CAAC,CAAC,QAAQ,CAAC,IAAI,gBAAgB,EAAE,CAAC;gBAClC,CAAC,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC;oBAC/B,CAAC,CAAC,QAAQ,CAAC,GAAG,gBAAgB,EAAE,CAAC,CAAC,CACvC,EACD;YACA,OAAO,IAAI,CAAA;SACZ;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAnDD,kCAmDC;AAED,SAAS,iBAAiB,CAAC,IAAY;IACrC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IACpC,OAAO,CACL,SAAS,KAAK,WAAW;QACzB,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QAC5B,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC;QAC7B,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAC1C,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json index c1de2213..7f5c8ec3 100644 --- a/node_modules/@actions/http-client/package.json +++ b/node_modules/@actions/http-client/package.json @@ -1,6 +1,6 @@ { "name": "@actions/http-client", - "version": "2.0.1", + "version": "2.1.0", "description": "Actions Http Client", "keywords": [ "github", diff --git a/node_modules/adm-zip/LICENSE b/node_modules/adm-zip/LICENSE index 3f2f732a..f748c3de 100644 --- a/node_modules/adm-zip/LICENSE +++ b/node_modules/adm-zip/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2012 Another-D-Mention Software and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2012 Another-D-Mention Software and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/adm-zip/adm-zip.js b/node_modules/adm-zip/adm-zip.js index a4dfca60..e1f1ce57 100644 --- a/node_modules/adm-zip/adm-zip.js +++ b/node_modules/adm-zip/adm-zip.js @@ -266,8 +266,9 @@ module.exports = function (/**String*/ input, /** object */ options) { * @param zipPath optional path inside zip * @param filter optional RegExp or Function if files match will * be included. + * @param {number | object} attr - number as unix file permissions, object as filesystem Stats object */ - addLocalFolder: function (/**String*/ localPath, /**String=*/ zipPath, /**=RegExp|Function*/ filter) { + addLocalFolder: function (/**String*/ localPath, /**String=*/ zipPath, /**=RegExp|Function*/ filter, /**=number|object*/ attr) { // Prepare filter if (filter instanceof RegExp) { // if filter is RegExp wrap it @@ -299,9 +300,9 @@ module.exports = function (/**String*/ input, /** object */ options) { if (filter(p)) { var stats = filetools.fs.statSync(filepath); if (stats.isFile()) { - self.addFile(zipPath + p, filetools.fs.readFileSync(filepath), "", stats); + self.addFile(zipPath + p, filetools.fs.readFileSync(filepath), "", attr ? attr : stats); } else { - self.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); + self.addFile(zipPath + p + "/", Buffer.alloc(0), "", attr ? attr : stats); } } }); @@ -375,7 +376,9 @@ module.exports = function (/**String*/ input, /** object */ options) { } }); } else { - next(); + process.nextTick(() => { + next(); + }); } } else { callback(true, undefined); @@ -441,24 +444,22 @@ module.exports = function (/**String*/ input, /** object */ options) { var fileattr = entry.isDirectory ? 0x10 : 0; // (MS-DOS directory flag) // extended attributes field for Unix - if (!Utils.isWin) { - // set file type either S_IFDIR / S_IFREG - let unix = entry.isDirectory ? 0x4000 : 0x8000; - - if (isStat) { - // File attributes from file stats - unix |= 0xfff & attr.mode; - } else if ("number" === typeof attr) { - // attr from given attr values - unix |= 0xfff & attr; - } else { - // Default values: - unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--) - } + // set file type either S_IFDIR / S_IFREG + let unix = entry.isDirectory ? 0x4000 : 0x8000; - fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes + if (isStat) { + // File attributes from file stats + unix |= 0xfff & attr.mode; + } else if ("number" === typeof attr) { + // attr from given attr values + unix |= 0xfff & attr; + } else { + // Default values: + unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--) } + fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes + entry.attr = fileattr; entry.setData(content); @@ -633,12 +634,14 @@ module.exports = function (/**String*/ input, /** object */ options) { * @param callback The callback will be executed when all entries are extracted successfully or any error is thrown. */ extractAllToAsync: function (/**String*/ targetPath, /**Boolean*/ overwrite, /**Boolean*/ keepOriginalPermission, /**Function*/ callback) { - if (!callback) { - callback = function () {}; - } overwrite = get_Bool(overwrite, false); if (typeof keepOriginalPermission === "function" && !callback) callback = keepOriginalPermission; keepOriginalPermission = get_Bool(keepOriginalPermission, false); + if (!callback) { + callback = function (err) { + throw new Error(err); + }; + } if (!_zip) { callback(new Error(Utils.Errors.NO_ZIP)); return; diff --git a/node_modules/adm-zip/headers/mainHeader.js b/node_modules/adm-zip/headers/mainHeader.js index 06f098f7..dcea01dc 100644 --- a/node_modules/adm-zip/headers/mainHeader.js +++ b/node_modules/adm-zip/headers/mainHeader.js @@ -76,7 +76,7 @@ module.exports = function () { // total number of entries _totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT); // central directory size in bytes - _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZ); + _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZE); // offset of first CEN header _offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF); @@ -127,3 +127,4 @@ module.exports = function () { } }; }; + // Misspelled \ No newline at end of file diff --git a/node_modules/adm-zip/package.json b/node_modules/adm-zip/package.json index a6069e49..ebc59ea6 100644 --- a/node_modules/adm-zip/package.json +++ b/node_modules/adm-zip/package.json @@ -1,6 +1,6 @@ { "name": "adm-zip", - "version": "0.5.9", + "version": "0.5.10", "description": "Javascript implementation of zip for nodejs with support for electron original-fs. Allows user to create or extract zip files both in memory or to/from disk", "scripts": { "test": "mocha -R spec", @@ -41,7 +41,7 @@ }, "devDependencies": { "chai": "^4.3.4", - "mocha": "^8.3.2", + "mocha": "^10.2.0", "prettier": "^2.2.1", "rimraf": "^3.0.2" } diff --git a/node_modules/adm-zip/util/utils.js b/node_modules/adm-zip/util/utils.js index 360338cb..9d732ba6 100644 --- a/node_modules/adm-zip/util/utils.js +++ b/node_modules/adm-zip/util/utils.js @@ -1,6 +1,7 @@ const fsystem = require("./fileSystem").require(); const pth = require("path"); const Constants = require("./constants"); +const Errors = require("./errors"); const isWin = typeof process === "object" && "win32" === process.platform; const is_Obj = (obj) => obj && typeof obj === "object"; diff --git a/node_modules/before-after-hook/README.md b/node_modules/before-after-hook/README.md index 1439db3c..07d7756b 100644 --- a/node_modules/before-after-hook/README.md +++ b/node_modules/before-after-hook/README.md @@ -3,9 +3,7 @@ > asynchronous hooks for internal functionality [![npm downloads](https://img.shields.io/npm/dw/before-after-hook.svg)](https://www.npmjs.com/package/before-after-hook) -[![Build Status](https://travis-ci.org/gr2m/before-after-hook.svg?branch=master)](https://travis-ci.org/gr2m/before-after-hook) -[![Coverage Status](https://coveralls.io/repos/gr2m/before-after-hook/badge.svg?branch=master)](https://coveralls.io/r/gr2m/before-after-hook?branch=master) -[![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/before-after-hook.svg)](https://greenkeeper.io/) +[![Test](https://github.com/gr2m/before-after-hook/actions/workflows/test.yml/badge.svg)](https://github.com/gr2m/before-after-hook/actions/workflows/test.yml) ## Usage diff --git a/node_modules/before-after-hook/index.d.ts b/node_modules/before-after-hook/index.d.ts index 9c95de32..817bf93f 100644 --- a/node_modules/before-after-hook/index.d.ts +++ b/node_modules/before-after-hook/index.d.ts @@ -1,34 +1,34 @@ type HookMethod = ( options: Options -) => Result | Promise +) => Result | Promise; -type BeforeHook = (options: Options) => void | Promise +type BeforeHook = (options: Options) => void | Promise; type ErrorHook = ( error: Error, options: Options -) => void | Promise +) => unknown | Promise; type AfterHook = ( result: Result, options: Options -) => void | Promise +) => void | Promise; type WrapHook = ( hookMethod: HookMethod, options: Options -) => Result | Promise +) => Result | Promise; type AnyHook = | BeforeHook | ErrorHook | AfterHook - | WrapHook + | WrapHook; -type TypeStoreKeyLong = 'Options' | 'Result' | 'Error' -type TypeStoreKeyShort = 'O' | 'R' | 'E' +type TypeStoreKeyLong = "Options" | "Result" | "Error"; +type TypeStoreKeyShort = "O" | "R" | "E"; type TypeStore = | ({ [key in TypeStoreKeyLong]?: any } & { [key in TypeStoreKeyShort]?: never }) | ({ [key in TypeStoreKeyLong]?: never } & - { [key in TypeStoreKeyShort]?: any }) + { [key in TypeStoreKeyShort]?: any }); type GetType< Store extends TypeStore, LongKey extends TypeStoreKeyLong, @@ -37,7 +37,7 @@ type GetType< ? Store[LongKey] : ShortKey extends keyof Store ? Store[ShortKey] - : any + : any; export interface HookCollection< HooksType extends Record = Record< @@ -52,100 +52,100 @@ export interface HookCollection< ( name: Name | Name[], hookMethod: HookMethod< - GetType, - GetType + GetType, + GetType >, - options?: GetType - ): Promise> + options?: GetType + ): Promise>; /** * Add `before` hook for given `name` */ before( name: Name, - beforeHook: BeforeHook> - ): void + beforeHook: BeforeHook> + ): void; /** * Add `error` hook for given `name` */ error( name: Name, errorHook: ErrorHook< - GetType, - GetType + GetType, + GetType > - ): void + ): void; /** * Add `after` hook for given `name` */ after( name: Name, afterHook: AfterHook< - GetType, - GetType + GetType, + GetType > - ): void + ): void; /** * Add `wrap` hook for given `name` */ wrap( name: Name, wrapHook: WrapHook< - GetType, - GetType + GetType, + GetType > - ): void + ): void; /** * Remove added hook for given `name` */ remove( name: Name, hook: AnyHook< - GetType, - GetType, - GetType + GetType, + GetType, + GetType > - ): void + ): void; /** * Public API */ api: Pick< HookCollection, - 'before' | 'error' | 'after' | 'wrap' | 'remove' - > + "before" | "error" | "after" | "wrap" | "remove" + >; } export interface HookSingular { /** * Invoke before and after hooks */ - (hookMethod: HookMethod, options?: Options): Promise + (hookMethod: HookMethod, options?: Options): Promise; /** * Add `before` hook */ - before(beforeHook: BeforeHook): void + before(beforeHook: BeforeHook): void; /** * Add `error` hook */ - error(errorHook: ErrorHook): void + error(errorHook: ErrorHook): void; /** * Add `after` hook */ - after(afterHook: AfterHook): void + after(afterHook: AfterHook): void; /** * Add `wrap` hook */ - wrap(wrapHook: WrapHook): void + wrap(wrapHook: WrapHook): void; /** * Remove added hook */ - remove(hook: AnyHook): void + remove(hook: AnyHook): void; /** * Public API */ api: Pick< HookSingular, - 'before' | 'error' | 'after' | 'wrap' | 'remove' - > + "before" | "error" | "after" | "wrap" | "remove" + >; } type Collection = new < @@ -153,12 +153,12 @@ type Collection = new < string, { Options: any; Result: any; Error: any } > ->() => HookCollection +>() => HookCollection; type Singular = new < Options = any, Result = any, Error = any ->() => HookSingular +>() => HookSingular; interface Hook { new < @@ -166,21 +166,21 @@ interface Hook { string, { Options: any; Result: any; Error: any } > - >(): HookCollection + >(): HookCollection; /** * Creates a collection of hooks */ - Collection: Collection + Collection: Collection; /** * Creates a nameless hook that supports strict typings */ - Singular: Singular + Singular: Singular; } -export const Hook: Hook -export const Collection: Collection -export const Singular: Singular +export const Hook: Hook; +export const Collection: Collection; +export const Singular: Singular; -export default Hook +export default Hook; diff --git a/node_modules/before-after-hook/index.js b/node_modules/before-after-hook/index.js index a97d89b7..6b60d3cf 100644 --- a/node_modules/before-after-hook/index.js +++ b/node_modules/before-after-hook/index.js @@ -1,57 +1,61 @@ -var register = require('./lib/register') -var addHook = require('./lib/add') -var removeHook = require('./lib/remove') +var register = require("./lib/register"); +var addHook = require("./lib/add"); +var removeHook = require("./lib/remove"); // bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind -var bindable = bind.bind(bind) - -function bindApi (hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) - hook.api = { remove: removeHookRef } - hook.remove = removeHookRef - - ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind] - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) - }) +var bind = Function.bind; +var bindable = bind.bind(bind); + +function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); } -function HookSingular () { - var singularHookName = 'h' +function HookSingular() { + var singularHookName = "h"; var singularHookState = { - registry: {} - } - var singularHook = register.bind(null, singularHookState, singularHookName) - bindApi(singularHook, singularHookState, singularHookName) - return singularHook + registry: {}, + }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; } -function HookCollection () { +function HookCollection() { var state = { - registry: {} - } + registry: {}, + }; - var hook = register.bind(null, state) - bindApi(hook, state) + var hook = register.bind(null, state); + bindApi(hook, state); - return hook + return hook; } -var collectionHookDeprecationMessageDisplayed = false -function Hook () { +var collectionHookDeprecationMessageDisplayed = false; +function Hook() { if (!collectionHookDeprecationMessageDisplayed) { - console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') - collectionHookDeprecationMessageDisplayed = true + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; } - return HookCollection() + return HookCollection(); } -Hook.Singular = HookSingular.bind() -Hook.Collection = HookCollection.bind() +Hook.Singular = HookSingular.bind(); +Hook.Collection = HookCollection.bind(); -module.exports = Hook +module.exports = Hook; // expose constructors as a named property for TypeScript -module.exports.Hook = Hook -module.exports.Singular = Hook.Singular -module.exports.Collection = Hook.Collection +module.exports.Hook = Hook; +module.exports.Singular = Hook.Singular; +module.exports.Collection = Hook.Collection; diff --git a/node_modules/before-after-hook/package.json b/node_modules/before-after-hook/package.json index 25f47564..533a3ebe 100644 --- a/node_modules/before-after-hook/package.json +++ b/node_modules/before-after-hook/package.json @@ -1,6 +1,6 @@ { "name": "before-after-hook", - "version": "2.2.2", + "version": "2.2.3", "description": "asynchronous before/error/after hooks for internal functionality", "main": "index.js", "files": [ @@ -13,8 +13,8 @@ "prebuild": "rimraf dist && mkdirp dist", "build": "browserify index.js --standalone=Hook > dist/before-after-hook.js", "postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js", - "lint": "prettier --check '{lib,test,examples}/**/*' README.md package.json", - "lint:fix": "prettier --write '{lib,test,examples}/**/*' README.md package.json", + "lint": "prettier --check '{lib,test,examples}/**/*' 'index.*' README.md package.json", + "lint:fix": "prettier --write '{lib,test,examples}/**/*' 'index.*' README.md package.json", "pretest": "npm run -s lint", "test": "npm run -s test:node | tap-spec", "posttest": "npm run validate:ts", @@ -44,7 +44,7 @@ "mkdirp": "^1.0.3", "prettier": "^2.0.0", "rimraf": "^3.0.0", - "semantic-release": "^17.0.0", + "semantic-release": "^19.0.3", "simple-mock": "^0.8.0", "tap-min": "^2.0.0", "tap-spec": "^5.0.0", @@ -53,14 +53,19 @@ "uglify-js": "^3.9.0" }, "release": { - "publish": [ - "@semantic-release/npm", + "branches": [ + "+([0-9]).x", + "main", + "next", { - "path": "@semantic-release/github", - "assets": [ - "dist/*.js" - ] + "name": "beta", + "prerelease": true } ] + }, + "renovate": { + "extends": [ + "github>gr2m/.github" + ] } } diff --git a/node_modules/filesize/LICENSE b/node_modules/filesize/LICENSE index 1079ba2e..9c4f31e0 100644 --- a/node_modules/filesize/LICENSE +++ b/node_modules/filesize/LICENSE @@ -1,28 +1,28 @@ -Copyright (c) 2022, Jason Mulligan -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of filesize nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +Copyright (c) 2023, Jason Mulligan +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of filesize nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/node_modules/filesize/README.md b/node_modules/filesize/README.md index 8b4bf814..c769561c 100644 --- a/node_modules/filesize/README.md +++ b/node_modules/filesize/README.md @@ -1,78 +1,79 @@ -# filesize.js - -[![build status](https://secure.travis-ci.org/avoidwork/filesize.js.svg)](http://travis-ci.org/avoidwork/filesize.js) [![downloads](https://img.shields.io/npm/dt/filesize.svg)](https://www.npmjs.com/package/filesize) [![CDNJS version](https://img.shields.io/cdnjs/v/filesize.svg)](https://cdnjs.com/libraries/filesize) - -filesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string. - -## Optional settings - -`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output. - -### base -_*(number)*_ Number base, default is `10` - -### bits -_*(boolean)*_ Enables `bit` sizes, default is `false` - -### exponent -_*(number)*_ Specifies the symbol via exponent, e.g. `2` is `MB` for base 2, default is `-1` - -### fullform -_*(boolean)*_ Enables full form of unit of measure, default is `false` - -### fullforms -_*(array)*_ Array of full form overrides, default is `[]` - -### locale (overrides 'separator') -_*(string || boolean)*_ BCP 47 language tag to specify a locale, or `true` to use default locale, default is `""` - -### localeOptions (overrides 'separator', requires string for 'locale' option) -_*(object)*_ Dictionary of options defined by ECMA-402 ([Number.prototype.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString)). Requires locale option to be explicitly passed as a string, otherwise is ignored. - -### output -_*(string)*_ Output of function (`array`, `exponent`, `object`, or `string`), default is `string` - -### pad -_*(boolean)*_ Decimal place end padding, default is `false` - -### precision -_*(number)*_ Sets precision of numerical output, default is `0` - -### round -_*(number)*_ Decimal place, default is `2` - -### roundingMethod -_*(string)*_ Rounding method, can be `round`, `floor`, or `ceil`, default is `round` - -### separator -_*(string)*_ Decimal separator character, default is `.` - -### spacer -_*(string)*_ Character between the `result` and `symbol`, default is `" "` - -### standard -_*(string)*_ Standard unit of measure, can be `iec` or `jedec`, default is `iec`; can be overruled by `base` - -### symbols -_*(object)*_ Dictionary of IEC/JEDEC symbols to replace for localization, defaults to english if no match is found - - -## Partial Application -`filesize.partial()` takes the second parameter of `filesize()` and returns a new function with the configuration applied -upon execution. This can be used to reduce `Object` creation if you call `filesize()` without caching the `descriptor` -in lexical scope. - -```javascript -const size = filesize.partial({base: 2, standard: "jedec"}); - -size(265318); // "259.1 KB" -``` - -## How can I load filesize.js? -filesize.js supports AMD loaders (require.js, curl.js, etc.), node.js & npm (```npm install filesize```), or using a script tag. - -An ES6 version is bundled with an npm install, but requires you load it with the full path, e.g. `require(path.join(__dirname, 'node_modules', 'filesize', 'lib', 'filesize.es6.js'))`. - -## License -Copyright (c) 2022 Jason Mulligan -Licensed under the BSD-3 license. +# filesize.js + +[![downloads](https://img.shields.io/npm/dt/filesize.svg)](https://www.npmjs.com/package/filesize) [![CDNJS version](https://img.shields.io/cdnjs/v/filesize.svg)](https://cdnjs.com/libraries/filesize) + +filesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string. + +```javascript +import {filesize} from "filesize"; +filesize(265318, {base: 2, standard: "jedec"}); // "259.1 KB" +``` + +## Optional settings + +`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output. + +### base +_*(number)*_ Number base, default is `10` + +### bits +_*(boolean)*_ Enables `bit` sizes, default is `false` + +### exponent +_*(number)*_ Specifies the symbol via exponent, e.g. `2` is `MB` for base 2, default is `-1` + +### fullform +_*(boolean)*_ Enables full form of unit of measure, default is `false` + +### fullforms +_*(array)*_ Array of full form overrides, default is `[]` + +### locale (overrides 'separator') +_*(string || boolean)*_ BCP 47 language tag to specify a locale, or `true` to use default locale, default is `""` + +### localeOptions (overrides 'separator', requires string for 'locale' option) +_*(object)*_ Dictionary of options defined by ECMA-402 ([Number.prototype.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString)). Requires locale option to be explicitly passed as a string, otherwise is ignored. + +### output +_*(string)*_ Output of function (`array`, `exponent`, `object`, or `string`), default is `string` + +### pad +_*(boolean)*_ Decimal place end padding, default is `false` + +### precision +_*(number)*_ Sets precision of numerical output, default is `0` + +### round +_*(number)*_ Decimal place, default is `2` + +### roundingMethod +_*(string)*_ Rounding method, can be `round`, `floor`, or `ceil`, default is `round` + +### separator +_*(string)*_ Decimal separator character, default is `.` + +### spacer +_*(string)*_ Character between the `result` and `symbol`, default is `" "` + +### standard +_*(string)*_ Standard unit of measure, can be `iec` or `jedec`, default is `iec`; can be overruled by `base` + +### symbols +_*(object)*_ Dictionary of IEC/JEDEC symbols to replace for localization, defaults to english if no match is found + + +## Partial Application +`partial()` takes the second parameter of `filesize()` and returns a new function with the configuration applied +upon execution. This can be used to reduce `Object` creation if you call `filesize()` without caching the `descriptor` +in lexical scope. + +```javascript +import {partial} from "filesize"; +const size = partial({base: 2, standard: "jedec"}); + +size(265318); // "259.1 KB" +``` + +## License +Copyright (c) 2023 Jason Mulligan +Licensed under the BSD-3 license. diff --git a/node_modules/filesize/dist/filesize.cjs b/node_modules/filesize/dist/filesize.cjs new file mode 100644 index 00000000..4a891583 --- /dev/null +++ b/node_modules/filesize/dist/filesize.cjs @@ -0,0 +1,235 @@ +/** + * filesize + * + * @copyright 2023 Jason Mulligan + * @license BSD-3-Clause + * @version 10.0.7 + */ +'use strict'; + +const ARRAY = "array"; +const BIT = "bit"; +const BITS = "bits"; +const BYTE = "byte"; +const BYTES = "bytes"; +const EMPTY = ""; +const EXPONENT = "exponent"; +const FUNCTION = "function"; +const IEC = "iec"; +const INVALID_NUMBER = "Invalid number"; +const INVALID_ROUND = "Invalid rounding method"; +const JEDEC = "jedec"; +const OBJECT = "object"; +const PERIOD = "."; +const ROUND = "round"; +const S = "s"; +const SI_KBIT = "kbit"; +const SI_KBYTE = "kB"; +const SPACE = " "; +const STRING = "string"; +const ZERO = "0"; +const STRINGS = { + symbol: { + iec: { + bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"], + bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] + }, + jedec: { + bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"], + bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] + } + }, + fullform: { + iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], + jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] + } +}; + +function filesize (arg, { + bits = false, + pad = false, + base = -1, + round = 2, + locale = EMPTY, + localeOptions = {}, + separator = EMPTY, + spacer = SPACE, + symbols = {}, + standard = EMPTY, + output = STRING, + fullform = false, + fullforms = [], + exponent = -1, + roundingMethod = ROUND, + precision = 0 +} = {}) { + let e = exponent, + num = Number(arg), + result = [], + val = 0, + u = EMPTY; + + // Sync base & standard + if (base === -1 && standard.length === 0) { + base = 10; + standard = JEDEC; + } else if (base === -1 && standard.length > 0) { + standard = standard === IEC ? IEC : JEDEC; + base = standard === IEC ? 2 : 10; + } else { + base = base === 2 ? 2 : 10; + standard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC; + } + + const ceil = base === 10 ? 1000 : 1024, + full = fullform === true, + neg = num < 0, + roundingFunc = Math[roundingMethod]; + + if (typeof arg !== "bigint" && isNaN(arg)) { + throw new TypeError(INVALID_NUMBER); + } + + if (typeof roundingFunc !== FUNCTION) { + throw new TypeError(INVALID_ROUND); + } + + // Flipping a negative number to determine the size + if (neg) { + num = -num; + } + + // Determining the exponent + if (e === -1 || isNaN(e)) { + e = Math.floor(Math.log(num) / Math.log(ceil)); + + if (e < 0) { + e = 0; + } + } + + // Exceeding supported length, time to reduce & multiply + if (e > 8) { + if (precision > 0) { + precision += 8 - e; + } + + e = 8; + } + + if (output === EXPONENT) { + return e; + } + + // Zero is now a special case because bytes divide by 1 + if (num === 0) { + result[0] = 0; + u = result[1] = STRINGS.symbol[standard][bits ? BITS : BYTES][e]; + } else { + val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); + + if (bits) { + val = val * 8; + + if (val >= ceil && e < 8) { + val = val / ceil; + e++; + } + } + + const p = Math.pow(10, e > 0 ? round : 0); + result[0] = roundingFunc(val * p) / p; + + if (result[0] === ceil && e < 8 && exponent === -1) { + result[0] = 1; + e++; + } + + u = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : STRINGS.symbol[standard][bits ? BITS : BYTES][e]; + } + + // Decorating a 'diff' + if (neg) { + result[0] = -result[0]; + } + + // Setting optional precision + if (precision > 0) { + result[0] = result[0].toPrecision(precision); + } + + // Applying custom symbol + result[1] = symbols[result[1]] || result[1]; + + if (locale === true) { + result[0] = result[0].toLocaleString(); + } else if (locale.length > 0) { + result[0] = result[0].toLocaleString(locale, localeOptions); + } else if (separator.length > 0) { + result[0] = result[0].toString().replace(PERIOD, separator); + } + + if (pad && Number.isInteger(result[0]) === false && round > 0) { + const x = separator || PERIOD, + tmp = result[0].toString().split(x), + s = tmp[1] || EMPTY, + l = s.length, + n = round - l; + + result[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`; + } + + if (full) { + result[1] = fullforms[e] ? fullforms[e] : STRINGS.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S); + } + + // Returning Array, Object, or String (default) + return output === ARRAY ? result : output === OBJECT ? { + value: result[0], + symbol: result[1], + exponent: e, + unit: u + } : result.join(spacer); +} + +// Partial application for functional programming +function partial ({ + bits = false, + pad = false, + base = -1, + round = 2, + locale = EMPTY, + localeOptions = {}, + separator = EMPTY, + spacer = SPACE, + symbols = {}, + standard = EMPTY, + output = STRING, + fullform = false, + fullforms = [], + exponent = -1, + roundingMethod = ROUND, + precision = 0 +} = {}) { + return arg => filesize(arg, { + bits, + pad, + base, + round, + locale, + localeOptions, + separator, + spacer, + symbols, + standard, + output, + fullform, + fullforms, + exponent, + roundingMethod, + precision + }); +} + +exports.filesize = filesize; +exports.partial = partial; diff --git a/node_modules/filesize/lib/filesize.esm.js b/node_modules/filesize/dist/filesize.esm.js similarity index 78% rename from node_modules/filesize/lib/filesize.esm.js rename to node_modules/filesize/dist/filesize.esm.js index d16e6c4d..b3fab4bb 100644 --- a/node_modules/filesize/lib/filesize.esm.js +++ b/node_modules/filesize/dist/filesize.esm.js @@ -1,205 +1,228 @@ /** * filesize * - * @copyright 2022 Jason Mulligan + * @copyright 2023 Jason Mulligan * @license BSD-3-Clause - * @version 9.0.11 + * @version 10.0.7 */ -const ARRAY = "array"; -const BIT = "bit"; -const BITS = "bits"; -const BYTE = "byte"; -const BYTES = "bytes"; -const EMPTY = ""; -const EXPONENT = "exponent"; -const FUNCTION = "function"; -const IEC = "iec"; -const INVALID_NUMBER = "Invalid number"; -const INVALID_ROUND = "Invalid rounding method"; -const JEDEC = "jedec"; -const OBJECT = "object"; -const PERIOD = "."; -const ROUND = "round"; -const S = "s"; -const SI_KBIT = "kbit"; -const SI_KBYTE = "kB"; -const SPACE = " "; -const STRING = "string"; -const ZERO = "0"; - -const strings = { - symbol: { - iec: { - bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"], - bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] - }, - jedec: { - bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"], - bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] - } - }, - fullform: { - iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], - jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] - } -}; - -/** - * filesize - * - * @method filesize - * @param {Mixed} arg String, Int or Float to transform - * @param {Object} descriptor [Optional] Flags - * @return {String} Readable file size String - */ -function filesize (arg, { - bits = false, - pad = false, - base = -1, - round = 2, - locale = EMPTY, - localeOptions = {}, - separator = EMPTY, - spacer = SPACE, - symbols = {}, - standard = EMPTY, - output = STRING, - fullform = false, - fullforms = [], - exponent = -1, - roundingMethod = ROUND, - precision = 0 -} = {}) { - let e = exponent, - num = Number(arg), - result = [], - val = 0, - u = EMPTY; - - // Sync base & standard - if (base === -1 && standard.length === 0) { - base = 10; - standard = JEDEC; - } else if (base === -1 && standard.length > 0) { - standard = standard === IEC ? IEC : JEDEC; - base = standard === IEC ? 2 : 10; - } else { - base = base === 2 ? 2 : 10; - standard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC; - } - - const ceil = base === 10 ? 1000 : 1024, - full = fullform === true, - neg = num < 0, - roundingFunc = Math[roundingMethod]; - - if (isNaN(arg)) { - throw new TypeError(INVALID_NUMBER); - } - - if (typeof roundingFunc !== FUNCTION) { - throw new TypeError(INVALID_ROUND); - } - - // Flipping a negative number to determine the size - if (neg) { - num = -num; - } - - // Determining the exponent - if (e === -1 || isNaN(e)) { - e = Math.floor(Math.log(num) / Math.log(ceil)); - - if (e < 0) { - e = 0; - } - } - - // Exceeding supported length, time to reduce & multiply - if (e > 8) { - if (precision > 0) { - precision += 8 - e; - } - - e = 8; - } - - if (output === EXPONENT) { - return e; - } - - // Zero is now a special case because bytes divide by 1 - if (num === 0) { - result[0] = 0; - u = result[1] = strings.symbol[standard][bits ? BITS : BYTES][e]; - } else { - val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); - - if (bits) { - val = val * 8; - - if (val >= ceil && e < 8) { - val = val / ceil; - e++; - } - } - - const p = Math.pow(10, e > 0 ? round : 0); - result[0] = roundingFunc(val * p) / p; - - if (result[0] === ceil && e < 8 && exponent === -1) { - result[0] = 1; - e++; - } - - u = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : strings.symbol[standard][bits ? BITS : BYTES][e]; - } - - // Decorating a 'diff' - if (neg) { - result[0] = -result[0]; - } - - // Setting optional precision - if (precision > 0) { - result[0] = result[0].toPrecision(precision); - } - - // Applying custom symbol - result[1] = symbols[result[1]] || result[1]; - - if (locale === true) { - result[0] = result[0].toLocaleString(); - } else if (locale.length > 0) { - result[0] = result[0].toLocaleString(locale, localeOptions); - } else if (separator.length > 0) { - result[0] = result[0].toString().replace(PERIOD, separator); - } - - if (pad && Number.isInteger(result[0]) === false && round > 0) { - const x = separator || PERIOD, - tmp = result[0].toString().split(x), - s = tmp[1] || EMPTY, - l = s.length, - n = round - l; - - result[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`; - } - - if (full) { - result[1] = fullforms[e] ? fullforms[e] : strings.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S); - } - - // Returning Array, Object, or String (default) - return output === ARRAY ? result : output === OBJECT ? { - value: result[0], - symbol: result[1], - exponent: e, - unit: u - } : result.join(spacer); -} - -// Partial application for functional programming -filesize.partial = opt => arg => filesize(arg, opt); - -export { filesize as default }; +const ARRAY = "array"; +const BIT = "bit"; +const BITS = "bits"; +const BYTE = "byte"; +const BYTES = "bytes"; +const EMPTY = ""; +const EXPONENT = "exponent"; +const FUNCTION = "function"; +const IEC = "iec"; +const INVALID_NUMBER = "Invalid number"; +const INVALID_ROUND = "Invalid rounding method"; +const JEDEC = "jedec"; +const OBJECT = "object"; +const PERIOD = "."; +const ROUND = "round"; +const S = "s"; +const SI_KBIT = "kbit"; +const SI_KBYTE = "kB"; +const SPACE = " "; +const STRING = "string"; +const ZERO = "0"; +const STRINGS = { + symbol: { + iec: { + bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"], + bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] + }, + jedec: { + bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"], + bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] + } + }, + fullform: { + iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], + jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] + } +};function filesize (arg, { + bits = false, + pad = false, + base = -1, + round = 2, + locale = EMPTY, + localeOptions = {}, + separator = EMPTY, + spacer = SPACE, + symbols = {}, + standard = EMPTY, + output = STRING, + fullform = false, + fullforms = [], + exponent = -1, + roundingMethod = ROUND, + precision = 0 +} = {}) { + let e = exponent, + num = Number(arg), + result = [], + val = 0, + u = EMPTY; + + // Sync base & standard + if (base === -1 && standard.length === 0) { + base = 10; + standard = JEDEC; + } else if (base === -1 && standard.length > 0) { + standard = standard === IEC ? IEC : JEDEC; + base = standard === IEC ? 2 : 10; + } else { + base = base === 2 ? 2 : 10; + standard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC; + } + + const ceil = base === 10 ? 1000 : 1024, + full = fullform === true, + neg = num < 0, + roundingFunc = Math[roundingMethod]; + + if (typeof arg !== "bigint" && isNaN(arg)) { + throw new TypeError(INVALID_NUMBER); + } + + if (typeof roundingFunc !== FUNCTION) { + throw new TypeError(INVALID_ROUND); + } + + // Flipping a negative number to determine the size + if (neg) { + num = -num; + } + + // Determining the exponent + if (e === -1 || isNaN(e)) { + e = Math.floor(Math.log(num) / Math.log(ceil)); + + if (e < 0) { + e = 0; + } + } + + // Exceeding supported length, time to reduce & multiply + if (e > 8) { + if (precision > 0) { + precision += 8 - e; + } + + e = 8; + } + + if (output === EXPONENT) { + return e; + } + + // Zero is now a special case because bytes divide by 1 + if (num === 0) { + result[0] = 0; + u = result[1] = STRINGS.symbol[standard][bits ? BITS : BYTES][e]; + } else { + val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); + + if (bits) { + val = val * 8; + + if (val >= ceil && e < 8) { + val = val / ceil; + e++; + } + } + + const p = Math.pow(10, e > 0 ? round : 0); + result[0] = roundingFunc(val * p) / p; + + if (result[0] === ceil && e < 8 && exponent === -1) { + result[0] = 1; + e++; + } + + u = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : STRINGS.symbol[standard][bits ? BITS : BYTES][e]; + } + + // Decorating a 'diff' + if (neg) { + result[0] = -result[0]; + } + + // Setting optional precision + if (precision > 0) { + result[0] = result[0].toPrecision(precision); + } + + // Applying custom symbol + result[1] = symbols[result[1]] || result[1]; + + if (locale === true) { + result[0] = result[0].toLocaleString(); + } else if (locale.length > 0) { + result[0] = result[0].toLocaleString(locale, localeOptions); + } else if (separator.length > 0) { + result[0] = result[0].toString().replace(PERIOD, separator); + } + + if (pad && Number.isInteger(result[0]) === false && round > 0) { + const x = separator || PERIOD, + tmp = result[0].toString().split(x), + s = tmp[1] || EMPTY, + l = s.length, + n = round - l; + + result[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`; + } + + if (full) { + result[1] = fullforms[e] ? fullforms[e] : STRINGS.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S); + } + + // Returning Array, Object, or String (default) + return output === ARRAY ? result : output === OBJECT ? { + value: result[0], + symbol: result[1], + exponent: e, + unit: u + } : result.join(spacer); +} + +// Partial application for functional programming +function partial ({ + bits = false, + pad = false, + base = -1, + round = 2, + locale = EMPTY, + localeOptions = {}, + separator = EMPTY, + spacer = SPACE, + symbols = {}, + standard = EMPTY, + output = STRING, + fullform = false, + fullforms = [], + exponent = -1, + roundingMethod = ROUND, + precision = 0 +} = {}) { + return arg => filesize(arg, { + bits, + pad, + base, + round, + locale, + localeOptions, + separator, + spacer, + symbols, + standard, + output, + fullform, + fullforms, + exponent, + roundingMethod, + precision + }); +}export{filesize,partial}; \ No newline at end of file diff --git a/node_modules/filesize/dist/filesize.esm.min.js b/node_modules/filesize/dist/filesize.esm.min.js new file mode 100644 index 00000000..1c18a9a8 --- /dev/null +++ b/node_modules/filesize/dist/filesize.esm.min.js @@ -0,0 +1,5 @@ +/*! + 2023 Jason Mulligan + @version 10.0.7 +*/ +const t="array",i="bit",e="bits",o="byte",n="bytes",r="",b="exponent",l="function",a="iec",s="Invalid number",p="Invalid rounding method",u="jedec",c="object",d=".",f="round",g="s",m="kbit",B="kB",h=" ",y="string",M="0",x={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function w(w,{bits:E=!1,pad:N=!1,base:T=-1,round:j=2,locale:P=r,localeOptions:k={},separator:G=r,spacer:K=h,symbols:S={},standard:Y=r,output:Z=y,fullform:v=!1,fullforms:I=[],exponent:O=-1,roundingMethod:$=f,precision:z=0}={}){let L=O,q=Number(w),A=[],C=0,D=r;-1===T&&0===Y.length?(T=10,Y=u):-1===T&&Y.length>0?T=(Y=Y===a?a:u)===a?2:10:Y=10===(T=2===T?2:10)||Y===u?u:a;const F=10===T?1e3:1024,H=!0===v,J=q<0,Q=Math[$];if("bigint"!=typeof w&&isNaN(w))throw new TypeError(s);if(typeof Q!==l)throw new TypeError(p);if(J&&(q=-q),(-1===L||isNaN(L))&&(L=Math.floor(Math.log(q)/Math.log(F)),L<0&&(L=0)),L>8&&(z>0&&(z+=8-L),L=8),Z===b)return L;if(0===q)A[0]=0,D=A[1]=x.symbol[Y][E?e:n][L];else{C=q/(2===T?Math.pow(2,10*L):Math.pow(1e3,L)),E&&(C*=8,C>=F&&L<8&&(C/=F,L++));const t=Math.pow(10,L>0?j:0);A[0]=Q(C*t)/t,A[0]===F&&L<8&&-1===O&&(A[0]=1,L++),D=A[1]=10===T&&1===L?E?m:B:x.symbol[Y][E?e:n][L]}if(J&&(A[0]=-A[0]),z>0&&(A[0]=A[0].toPrecision(z)),A[1]=S[A[1]]||A[1],!0===P?A[0]=A[0].toLocaleString():P.length>0?A[0]=A[0].toLocaleString(P,k):G.length>0&&(A[0]=A[0].toString().replace(d,G)),N&&!1===Number.isInteger(A[0])&&j>0){const t=G||d,i=A[0].toString().split(t),e=i[1]||r,o=e.length,n=j-o;A[0]=`${i[0]}${t}${e.padEnd(o+n,M)}`}return H&&(A[1]=I[L]?I[L]:x.fullform[Y][L]+(E?i:o)+(1===A[0]?r:g)),Z===t?A:Z===c?{value:A[0],symbol:A[1],exponent:L,unit:D}:A.join(K)}function E({bits:t=!1,pad:i=!1,base:e=-1,round:o=2,locale:n=r,localeOptions:b={},separator:l=r,spacer:a=h,symbols:s={},standard:p=r,output:u=y,fullform:c=!1,fullforms:d=[],exponent:g=-1,roundingMethod:m=f,precision:B=0}={}){return r=>w(r,{bits:t,pad:i,base:e,round:o,locale:n,localeOptions:b,separator:l,spacer:a,symbols:s,standard:p,output:u,fullform:c,fullforms:d,exponent:g,roundingMethod:m,precision:B})}export{w as filesize,E as partial};//# sourceMappingURL=filesize.esm.min.js.map diff --git a/node_modules/filesize/dist/filesize.esm.min.js.map b/node_modules/filesize/dist/filesize.esm.min.js.map new file mode 100644 index 00000000..469e7807 --- /dev/null +++ b/node_modules/filesize/dist/filesize.esm.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filesize.esm.min.js","sources":["../src/constants.js","../src/filesize.js"],"sourcesContent":["export const ARRAY = \"array\";\r\nexport const BIT = \"bit\";\r\nexport const BITS = \"bits\";\r\nexport const BYTE = \"byte\";\r\nexport const BYTES = \"bytes\";\r\nexport const EMPTY = \"\";\r\nexport const EXPONENT = \"exponent\";\r\nexport const FUNCTION = \"function\";\r\nexport const IEC = \"iec\";\r\nexport const INVALID_NUMBER = \"Invalid number\";\r\nexport const INVALID_ROUND = \"Invalid rounding method\";\r\nexport const JEDEC = \"jedec\";\r\nexport const OBJECT = \"object\";\r\nexport const PERIOD = \".\";\r\nexport const ROUND = \"round\";\r\nexport const S = \"s\";\r\nexport const SI_KBIT = \"kbit\";\r\nexport const SI_KBYTE = \"kB\";\r\nexport const SPACE = \" \";\r\nexport const STRING = \"string\";\r\nexport const ZERO = \"0\";\r\nexport const STRINGS = {\r\n\tsymbol: {\r\n\t\tiec: {\r\n\t\t\tbits: [\"bit\", \"Kibit\", \"Mibit\", \"Gibit\", \"Tibit\", \"Pibit\", \"Eibit\", \"Zibit\", \"Yibit\"],\r\n\t\t\tbytes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"]\r\n\t\t},\r\n\t\tjedec: {\r\n\t\t\tbits: [\"bit\", \"Kbit\", \"Mbit\", \"Gbit\", \"Tbit\", \"Pbit\", \"Ebit\", \"Zbit\", \"Ybit\"],\r\n\t\t\tbytes: [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\r\n\t\t}\r\n\t},\r\n\tfullform: {\r\n\t\tiec: [\"\", \"kibi\", \"mebi\", \"gibi\", \"tebi\", \"pebi\", \"exbi\", \"zebi\", \"yobi\"],\r\n\t\tjedec: [\"\", \"kilo\", \"mega\", \"giga\", \"tera\", \"peta\", \"exa\", \"zetta\", \"yotta\"]\r\n\t}\r\n};\r\n","import {\r\n\tARRAY,\r\n\tBIT,\r\n\tBITS,\r\n\tBYTE,\r\n\tBYTES,\r\n\tEMPTY,\r\n\tEXPONENT,\r\n\tFUNCTION,\r\n\tIEC,\r\n\tINVALID_NUMBER,\r\n\tINVALID_ROUND,\r\n\tJEDEC,\r\n\tOBJECT,\r\n\tPERIOD,\r\n\tROUND,\r\n\tS,\r\n\tSI_KBIT,\r\n\tSI_KBYTE,\r\n\tSPACE,\r\n\tSTRING,\r\n\tSTRINGS,\r\n\tZERO\r\n} from \"./constants\";\r\n\r\nexport function filesize (arg, {\r\n\tbits = false,\r\n\tpad = false,\r\n\tbase = -1,\r\n\tround = 2,\r\n\tlocale = EMPTY,\r\n\tlocaleOptions = {},\r\n\tseparator = EMPTY,\r\n\tspacer = SPACE,\r\n\tsymbols = {},\r\n\tstandard = EMPTY,\r\n\toutput = STRING,\r\n\tfullform = false,\r\n\tfullforms = [],\r\n\texponent = -1,\r\n\troundingMethod = ROUND,\r\n\tprecision = 0\r\n} = {}) {\r\n\tlet e = exponent,\r\n\t\tnum = Number(arg),\r\n\t\tresult = [],\r\n\t\tval = 0,\r\n\t\tu = EMPTY;\r\n\r\n\t// Sync base & standard\r\n\tif (base === -1 && standard.length === 0) {\r\n\t\tbase = 10;\r\n\t\tstandard = JEDEC;\r\n\t} else if (base === -1 && standard.length > 0) {\r\n\t\tstandard = standard === IEC ? IEC : JEDEC;\r\n\t\tbase = standard === IEC ? 2 : 10;\r\n\t} else {\r\n\t\tbase = base === 2 ? 2 : 10;\r\n\t\tstandard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC;\r\n\t}\r\n\r\n\tconst ceil = base === 10 ? 1000 : 1024,\r\n\t\tfull = fullform === true,\r\n\t\tneg = num < 0,\r\n\t\troundingFunc = Math[roundingMethod];\r\n\r\n\tif (typeof arg !== \"bigint\" && isNaN(arg)) {\r\n\t\tthrow new TypeError(INVALID_NUMBER);\r\n\t}\r\n\r\n\tif (typeof roundingFunc !== FUNCTION) {\r\n\t\tthrow new TypeError(INVALID_ROUND);\r\n\t}\r\n\r\n\t// Flipping a negative number to determine the size\r\n\tif (neg) {\r\n\t\tnum = -num;\r\n\t}\r\n\r\n\t// Determining the exponent\r\n\tif (e === -1 || isNaN(e)) {\r\n\t\te = Math.floor(Math.log(num) / Math.log(ceil));\r\n\r\n\t\tif (e < 0) {\r\n\t\t\te = 0;\r\n\t\t}\r\n\t}\r\n\r\n\t// Exceeding supported length, time to reduce & multiply\r\n\tif (e > 8) {\r\n\t\tif (precision > 0) {\r\n\t\t\tprecision += 8 - e;\r\n\t\t}\r\n\r\n\t\te = 8;\r\n\t}\r\n\r\n\tif (output === EXPONENT) {\r\n\t\treturn e;\r\n\t}\r\n\r\n\t// Zero is now a special case because bytes divide by 1\r\n\tif (num === 0) {\r\n\t\tresult[0] = 0;\r\n\t\tu = result[1] = STRINGS.symbol[standard][bits ? BITS : BYTES][e];\r\n\t} else {\r\n\t\tval = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));\r\n\r\n\t\tif (bits) {\r\n\t\t\tval = val * 8;\r\n\r\n\t\t\tif (val >= ceil && e < 8) {\r\n\t\t\t\tval = val / ceil;\r\n\t\t\t\te++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst p = Math.pow(10, e > 0 ? round : 0);\r\n\t\tresult[0] = roundingFunc(val * p) / p;\r\n\r\n\t\tif (result[0] === ceil && e < 8 && exponent === -1) {\r\n\t\t\tresult[0] = 1;\r\n\t\t\te++;\r\n\t\t}\r\n\r\n\t\tu = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : STRINGS.symbol[standard][bits ? BITS : BYTES][e];\r\n\t}\r\n\r\n\t// Decorating a 'diff'\r\n\tif (neg) {\r\n\t\tresult[0] = -result[0];\r\n\t}\r\n\r\n\t// Setting optional precision\r\n\tif (precision > 0) {\r\n\t\tresult[0] = result[0].toPrecision(precision);\r\n\t}\r\n\r\n\t// Applying custom symbol\r\n\tresult[1] = symbols[result[1]] || result[1];\r\n\r\n\tif (locale === true) {\r\n\t\tresult[0] = result[0].toLocaleString();\r\n\t} else if (locale.length > 0) {\r\n\t\tresult[0] = result[0].toLocaleString(locale, localeOptions);\r\n\t} else if (separator.length > 0) {\r\n\t\tresult[0] = result[0].toString().replace(PERIOD, separator);\r\n\t}\r\n\r\n\tif (pad && Number.isInteger(result[0]) === false && round > 0) {\r\n\t\tconst x = separator || PERIOD,\r\n\t\t\ttmp = result[0].toString().split(x),\r\n\t\t\ts = tmp[1] || EMPTY,\r\n\t\t\tl = s.length,\r\n\t\t\tn = round - l;\r\n\r\n\t\tresult[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`;\r\n\t}\r\n\r\n\tif (full) {\r\n\t\tresult[1] = fullforms[e] ? fullforms[e] : STRINGS.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S);\r\n\t}\r\n\r\n\t// Returning Array, Object, or String (default)\r\n\treturn output === ARRAY ? result : output === OBJECT ? {\r\n\t\tvalue: result[0],\r\n\t\tsymbol: result[1],\r\n\t\texponent: e,\r\n\t\tunit: u\r\n\t} : result.join(spacer);\r\n}\r\n\r\n// Partial application for functional programming\r\nexport function partial ({\r\n\tbits = false,\r\n\tpad = false,\r\n\tbase = -1,\r\n\tround = 2,\r\n\tlocale = EMPTY,\r\n\tlocaleOptions = {},\r\n\tseparator = EMPTY,\r\n\tspacer = SPACE,\r\n\tsymbols = {},\r\n\tstandard = EMPTY,\r\n\toutput = STRING,\r\n\tfullform = false,\r\n\tfullforms = [],\r\n\texponent = -1,\r\n\troundingMethod = ROUND,\r\n\tprecision = 0\r\n} = {}) {\r\n\treturn arg => filesize(arg, {\r\n\t\tbits,\r\n\t\tpad,\r\n\t\tbase,\r\n\t\tround,\r\n\t\tlocale,\r\n\t\tlocaleOptions,\r\n\t\tseparator,\r\n\t\tspacer,\r\n\t\tsymbols,\r\n\t\tstandard,\r\n\t\toutput,\r\n\t\tfullform,\r\n\t\tfullforms,\r\n\t\texponent,\r\n\t\troundingMethod,\r\n\t\tprecision\r\n\t});\r\n}\r\n"],"names":["ARRAY","BIT","BITS","BYTE","BYTES","EMPTY","EXPONENT","FUNCTION","IEC","INVALID_NUMBER","INVALID_ROUND","JEDEC","OBJECT","PERIOD","ROUND","S","SI_KBIT","SI_KBYTE","SPACE","STRING","ZERO","STRINGS","symbol","iec","bits","bytes","jedec","fullform","filesize","arg","pad","base","round","locale","localeOptions","separator","spacer","symbols","standard","output","fullforms","exponent","roundingMethod","precision","e","num","Number","result","val","u","length","ceil","full","neg","roundingFunc","Math","isNaN","TypeError","floor","log","pow","p","toPrecision","toLocaleString","toString","replace","isInteger","x","tmp","split","s","l","n","padEnd","value","unit","join","partial"],"mappings":";;;;AAAO,MAAMA,EAAQ,QACRC,EAAM,MACNC,EAAO,OACPC,EAAO,OACPC,EAAQ,QACRC,EAAQ,GACRC,EAAW,WACXC,EAAW,WACXC,EAAM,MACNC,EAAiB,iBACjBC,EAAgB,0BAChBC,EAAQ,QACRC,EAAS,SACTC,EAAS,IACTC,EAAQ,QACRC,EAAI,IACJC,EAAU,OACVC,EAAW,KACXC,EAAQ,IACRC,EAAS,SACTC,EAAO,IACPC,EAAU,CACtBC,OAAQ,CACPC,IAAK,CACJC,KAAM,CAAC,MAAO,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,SAC7EC,MAAO,CAAC,IAAK,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,QAE/DC,MAAO,CACNF,KAAM,CAAC,MAAO,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QACtEC,MAAO,CAAC,IAAK,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,QAGzDE,SAAU,CACTJ,IAAK,CAAC,GAAI,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QAClEG,MAAO,CA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5C,CAOD,OALIgC,IACHL,EAAO,GAAKP,EAAUI,GAAKJ,EAAUI,GAAKvB,EAAQM,SAASW,GAAUM,IAAMpB,EAAOvB,EAAME,IAAuB,IAAd4C,EAAO,GAAW1C,EAAQU,IAIrHwB,IAAWvC,EAAQ+C,EAASR,IAAW3B,EAAS,CACtD8D,MAAO3B,EAAO,GACdzB,OAAQyB,EAAO,GACfN,SAAUG,EACV+B,KAAM1B,GACHF,EAAO6B,KAAKxC,EACjB,CAGO,SAASyC,GAASrD,KACxBA,GAAO,EAAKM,IACZA,GAAM,EAAKC,KACXA,GAAO,EAAEC,MACTA,EAAQ,EAACC,OACTA,EAAS5B,EAAK6B,cACdA,EAAgB,CAAE,EAAAC,UAClBA,EAAY9B,EAAK+B,OACjBA,EAASlB,EAAKmB,QACdA,EAAU,CAAE,EAAAC,SACZA,EAAWjC,EAAKkC,OAChBA,EAASpB,EAAMQ,SACfA,GAAW,EAAKa,UAChBA,EAAY,GAAEC,SACdA,GAAW,EAAEC,eACbA,EAAiB5B,EAAK6B,UACtBA,EAAY,GACT,IACH,OAAOd,GAAOD,EAASC,EAAK,CAC3BL,OACAM,MACAC,OACAC,QACAC,SACAC,gBACAC,YACAC,SACAC,UACAC,WACAC,SACAZ,WACAa,YACAC,WACAC,iBACAC,aAEF,QAAAf,cAAAiD"} \ No newline at end of file diff --git a/node_modules/filesize/dist/filesize.js b/node_modules/filesize/dist/filesize.js new file mode 100644 index 00000000..c6c619db --- /dev/null +++ b/node_modules/filesize/dist/filesize.js @@ -0,0 +1,228 @@ +/** + * filesize + * + * @copyright 2023 Jason Mulligan + * @license BSD-3-Clause + * @version 10.0.7 + */ +(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=typeof globalThis!=='undefined'?globalThis:g||self,f(g.filesize={}));})(this,(function(exports){'use strict';const ARRAY = "array"; +const BIT = "bit"; +const BITS = "bits"; +const BYTE = "byte"; +const BYTES = "bytes"; +const EMPTY = ""; +const EXPONENT = "exponent"; +const FUNCTION = "function"; +const IEC = "iec"; +const INVALID_NUMBER = "Invalid number"; +const INVALID_ROUND = "Invalid rounding method"; +const JEDEC = "jedec"; +const OBJECT = "object"; +const PERIOD = "."; +const ROUND = "round"; +const S = "s"; +const SI_KBIT = "kbit"; +const SI_KBYTE = "kB"; +const SPACE = " "; +const STRING = "string"; +const ZERO = "0"; +const STRINGS = { + symbol: { + iec: { + bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"], + bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] + }, + jedec: { + bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"], + bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] + } + }, + fullform: { + iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], + jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] + } +};function filesize (arg, { + bits = false, + pad = false, + base = -1, + round = 2, + locale = EMPTY, + localeOptions = {}, + separator = EMPTY, + spacer = SPACE, + symbols = {}, + standard = EMPTY, + output = STRING, + fullform = false, + fullforms = [], + exponent = -1, + roundingMethod = ROUND, + precision = 0 +} = {}) { + let e = exponent, + num = Number(arg), + result = [], + val = 0, + u = EMPTY; + + // Sync base & standard + if (base === -1 && standard.length === 0) { + base = 10; + standard = JEDEC; + } else if (base === -1 && standard.length > 0) { + standard = standard === IEC ? IEC : JEDEC; + base = standard === IEC ? 2 : 10; + } else { + base = base === 2 ? 2 : 10; + standard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC; + } + + const ceil = base === 10 ? 1000 : 1024, + full = fullform === true, + neg = num < 0, + roundingFunc = Math[roundingMethod]; + + if (typeof arg !== "bigint" && isNaN(arg)) { + throw new TypeError(INVALID_NUMBER); + } + + if (typeof roundingFunc !== FUNCTION) { + throw new TypeError(INVALID_ROUND); + } + + // Flipping a negative number to determine the size + if (neg) { + num = -num; + } + + // Determining the exponent + if (e === -1 || isNaN(e)) { + e = Math.floor(Math.log(num) / Math.log(ceil)); + + if (e < 0) { + e = 0; + } + } + + // Exceeding supported length, time to reduce & multiply + if (e > 8) { + if (precision > 0) { + precision += 8 - e; + } + + e = 8; + } + + if (output === EXPONENT) { + return e; + } + + // Zero is now a special case because bytes divide by 1 + if (num === 0) { + result[0] = 0; + u = result[1] = STRINGS.symbol[standard][bits ? BITS : BYTES][e]; + } else { + val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); + + if (bits) { + val = val * 8; + + if (val >= ceil && e < 8) { + val = val / ceil; + e++; + } + } + + const p = Math.pow(10, e > 0 ? round : 0); + result[0] = roundingFunc(val * p) / p; + + if (result[0] === ceil && e < 8 && exponent === -1) { + result[0] = 1; + e++; + } + + u = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : STRINGS.symbol[standard][bits ? BITS : BYTES][e]; + } + + // Decorating a 'diff' + if (neg) { + result[0] = -result[0]; + } + + // Setting optional precision + if (precision > 0) { + result[0] = result[0].toPrecision(precision); + } + + // Applying custom symbol + result[1] = symbols[result[1]] || result[1]; + + if (locale === true) { + result[0] = result[0].toLocaleString(); + } else if (locale.length > 0) { + result[0] = result[0].toLocaleString(locale, localeOptions); + } else if (separator.length > 0) { + result[0] = result[0].toString().replace(PERIOD, separator); + } + + if (pad && Number.isInteger(result[0]) === false && round > 0) { + const x = separator || PERIOD, + tmp = result[0].toString().split(x), + s = tmp[1] || EMPTY, + l = s.length, + n = round - l; + + result[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`; + } + + if (full) { + result[1] = fullforms[e] ? fullforms[e] : STRINGS.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S); + } + + // Returning Array, Object, or String (default) + return output === ARRAY ? result : output === OBJECT ? { + value: result[0], + symbol: result[1], + exponent: e, + unit: u + } : result.join(spacer); +} + +// Partial application for functional programming +function partial ({ + bits = false, + pad = false, + base = -1, + round = 2, + locale = EMPTY, + localeOptions = {}, + separator = EMPTY, + spacer = SPACE, + symbols = {}, + standard = EMPTY, + output = STRING, + fullform = false, + fullforms = [], + exponent = -1, + roundingMethod = ROUND, + precision = 0 +} = {}) { + return arg => filesize(arg, { + bits, + pad, + base, + round, + locale, + localeOptions, + separator, + spacer, + symbols, + standard, + output, + fullform, + fullforms, + exponent, + roundingMethod, + precision + }); +}exports.filesize=filesize;exports.partial=partial;})); \ No newline at end of file diff --git a/node_modules/filesize/dist/filesize.min.js b/node_modules/filesize/dist/filesize.min.js new file mode 100644 index 00000000..fccd785b --- /dev/null +++ b/node_modules/filesize/dist/filesize.min.js @@ -0,0 +1,5 @@ +/*! + 2023 Jason Mulligan + @version 10.0.7 +*/ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).filesize={})}(this,(function(t){"use strict";const i="array",e="bit",o="bits",n="byte",r="bytes",s="",l="exponent",a="function",b="iec",p="Invalid number",f="Invalid rounding method",u="jedec",d="object",c=".",g="round",m="s",y="kbit",h="kB",B=" ",M="string",x="0",T={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function w(t,{bits:w=!1,pad:E=!1,base:j=-1,round:N=2,locale:P=s,localeOptions:k={},separator:z=s,spacer:G=B,symbols:K={},standard:S=s,output:Y=M,fullform:Z=!1,fullforms:v=[],exponent:I=-1,roundingMethod:O=g,precision:$=0}={}){let L=I,q=Number(t),A=[],C=0,D=s;-1===j&&0===S.length?(j=10,S=u):-1===j&&S.length>0?j=(S=S===b?b:u)===b?2:10:S=10===(j=2===j?2:10)||S===u?u:b;const F=10===j?1e3:1024,H=!0===Z,J=q<0,Q=Math[O];if("bigint"!=typeof t&&isNaN(t))throw new TypeError(p);if(typeof Q!==a)throw new TypeError(f);if(J&&(q=-q),(-1===L||isNaN(L))&&(L=Math.floor(Math.log(q)/Math.log(F)),L<0&&(L=0)),L>8&&($>0&&($+=8-L),L=8),Y===l)return L;if(0===q)A[0]=0,D=A[1]=T.symbol[S][w?o:r][L];else{C=q/(2===j?Math.pow(2,10*L):Math.pow(1e3,L)),w&&(C*=8,C>=F&&L<8&&(C/=F,L++));const t=Math.pow(10,L>0?N:0);A[0]=Q(C*t)/t,A[0]===F&&L<8&&-1===I&&(A[0]=1,L++),D=A[1]=10===j&&1===L?w?y:h:T.symbol[S][w?o:r][L]}if(J&&(A[0]=-A[0]),$>0&&(A[0]=A[0].toPrecision($)),A[1]=K[A[1]]||A[1],!0===P?A[0]=A[0].toLocaleString():P.length>0?A[0]=A[0].toLocaleString(P,k):z.length>0&&(A[0]=A[0].toString().replace(c,z)),E&&!1===Number.isInteger(A[0])&&N>0){const t=z||c,i=A[0].toString().split(t),e=i[1]||s,o=e.length,n=N-o;A[0]=`${i[0]}${t}${e.padEnd(o+n,x)}`}return H&&(A[1]=v[L]?v[L]:T.fullform[S][L]+(w?e:n)+(1===A[0]?s:m)),Y===i?A:Y===d?{value:A[0],symbol:A[1],exponent:L,unit:D}:A.join(G)}t.filesize=w,t.partial=function({bits:t=!1,pad:i=!1,base:e=-1,round:o=2,locale:n=s,localeOptions:r={},separator:l=s,spacer:a=B,symbols:b={},standard:p=s,output:f=M,fullform:u=!1,fullforms:d=[],exponent:c=-1,roundingMethod:m=g,precision:y=0}={}){return s=>w(s,{bits:t,pad:i,base:e,round:o,locale:n,localeOptions:r,separator:l,spacer:a,symbols:b,standard:p,output:f,fullform:u,fullforms:d,exponent:c,roundingMethod:m,precision:y})}}));//# sourceMappingURL=filesize.min.js.map diff --git a/node_modules/filesize/dist/filesize.min.js.map b/node_modules/filesize/dist/filesize.min.js.map new file mode 100644 index 00000000..34574080 --- /dev/null +++ b/node_modules/filesize/dist/filesize.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"filesize.min.js","sources":["../src/constants.js","../src/filesize.js"],"sourcesContent":["export const ARRAY = \"array\";\r\nexport const BIT = \"bit\";\r\nexport const BITS = \"bits\";\r\nexport const BYTE = \"byte\";\r\nexport const BYTES = \"bytes\";\r\nexport const EMPTY = \"\";\r\nexport const EXPONENT = \"exponent\";\r\nexport const FUNCTION = \"function\";\r\nexport const IEC = \"iec\";\r\nexport const INVALID_NUMBER = \"Invalid number\";\r\nexport const INVALID_ROUND = \"Invalid rounding method\";\r\nexport const JEDEC = \"jedec\";\r\nexport const OBJECT = \"object\";\r\nexport const PERIOD = \".\";\r\nexport const ROUND = \"round\";\r\nexport const S = \"s\";\r\nexport const SI_KBIT = \"kbit\";\r\nexport const SI_KBYTE = \"kB\";\r\nexport const SPACE = \" \";\r\nexport const STRING = \"string\";\r\nexport const ZERO = \"0\";\r\nexport const STRINGS = {\r\n\tsymbol: {\r\n\t\tiec: {\r\n\t\t\tbits: [\"bit\", \"Kibit\", \"Mibit\", \"Gibit\", \"Tibit\", \"Pibit\", \"Eibit\", \"Zibit\", \"Yibit\"],\r\n\t\t\tbytes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"]\r\n\t\t},\r\n\t\tjedec: {\r\n\t\t\tbits: [\"bit\", \"Kbit\", \"Mbit\", \"Gbit\", \"Tbit\", \"Pbit\", \"Ebit\", \"Zbit\", \"Ybit\"],\r\n\t\t\tbytes: [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\r\n\t\t}\r\n\t},\r\n\tfullform: {\r\n\t\tiec: [\"\", \"kibi\", \"mebi\", \"gibi\", \"tebi\", \"pebi\", \"exbi\", \"zebi\", \"yobi\"],\r\n\t\tjedec: [\"\", \"kilo\", \"mega\", \"giga\", \"tera\", \"peta\", \"exa\", \"zetta\", \"yotta\"]\r\n\t}\r\n};\r\n","import {\r\n\tARRAY,\r\n\tBIT,\r\n\tBITS,\r\n\tBYTE,\r\n\tBYTES,\r\n\tEMPTY,\r\n\tEXPONENT,\r\n\tFUNCTION,\r\n\tIEC,\r\n\tINVALID_NUMBER,\r\n\tINVALID_ROUND,\r\n\tJEDEC,\r\n\tOBJECT,\r\n\tPERIOD,\r\n\tROUND,\r\n\tS,\r\n\tSI_KBIT,\r\n\tSI_KBYTE,\r\n\tSPACE,\r\n\tSTRING,\r\n\tSTRINGS,\r\n\tZERO\r\n} from \"./constants\";\r\n\r\nexport function filesize (arg, {\r\n\tbits = false,\r\n\tpad = false,\r\n\tbase = -1,\r\n\tround = 2,\r\n\tlocale = EMPTY,\r\n\tlocaleOptions = {},\r\n\tseparator = EMPTY,\r\n\tspacer = SPACE,\r\n\tsymbols = {},\r\n\tstandard = EMPTY,\r\n\toutput = STRING,\r\n\tfullform = false,\r\n\tfullforms = [],\r\n\texponent = -1,\r\n\troundingMethod = ROUND,\r\n\tprecision = 0\r\n} = {}) {\r\n\tlet e = exponent,\r\n\t\tnum = Number(arg),\r\n\t\tresult = [],\r\n\t\tval = 0,\r\n\t\tu = EMPTY;\r\n\r\n\t// Sync base & standard\r\n\tif (base === -1 && standard.length === 0) {\r\n\t\tbase = 10;\r\n\t\tstandard = JEDEC;\r\n\t} else if (base === -1 && standard.length > 0) {\r\n\t\tstandard = standard === IEC ? IEC : JEDEC;\r\n\t\tbase = standard === IEC ? 2 : 10;\r\n\t} else {\r\n\t\tbase = base === 2 ? 2 : 10;\r\n\t\tstandard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC;\r\n\t}\r\n\r\n\tconst ceil = base === 10 ? 1000 : 1024,\r\n\t\tfull = fullform === true,\r\n\t\tneg = num < 0,\r\n\t\troundingFunc = Math[roundingMethod];\r\n\r\n\tif (typeof arg !== \"bigint\" && isNaN(arg)) {\r\n\t\tthrow new TypeError(INVALID_NUMBER);\r\n\t}\r\n\r\n\tif (typeof roundingFunc !== FUNCTION) {\r\n\t\tthrow new TypeError(INVALID_ROUND);\r\n\t}\r\n\r\n\t// Flipping a negative number to determine the size\r\n\tif (neg) {\r\n\t\tnum = -num;\r\n\t}\r\n\r\n\t// Determining the exponent\r\n\tif (e === -1 || isNaN(e)) {\r\n\t\te = Math.floor(Math.log(num) / Math.log(ceil));\r\n\r\n\t\tif (e < 0) {\r\n\t\t\te = 0;\r\n\t\t}\r\n\t}\r\n\r\n\t// Exceeding supported length, time to reduce & multiply\r\n\tif (e > 8) {\r\n\t\tif (precision > 0) {\r\n\t\t\tprecision += 8 - e;\r\n\t\t}\r\n\r\n\t\te = 8;\r\n\t}\r\n\r\n\tif (output === EXPONENT) {\r\n\t\treturn e;\r\n\t}\r\n\r\n\t// Zero is now a special case because bytes divide by 1\r\n\tif (num === 0) {\r\n\t\tresult[0] = 0;\r\n\t\tu = result[1] = STRINGS.symbol[standard][bits ? BITS : BYTES][e];\r\n\t} else {\r\n\t\tval = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));\r\n\r\n\t\tif (bits) {\r\n\t\t\tval = val * 8;\r\n\r\n\t\t\tif (val >= ceil && e < 8) {\r\n\t\t\t\tval = val / ceil;\r\n\t\t\t\te++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst p = Math.pow(10, e > 0 ? round : 0);\r\n\t\tresult[0] = roundingFunc(val * p) / p;\r\n\r\n\t\tif (result[0] === ceil && e < 8 && exponent === -1) {\r\n\t\t\tresult[0] = 1;\r\n\t\t\te++;\r\n\t\t}\r\n\r\n\t\tu = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : STRINGS.symbol[standard][bits ? BITS : BYTES][e];\r\n\t}\r\n\r\n\t// Decorating a 'diff'\r\n\tif (neg) {\r\n\t\tresult[0] = -result[0];\r\n\t}\r\n\r\n\t// Setting optional precision\r\n\tif (precision > 0) {\r\n\t\tresult[0] = result[0].toPrecision(precision);\r\n\t}\r\n\r\n\t// Applying custom symbol\r\n\tresult[1] = symbols[result[1]] || result[1];\r\n\r\n\tif (locale === true) {\r\n\t\tresult[0] = result[0].toLocaleString();\r\n\t} else if (locale.length > 0) {\r\n\t\tresult[0] = result[0].toLocaleString(locale, localeOptions);\r\n\t} else if (separator.length > 0) {\r\n\t\tresult[0] = result[0].toString().replace(PERIOD, separator);\r\n\t}\r\n\r\n\tif (pad && Number.isInteger(result[0]) === false && round > 0) {\r\n\t\tconst x = separator || PERIOD,\r\n\t\t\ttmp = result[0].toString().split(x),\r\n\t\t\ts = tmp[1] || EMPTY,\r\n\t\t\tl = s.length,\r\n\t\t\tn = round - l;\r\n\r\n\t\tresult[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`;\r\n\t}\r\n\r\n\tif (full) {\r\n\t\tresult[1] = fullforms[e] ? fullforms[e] : STRINGS.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S);\r\n\t}\r\n\r\n\t// Returning Array, Object, or String (default)\r\n\treturn output === ARRAY ? result : output === OBJECT ? {\r\n\t\tvalue: result[0],\r\n\t\tsymbol: result[1],\r\n\t\texponent: e,\r\n\t\tunit: u\r\n\t} : result.join(spacer);\r\n}\r\n\r\n// Partial application for functional programming\r\nexport function partial ({\r\n\tbits = false,\r\n\tpad = false,\r\n\tbase = -1,\r\n\tround = 2,\r\n\tlocale = EMPTY,\r\n\tlocaleOptions = {},\r\n\tseparator = EMPTY,\r\n\tspacer = SPACE,\r\n\tsymbols = {},\r\n\tstandard = EMPTY,\r\n\toutput = STRING,\r\n\tfullform = false,\r\n\tfullforms = [],\r\n\texponent = -1,\r\n\troundingMethod = ROUND,\r\n\tprecision = 0\r\n} = {}) {\r\n\treturn arg => filesize(arg, {\r\n\t\tbits,\r\n\t\tpad,\r\n\t\tbase,\r\n\t\tround,\r\n\t\tlocale,\r\n\t\tlocaleOptions,\r\n\t\tseparator,\r\n\t\tspacer,\r\n\t\tsymbols,\r\n\t\tstandard,\r\n\t\toutput,\r\n\t\tfullform,\r\n\t\tfullforms,\r\n\t\texponent,\r\n\t\troundingMethod,\r\n\t\tprecision\r\n\t});\r\n}\r\n"],"names":["ARRAY","BIT","BITS","BYTE","BYTES","EMPTY","EXPONENT","FUNCTION","IEC","INVALID_NUMBER","INVALID_ROUND","JEDEC","OBJECT","PERIOD","ROUND","S","SI_KBIT","SI_KBYTE","SPACE","STRING","ZERO","STRINGS","symbol","iec","bits","bytes","jedec","fullform","filesize","arg","pad","base","round","locale","localeOptions","separator","spacer","symbols","standard","output","fullforms","exponent","roundingMethod","precision","e","num","Number","result","val","u","length","ceil","full","neg","roundingFunc","Math","isNaN","TypeError","floor","log","pow","p","toPrecision","toLocaleString","toString","replace","isInteger","x","tmp","split","s","l","n","padEnd","value","unit","join","exports","partial"],"mappings":";;;;gPAAO,MAAMA,EAAQ,QACRC,EAAM,MACNC,EAAO,OACPC,EAAO,OACPC,EAAQ,QACRC,EAAQ,GACRC,EAAW,WACXC,EAAW,WACXC,EAAM,MACNC,EAAiB,iBACjBC,EAAgB,0BAChBC,EAAQ,QACRC,EAAS,SACTC,EAAS,IACTC,EAAQ,QACRC,EAAI,IACJC,EAAU,OACVC,EAAW,KACXC,EAAQ,IACRC,EAAS,SACTC,EAAO,IACPC,EAAU,CACtBC,OAAQ,CACPC,IAAK,CACJC,KAAM,CAAC,MAAO,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,SAC7EC,MAAO,CAAC,IAAK,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,QAE/DC,MAAO,CACNF,KAAM,CAAC,MAAO,OAAQ,OAAQ,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AAatB,EACtBuD,EAAMrB,EAAO,GAAGiB,WAAWK,MAAMF,GACjCG,EAAIF,EAAI,IAAM/D,EACdkE,EAAID,EAAEpB,OACNsB,EAAIxC,EAAQuC,EAEbxB,EAAO,GAAK,GAAGqB,EAAI,KAAKD,IAAIG,EAAEG,OAAOF,EAAIC,EAAGpD,IAC5C,CAOD,OALIgC,IACHL,EAAO,GAAKP,EAAUI,GAAKJ,EAAUI,GAAKvB,EAAQM,SAASW,GAAUM,IAAMpB,EAAOvB,EAAME,IAAuB,IAAd4C,EAAO,GAAW1C,EAAQU,IAIrHwB,IAAWvC,EAAQ+C,EAASR,IAAW3B,EAAS,CACtD8D,MAAO3B,EAAO,GACdzB,OAAQyB,EAAO,GACfN,SAAUG,EACV+B,KAAM1B,GACHF,EAAO6B,KAAKxC,EACjB,CAuCAyC,EAAAjD,SAAAA,EAAAiD,EAAAC,QApCO,UAAkBtD,KACxBA,GAAO,EAAKM,IACZA,GAAM,EAAKC,KACXA,GAAO,EAAEC,MACTA,EAAQ,EAACC,OACTA,EAAS5B,EAAK6B,cACdA,EAAgB,CAAE,EAAAC,UAClBA,EAAY9B,EAAK+B,OACjBA,EAASlB,EAAKmB,QACdA,EAAU,CAAE,EAAAC,SACZA,EAAWjC,EAAKkC,OAChBA,EAASpB,EAAMQ,SACfA,GAAW,EAAKa,UAChBA,EAAY,GAAEC,SACdA,GAAW,EAAEC,eACbA,EAAiB5B,EAAK6B,UACtBA,EAAY,GACT,IACH,OAAOd,GAAOD,EAASC,EAAK,CAC3BL,OACAM,MACAC,OACAC,QACAC,SACAC,gBACAC,YACAC,SACAC,UACAC,WACAC,SACAZ,WACAa,YACAC,WACAC,iBACAC,aAEF,CAAA"} \ No newline at end of file diff --git a/node_modules/filesize/filesize.d.ts b/node_modules/filesize/filesize.d.ts deleted file mode 100644 index cbde3ff6..00000000 --- a/node_modules/filesize/filesize.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -// Type definitions for filesize 8.0.3 -// Project: https://github.com/avoidwork/filesize.js, https://filesizejs.com -// Definitions by: Giedrius Grabauskas -// Renaud Chaput -// Roman Nuritdinov -// Sam Hulick -// Tomoto S. Washio - -declare var fileSize: Filesize.Filesize; -export = fileSize; -export as namespace filesize; - -declare namespace Filesize { - interface SiJedecBits { - b?: string; - Kb?: string; - Mb?: string; - Gb?: string; - Tb?: string; - Pb?: string; - Eb?: string; - Zb?: string; - Yb?: string; - } - - interface SiJedecBytes { - B?: string; - KB?: string; - MB?: string; - GB?: string; - TB?: string; - PB?: string; - EB?: string; - ZB?: string; - YB?: string; - } - - type SiJedec = SiJedecBits & SiJedecBytes & { [name: string]: string }; - - interface Options { - /** - * Number base, default is 10 - */ - base?: number; - /** - * Enables bit sizes, default is false - */ - bits?: boolean; - /** - * Specifies the SI suffix via exponent, e.g. 2 is MB for bytes, default is -1 - */ - exponent?: number; - /** - * Enables full form of unit of measure, default is false - */ - fullform?: boolean; - /** - * Array of full form overrides, default is [] - */ - fullforms?: string[]; - /** - * BCP 47 language tag to specify a locale, or true to use default locale, default is "" - */ - locale?: string | boolean; - /** - * ECMA-402 number format option overrides, default is "{}" - */ - localeOptions?: Intl.NumberFormatOptions; - /** - * Output of function (array, exponent, object, or string), default is string - */ - output?: "array" | "exponent" | "object" | "string"; - /** - * Decimal place end padding, default is false - */ - pad?: boolean; - /** - * Sets precision of numerical output, default is 0 - */ - precision?: number; - /** - * Decimal place, default is 2 - */ - round?: number; - /** - * Rounding method, can be round, floor, or ceil, default is round - */ - roundingMethod?: "round" | "floor" | "ceil"; - /** - * Decimal separator character, default is `.` - */ - separator?: string; - /** - * Character between the result and suffix, default is ` ` - */ - spacer?: string; - /** - * Standard unit of measure, can be iec or jedec, default is iec; can be overruled by base - */ - standard?: "iec" | "jedec"; - /** - * Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found - */ - symbols?: SiJedec; - /** - * Enables unix style human readable output, e.g ls -lh, default is false - */ - unix?: boolean; - } - - // Result type inference from the output option - interface ResultTypeMap { - array: [O extends {precision: number} ? string : number, string]; - exponent: number; - object: { - value: number, - symbol: string, - exponent: number, - unit: string, - }; - string: string; - } - type DefaultOutput = Exclude> extends never ? never : "string" - type CanonicalOutput = Extract> | DefaultOutput - - interface Filesize { - (bytes: number): string; - (bytes: number, options: O): ResultTypeMap[CanonicalOutput]; - partial: (options: O) => ((bytes: number) => ResultTypeMap[CanonicalOutput]); - } -} diff --git a/node_modules/filesize/lib/filesize.es6.js b/node_modules/filesize/lib/filesize.es6.js deleted file mode 100644 index 5cb0f3cd..00000000 --- a/node_modules/filesize/lib/filesize.es6.js +++ /dev/null @@ -1,213 +0,0 @@ -/** - * filesize - * - * @copyright 2022 Jason Mulligan - * @license BSD-3-Clause - * @version 9.0.11 - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.filesize = factory()); -})(this, (function () { 'use strict'; - - const ARRAY = "array"; - const BIT = "bit"; - const BITS = "bits"; - const BYTE = "byte"; - const BYTES = "bytes"; - const EMPTY = ""; - const EXPONENT = "exponent"; - const FUNCTION = "function"; - const IEC = "iec"; - const INVALID_NUMBER = "Invalid number"; - const INVALID_ROUND = "Invalid rounding method"; - const JEDEC = "jedec"; - const OBJECT = "object"; - const PERIOD = "."; - const ROUND = "round"; - const S = "s"; - const SI_KBIT = "kbit"; - const SI_KBYTE = "kB"; - const SPACE = " "; - const STRING = "string"; - const ZERO = "0"; - - const strings = { - symbol: { - iec: { - bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"], - bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] - }, - jedec: { - bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"], - bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] - } - }, - fullform: { - iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], - jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] - } - }; - - /** - * filesize - * - * @method filesize - * @param {Mixed} arg String, Int or Float to transform - * @param {Object} descriptor [Optional] Flags - * @return {String} Readable file size String - */ - function filesize (arg, { - bits = false, - pad = false, - base = -1, - round = 2, - locale = EMPTY, - localeOptions = {}, - separator = EMPTY, - spacer = SPACE, - symbols = {}, - standard = EMPTY, - output = STRING, - fullform = false, - fullforms = [], - exponent = -1, - roundingMethod = ROUND, - precision = 0 - } = {}) { - let e = exponent, - num = Number(arg), - result = [], - val = 0, - u = EMPTY; - - // Sync base & standard - if (base === -1 && standard.length === 0) { - base = 10; - standard = JEDEC; - } else if (base === -1 && standard.length > 0) { - standard = standard === IEC ? IEC : JEDEC; - base = standard === IEC ? 2 : 10; - } else { - base = base === 2 ? 2 : 10; - standard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC; - } - - const ceil = base === 10 ? 1000 : 1024, - full = fullform === true, - neg = num < 0, - roundingFunc = Math[roundingMethod]; - - if (isNaN(arg)) { - throw new TypeError(INVALID_NUMBER); - } - - if (typeof roundingFunc !== FUNCTION) { - throw new TypeError(INVALID_ROUND); - } - - // Flipping a negative number to determine the size - if (neg) { - num = -num; - } - - // Determining the exponent - if (e === -1 || isNaN(e)) { - e = Math.floor(Math.log(num) / Math.log(ceil)); - - if (e < 0) { - e = 0; - } - } - - // Exceeding supported length, time to reduce & multiply - if (e > 8) { - if (precision > 0) { - precision += 8 - e; - } - - e = 8; - } - - if (output === EXPONENT) { - return e; - } - - // Zero is now a special case because bytes divide by 1 - if (num === 0) { - result[0] = 0; - u = result[1] = strings.symbol[standard][bits ? BITS : BYTES][e]; - } else { - val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); - - if (bits) { - val = val * 8; - - if (val >= ceil && e < 8) { - val = val / ceil; - e++; - } - } - - const p = Math.pow(10, e > 0 ? round : 0); - result[0] = roundingFunc(val * p) / p; - - if (result[0] === ceil && e < 8 && exponent === -1) { - result[0] = 1; - e++; - } - - u = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : strings.symbol[standard][bits ? BITS : BYTES][e]; - } - - // Decorating a 'diff' - if (neg) { - result[0] = -result[0]; - } - - // Setting optional precision - if (precision > 0) { - result[0] = result[0].toPrecision(precision); - } - - // Applying custom symbol - result[1] = symbols[result[1]] || result[1]; - - if (locale === true) { - result[0] = result[0].toLocaleString(); - } else if (locale.length > 0) { - result[0] = result[0].toLocaleString(locale, localeOptions); - } else if (separator.length > 0) { - result[0] = result[0].toString().replace(PERIOD, separator); - } - - if (pad && Number.isInteger(result[0]) === false && round > 0) { - const x = separator || PERIOD, - tmp = result[0].toString().split(x), - s = tmp[1] || EMPTY, - l = s.length, - n = round - l; - - result[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`; - } - - if (full) { - result[1] = fullforms[e] ? fullforms[e] : strings.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S); - } - - // Returning Array, Object, or String (default) - return output === ARRAY ? result : output === OBJECT ? { - value: result[0], - symbol: result[1], - exponent: e, - unit: u - } : result.join(spacer); - } - - // Partial application for functional programming - filesize.partial = opt => arg => filesize(arg, opt); - - return filesize; - -})); diff --git a/node_modules/filesize/lib/filesize.es6.min.js b/node_modules/filesize/lib/filesize.es6.min.js deleted file mode 100644 index 6ca4684e..00000000 --- a/node_modules/filesize/lib/filesize.es6.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - 2022 Jason Mulligan - @version 9.0.11 -*/ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).filesize=i()}(this,(function(){"use strict";const t="bits",i="bytes",e="",o="iec",n="jedec",b={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function r(r,{bits:l=!1,pad:s=!1,base:a=-1,round:f=2,locale:u="",localeOptions:p={},separator:c="",spacer:d=" ",symbols:g={},standard:h="",output:y="string",fullform:B=!1,fullforms:m=[],exponent:M=-1,roundingMethod:T="round",precision:w=0}={}){let x=M,E=Number(r),j=[],N=0,P=e;-1===a&&0===h.length?(a=10,h=n):-1===a&&h.length>0?a=(h=h===o?o:n)===o?2:10:h=10===(a=2===a?2:10)||h===n?n:o;const k=10===a?1e3:1024,G=!0===B,K=E<0,S=Math[T];if(isNaN(r))throw new TypeError("Invalid number");if("function"!=typeof S)throw new TypeError("Invalid rounding method");if(K&&(E=-E),(-1===x||isNaN(x))&&(x=Math.floor(Math.log(E)/Math.log(k)),x<0&&(x=0)),x>8&&(w>0&&(w+=8-x),x=8),"exponent"===y)return x;if(0===E)j[0]=0,P=j[1]=b.symbol[h][l?t:i][x];else{N=E/(2===a?Math.pow(2,10*x):Math.pow(1e3,x)),l&&(N*=8,N>=k&&x<8&&(N/=k,x++));const e=Math.pow(10,x>0?f:0);j[0]=S(N*e)/e,j[0]===k&&x<8&&-1===M&&(j[0]=1,x++),P=j[1]=10===a&&1===x?l?"kbit":"kB":b.symbol[h][l?t:i][x]}if(K&&(j[0]=-j[0]),w>0&&(j[0]=j[0].toPrecision(w)),j[1]=g[j[1]]||j[1],!0===u?j[0]=j[0].toLocaleString():u.length>0?j[0]=j[0].toLocaleString(u,p):c.length>0&&(j[0]=j[0].toString().replace(".",c)),s&&!1===Number.isInteger(j[0])&&f>0){const t=c||".",i=j[0].toString().split(t),o=i[1]||e,n=o.length,b=f-n;j[0]=`${i[0]}${t}${o.padEnd(n+b,"0")}`}return G&&(j[1]=m[x]?m[x]:b.fullform[h][x]+(l?"bit":"byte")+(1===j[0]?e:"s")),"array"===y?j:"object"===y?{value:j[0],symbol:j[1],exponent:x,unit:P}:j.join(d)}return r.partial=t=>i=>r(i,t),r})); -//# sourceMappingURL=filesize.es6.min.js.map diff --git a/node_modules/filesize/lib/filesize.es6.min.js.map b/node_modules/filesize/lib/filesize.es6.min.js.map deleted file mode 100644 index 42ed5b01..00000000 --- a/node_modules/filesize/lib/filesize.es6.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filesize.es6.min.js","sources":["../src/constants.js","../src/strings.js","../src/filesize.js"],"sourcesContent":["\"use strict\";\n\nexport const ARRAY = \"array\";\nexport const BIT = \"bit\";\nexport const BITS = \"bits\";\nexport const BYTE = \"byte\";\nexport const BYTES = \"bytes\";\nexport const EMPTY = \"\";\nexport const EXPONENT = \"exponent\";\nexport const FUNCTION = \"function\";\nexport const IEC = \"iec\";\nexport const INVALID_NUMBER = \"Invalid number\";\nexport const INVALID_ROUND = \"Invalid rounding method\";\nexport const JEDEC = \"jedec\";\nexport const OBJECT = \"object\";\nexport const PERIOD = \".\";\nexport const ROUND = \"round\";\nexport const S = \"s\";\nexport const SI_KBIT = \"kbit\";\nexport const SI_KBYTE = \"kB\";\nexport const SPACE = \" \";\nexport const STRING = \"string\";\nexport const ZERO = \"0\";\n","\"use strict\";\n\nexport const strings = {\n\tsymbol: {\n\t\tiec: {\n\t\t\tbits: [\"bit\", \"Kibit\", \"Mibit\", \"Gibit\", \"Tibit\", \"Pibit\", \"Eibit\", \"Zibit\", \"Yibit\"],\n\t\t\tbytes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"]\n\t\t},\n\t\tjedec: {\n\t\t\tbits: [\"bit\", \"Kbit\", \"Mbit\", \"Gbit\", \"Tbit\", \"Pbit\", \"Ebit\", \"Zbit\", \"Ybit\"],\n\t\t\tbytes: [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n\t\t}\n\t},\n\tfullform: {\n\t\tiec: [\"\", \"kibi\", \"mebi\", \"gibi\", \"tebi\", \"pebi\", \"exbi\", \"zebi\", \"yobi\"],\n\t\tjedec: [\"\", \"kilo\", \"mega\", \"giga\", \"tera\", \"peta\", \"exa\", \"zetta\", \"yotta\"]\n\t}\n};\n","\"use strict\";\n\nimport {\n\tARRAY,\n\tBIT,\n\tBITS,\n\tBYTE,\n\tBYTES,\n\tEMPTY,\n\tEXPONENT,\n\tFUNCTION,\n\tIEC,\n\tINVALID_NUMBER,\n\tINVALID_ROUND,\n\tJEDEC,\n\tOBJECT,\n\tPERIOD,\n\tROUND,\n\tS,\n\tSI_KBIT,\n\tSI_KBYTE,\n\tSPACE,\n\tSTRING,\n\tZERO\n} from \"./constants\";\nimport {strings} from \"./strings\";\n\n/**\n * filesize\n *\n * @method filesize\n * @param {Mixed} arg String, Int or Float to transform\n * @param {Object} descriptor [Optional] Flags\n * @return {String} Readable file size String\n */\nfunction filesize (arg, {\n\tbits = false,\n\tpad = false,\n\tbase = -1,\n\tround = 2,\n\tlocale = EMPTY,\n\tlocaleOptions = {},\n\tseparator = EMPTY,\n\tspacer = SPACE,\n\tsymbols = {},\n\tstandard = EMPTY,\n\toutput = STRING,\n\tfullform = false,\n\tfullforms = [],\n\texponent = -1,\n\troundingMethod = ROUND,\n\tprecision = 0\n} = {}) {\n\tlet e = exponent,\n\t\tnum = Number(arg),\n\t\tresult = [],\n\t\tval = 0,\n\t\tu = EMPTY;\n\n\t// Sync base & standard\n\tif (base === -1 && standard.length === 0) {\n\t\tbase = 10;\n\t\tstandard = JEDEC;\n\t} else if (base === -1 && standard.length > 0) {\n\t\tstandard = standard === IEC ? IEC : JEDEC;\n\t\tbase = standard === IEC ? 2 : 10;\n\t} else {\n\t\tbase = base === 2 ? 2 : 10;\n\t\tstandard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC;\n\t}\n\n\tconst ceil = base === 10 ? 1000 : 1024,\n\t\tfull = fullform === true,\n\t\tneg = num < 0,\n\t\troundingFunc = Math[roundingMethod];\n\n\tif (isNaN(arg)) {\n\t\tthrow new TypeError(INVALID_NUMBER);\n\t}\n\n\tif (typeof roundingFunc !== FUNCTION) {\n\t\tthrow new TypeError(INVALID_ROUND);\n\t}\n\n\t// Flipping a negative number to determine the size\n\tif (neg) {\n\t\tnum = -num;\n\t}\n\n\t// Determining the exponent\n\tif (e === -1 || isNaN(e)) {\n\t\te = Math.floor(Math.log(num) / Math.log(ceil));\n\n\t\tif (e < 0) {\n\t\t\te = 0;\n\t\t}\n\t}\n\n\t// Exceeding supported length, time to reduce & multiply\n\tif (e > 8) {\n\t\tif (precision > 0) {\n\t\t\tprecision += 8 - e;\n\t\t}\n\n\t\te = 8;\n\t}\n\n\tif (output === EXPONENT) {\n\t\treturn e;\n\t}\n\n\t// Zero is now a special case because bytes divide by 1\n\tif (num === 0) {\n\t\tresult[0] = 0;\n\t\tu = result[1] = strings.symbol[standard][bits ? BITS : BYTES][e];\n\t} else {\n\t\tval = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));\n\n\t\tif (bits) {\n\t\t\tval = val * 8;\n\n\t\t\tif (val >= ceil && e < 8) {\n\t\t\t\tval = val / ceil;\n\t\t\t\te++;\n\t\t\t}\n\t\t}\n\n\t\tconst p = Math.pow(10, e > 0 ? round : 0);\n\t\tresult[0] = roundingFunc(val * p) / p;\n\n\t\tif (result[0] === ceil && e < 8 && exponent === -1) {\n\t\t\tresult[0] = 1;\n\t\t\te++;\n\t\t}\n\n\t\tu = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : strings.symbol[standard][bits ? BITS : BYTES][e];\n\t}\n\n\t// Decorating a 'diff'\n\tif (neg) {\n\t\tresult[0] = -result[0];\n\t}\n\n\t// Setting optional precision\n\tif (precision > 0) {\n\t\tresult[0] = result[0].toPrecision(precision);\n\t}\n\n\t// Applying custom symbol\n\tresult[1] = symbols[result[1]] || result[1];\n\n\tif (locale === true) {\n\t\tresult[0] = result[0].toLocaleString();\n\t} else if (locale.length > 0) {\n\t\tresult[0] = result[0].toLocaleString(locale, localeOptions);\n\t} else if (separator.length > 0) {\n\t\tresult[0] = result[0].toString().replace(PERIOD, separator);\n\t}\n\n\tif (pad && Number.isInteger(result[0]) === false && round > 0) {\n\t\tconst x = separator || PERIOD,\n\t\t\ttmp = result[0].toString().split(x),\n\t\t\ts = tmp[1] || EMPTY,\n\t\t\tl = s.length,\n\t\t\tn = round - l;\n\n\t\tresult[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`;\n\t}\n\n\tif (full) {\n\t\tresult[1] = fullforms[e] ? fullforms[e] : strings.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S);\n\t}\n\n\t// Returning Array, Object, or String (default)\n\treturn output === ARRAY ? result : output === OBJECT ? {\n\t\tvalue: result[0],\n\t\tsymbol: result[1],\n\t\texponent: e,\n\t\tunit: u\n\t} : result.join(spacer);\n}\n\n// Partial application for functional programming\nfilesize.partial = opt => arg => filesize(arg, opt);\n\nexport default filesize;\n"],"names":["BITS","BYTES","EMPTY","IEC","JEDEC","strings","symbol","iec","bits","bytes","jedec","fullform","filesize","arg","pad","base","round","locale","localeOptions","separator","spacer","symbols","standard","output","fullforms","exponent","roundingMethod","precision","e","num","Number","result","val","u","length","ceil","full","neg","roundingFunc","Math","isNaN","TypeError","floor","log","pow","p","toPrecision","toLocaleString","toString","replace","isInteger","x","tmp","split","s","l","n","padEnd","value","unit","join","partial","opt"],"mappings":";;;;yOAEO,MAEMA,EAAO,OAEPC,EAAQ,QACRC,EAAQ,GAGRC,EAAM,MAGNC,EAAQ,QCXRC,EAAU,CACtBC,OAAQ,CACPC,IAAK,CACJC,KAAM,CAA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AAO,GAAGiB,WAAWC,QF7Ib,IE6I6B9B,IAG9CL,IAAuC,IAAhCgB,OAAOoB,UAAUnB,EAAO,KAAiBf,EAAQ,EAAG,CAC9D,MAAMmC,EAAIhC,GFjJU,IEkJnBiC,EAAMrB,EAAO,GAAGiB,WAAWK,MAAMF,GACjCG,EAAIF,EAAI,IAAMlD,EACdqD,EAAID,EAAEpB,OACNsB,EAAIxC,EAAQuC,EAEbxB,EAAO,GAAK,GAAGqB,EAAI,KAAKD,IAAIG,EAAEG,OAAOF,EAAIC,EFhJvB,OEwJnB,OALIpB,IACHL,EAAO,GAAKP,EAAUI,GAAKJ,EAAUI,GAAKvB,EAAQM,SAASW,GAAUM,IAAMpB,EFvK1D,MAEC,SEqK6F,IAAduB,EAAO,GAAW7B,EFzJpG,MAfI,UE4KbqB,EAAmBQ,EFhKL,WEgKcR,EAAoB,CACtDmC,MAAO3B,EAAO,GACdzB,OAAQyB,EAAO,GACfN,SAAUG,EACV+B,KAAM1B,GACHF,EAAO6B,KAAKxC,UAIjBR,EAASiD,QAAUC,GAAOjD,GAAOD,EAASC,EAAKiD"} \ No newline at end of file diff --git a/node_modules/filesize/lib/filesize.esm.min.js b/node_modules/filesize/lib/filesize.esm.min.js deleted file mode 100644 index 114105ce..00000000 --- a/node_modules/filesize/lib/filesize.esm.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - 2022 Jason Mulligan - @version 9.0.11 -*/ -const t={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function i(i,{bits:e=!1,pad:o=!1,base:b=-1,round:n=2,locale:r="",localeOptions:a={},separator:l="",spacer:s=" ",symbols:c={},standard:p="",output:d="string",fullform:u=!1,fullforms:g=[],exponent:B=-1,roundingMethod:f="round",precision:h=0}={}){let y=B,m=Number(i),M=[],j=0,w="";-1===b&&0===p.length?(b=10,p="jedec"):-1===b&&p.length>0?b="iec"===(p="iec"===p?"iec":"jedec")?2:10:p=10===(b=2===b?2:10)||"jedec"===p?"jedec":"iec";const E=10===b?1e3:1024,x=!0===u,N=m<0,T=Math[f];if(isNaN(i))throw new TypeError("Invalid number");if("function"!=typeof T)throw new TypeError("Invalid rounding method");if(N&&(m=-m),(-1===y||isNaN(y))&&(y=Math.floor(Math.log(m)/Math.log(E)),y<0&&(y=0)),y>8&&(h>0&&(h+=8-y),y=8),"exponent"===d)return y;if(0===m)M[0]=0,w=M[1]=t.symbol[p][e?"bits":"bytes"][y];else{j=m/(2===b?Math.pow(2,10*y):Math.pow(1e3,y)),e&&(j*=8,j>=E&&y<8&&(j/=E,y++));const i=Math.pow(10,y>0?n:0);M[0]=T(j*i)/i,M[0]===E&&y<8&&-1===B&&(M[0]=1,y++),w=M[1]=10===b&&1===y?e?"kbit":"kB":t.symbol[p][e?"bits":"bytes"][y]}if(N&&(M[0]=-M[0]),h>0&&(M[0]=M[0].toPrecision(h)),M[1]=c[M[1]]||M[1],!0===r?M[0]=M[0].toLocaleString():r.length>0?M[0]=M[0].toLocaleString(r,a):l.length>0&&(M[0]=M[0].toString().replace(".",l)),o&&!1===Number.isInteger(M[0])&&n>0){const t=l||".",i=M[0].toString().split(t),e=i[1]||"",o=e.length,b=n-o;M[0]=`${i[0]}${t}${e.padEnd(o+b,"0")}`}return x&&(M[1]=g[y]?g[y]:t.fullform[p][y]+(e?"bit":"byte")+(1===M[0]?"":"s")),"array"===d?M:"object"===d?{value:M[0],symbol:M[1],exponent:y,unit:w}:M.join(s)}i.partial=t=>e=>i(e,t);export{i as default}; -//# sourceMappingURL=filesize.esm.min.js.map diff --git a/node_modules/filesize/lib/filesize.esm.min.js.map b/node_modules/filesize/lib/filesize.esm.min.js.map deleted file mode 100644 index a1727259..00000000 --- a/node_modules/filesize/lib/filesize.esm.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filesize.esm.min.js","sources":["../src/constants.js","../src/strings.js","../src/filesize.js"],"sourcesContent":["\"use strict\";\n\nexport const ARRAY = \"array\";\nexport const BIT = \"bit\";\nexport const BITS = \"bits\";\nexport const BYTE = \"byte\";\nexport const BYTES = \"bytes\";\nexport const EMPTY = \"\";\nexport const EXPONENT = \"exponent\";\nexport const FUNCTION = \"function\";\nexport const IEC = \"iec\";\nexport const INVALID_NUMBER = \"Invalid number\";\nexport const INVALID_ROUND = \"Invalid rounding method\";\nexport const JEDEC = \"jedec\";\nexport const OBJECT = \"object\";\nexport const PERIOD = \".\";\nexport const ROUND = \"round\";\nexport const S = \"s\";\nexport const SI_KBIT = \"kbit\";\nexport const SI_KBYTE = \"kB\";\nexport const SPACE = \" \";\nexport const STRING = \"string\";\nexport const ZERO = \"0\";\n","\"use strict\";\n\nexport const strings = {\n\tsymbol: {\n\t\tiec: {\n\t\t\tbits: [\"bit\", \"Kibit\", \"Mibit\", \"Gibit\", \"Tibit\", \"Pibit\", \"Eibit\", \"Zibit\", \"Yibit\"],\n\t\t\tbytes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"]\n\t\t},\n\t\tjedec: {\n\t\t\tbits: [\"bit\", \"Kbit\", \"Mbit\", \"Gbit\", \"Tbit\", \"Pbit\", \"Ebit\", \"Zbit\", \"Ybit\"],\n\t\t\tbytes: [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n\t\t}\n\t},\n\tfullform: {\n\t\tiec: [\"\", \"kibi\", \"mebi\", \"gibi\", \"tebi\", \"pebi\", \"exbi\", \"zebi\", \"yobi\"],\n\t\tjedec: [\"\", \"kilo\", \"mega\", \"giga\", \"tera\", \"peta\", \"exa\", \"zetta\", \"yotta\"]\n\t}\n};\n","\"use strict\";\n\nimport {\n\tARRAY,\n\tBIT,\n\tBITS,\n\tBYTE,\n\tBYTES,\n\tEMPTY,\n\tEXPONENT,\n\tFUNCTION,\n\tIEC,\n\tINVALID_NUMBER,\n\tINVALID_ROUND,\n\tJEDEC,\n\tOBJECT,\n\tPERIOD,\n\tROUND,\n\tS,\n\tSI_KBIT,\n\tSI_KBYTE,\n\tSPACE,\n\tSTRING,\n\tZERO\n} from \"./constants\";\nimport {strings} from \"./strings\";\n\n/**\n * filesize\n *\n * @method filesize\n * @param {Mixed} arg String, Int or Float to transform\n * @param {Object} descriptor [Optional] Flags\n * @return {String} Readable file size String\n */\nfunction filesize (arg, {\n\tbits = false,\n\tpad = false,\n\tbase = -1,\n\tround = 2,\n\tlocale = EMPTY,\n\tlocaleOptions = {},\n\tseparator = EMPTY,\n\tspacer = SPACE,\n\tsymbols = {},\n\tstandard = EMPTY,\n\toutput = STRING,\n\tfullform = false,\n\tfullforms = [],\n\texponent = -1,\n\troundingMethod = ROUND,\n\tprecision = 0\n} = {}) {\n\tlet e = exponent,\n\t\tnum = Number(arg),\n\t\tresult = [],\n\t\tval = 0,\n\t\tu = EMPTY;\n\n\t// Sync base & standard\n\tif (base === -1 && standard.length === 0) {\n\t\tbase = 10;\n\t\tstandard = JEDEC;\n\t} else if (base === -1 && standard.length > 0) {\n\t\tstandard = standard === IEC ? IEC : JEDEC;\n\t\tbase = standard === IEC ? 2 : 10;\n\t} else {\n\t\tbase = base === 2 ? 2 : 10;\n\t\tstandard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC;\n\t}\n\n\tconst ceil = base === 10 ? 1000 : 1024,\n\t\tfull = fullform === true,\n\t\tneg = num < 0,\n\t\troundingFunc = Math[roundingMethod];\n\n\tif (isNaN(arg)) {\n\t\tthrow new TypeError(INVALID_NUMBER);\n\t}\n\n\tif (typeof roundingFunc !== FUNCTION) {\n\t\tthrow new TypeError(INVALID_ROUND);\n\t}\n\n\t// Flipping a negative number to determine the size\n\tif (neg) {\n\t\tnum = -num;\n\t}\n\n\t// Determining the exponent\n\tif (e === -1 || isNaN(e)) {\n\t\te = Math.floor(Math.log(num) / Math.log(ceil));\n\n\t\tif (e < 0) {\n\t\t\te = 0;\n\t\t}\n\t}\n\n\t// Exceeding supported length, time to reduce & multiply\n\tif (e > 8) {\n\t\tif (precision > 0) {\n\t\t\tprecision += 8 - e;\n\t\t}\n\n\t\te = 8;\n\t}\n\n\tif (output === EXPONENT) {\n\t\treturn e;\n\t}\n\n\t// Zero is now a special case because bytes divide by 1\n\tif (num === 0) {\n\t\tresult[0] = 0;\n\t\tu = result[1] = strings.symbol[standard][bits ? BITS : BYTES][e];\n\t} else {\n\t\tval = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));\n\n\t\tif (bits) {\n\t\t\tval = val * 8;\n\n\t\t\tif (val >= ceil && e < 8) {\n\t\t\t\tval = val / ceil;\n\t\t\t\te++;\n\t\t\t}\n\t\t}\n\n\t\tconst p = Math.pow(10, e > 0 ? round : 0);\n\t\tresult[0] = roundingFunc(val * p) / p;\n\n\t\tif (result[0] === ceil && e < 8 && exponent === -1) {\n\t\t\tresult[0] = 1;\n\t\t\te++;\n\t\t}\n\n\t\tu = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : strings.symbol[standard][bits ? BITS : BYTES][e];\n\t}\n\n\t// Decorating a 'diff'\n\tif (neg) {\n\t\tresult[0] = -result[0];\n\t}\n\n\t// Setting optional precision\n\tif (precision > 0) {\n\t\tresult[0] = result[0].toPrecision(precision);\n\t}\n\n\t// Applying custom symbol\n\tresult[1] = symbols[result[1]] || result[1];\n\n\tif (locale === true) {\n\t\tresult[0] = result[0].toLocaleString();\n\t} else if (locale.length > 0) {\n\t\tresult[0] = result[0].toLocaleString(locale, localeOptions);\n\t} else if (separator.length > 0) {\n\t\tresult[0] = result[0].toString().replace(PERIOD, separator);\n\t}\n\n\tif (pad && Number.isInteger(result[0]) === false && round > 0) {\n\t\tconst x = separator || PERIOD,\n\t\t\ttmp = result[0].toString().split(x),\n\t\t\ts = tmp[1] || EMPTY,\n\t\t\tl = s.length,\n\t\t\tn = round - l;\n\n\t\tresult[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`;\n\t}\n\n\tif (full) {\n\t\tresult[1] = fullforms[e] ? fullforms[e] : strings.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S);\n\t}\n\n\t// Returning Array, Object, or String (default)\n\treturn output === ARRAY ? result : output === OBJECT ? {\n\t\tvalue: result[0],\n\t\tsymbol: result[1],\n\t\texponent: e,\n\t\tunit: u\n\t} : result.join(spacer);\n}\n\n// Partial application for functional programming\nfilesize.partial = opt => arg => filesize(arg, opt);\n\nexport default filesize;\n"],"names":["strings","symbol","iec","bits","bytes","jedec","fullform","filesize","arg","pad","base","round","locale","localeOptions","separator","spacer","symbols","standard","output","fullforms","exponent","roundingMethod","precision","e","num","Number","result","val","u","length","ceil","full","neg","roundingFunc","Math","isNaN","TypeError","floor","log","pow","p","toPrecision","toLocaleString","toString","replace","isInteger","x","tmp","split","s","l","n","padEnd","value","unit","join","partial","opt"],"mappings":";;;;AAEO,MCAMA,EAAU,CACtBC,OAAQ,CACPC,IAAK,CACJC,KAAM,CAAC,MAAO,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,SAC7EC,MAAO,CAAC,IAAK,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,QAE/DC,MAAO,CACNF,KAAM,CAAC,MAAO,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QACtEC,MAAO,CAAC,IAAK,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,QAGzDE,SAAU,CACTJ,IAAK,CAAC,GAAI,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QA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B,OALIpB,IACHL,EAAO,GAAKP,EAAUI,GAAKJ,EAAUI,GAAKvB,EAAQM,SAASW,GAAUM,IAAMpB,EFvK1D,MAEC,SEqK6F,IAAduB,EAAO,GFnKrF,GAUJ,MAfI,UE4KbR,EAAmBQ,EFhKL,WEgKcR,EAAoB,CACtDmC,MAAO3B,EAAO,GACdzB,OAAQyB,EAAO,GACfN,SAAUG,EACV+B,KAAM1B,GACHF,EAAO6B,KAAKxC,GAIjBR,EAASiD,QAAUC,GAAOjD,GAAOD,EAASC,EAAKiD"} \ No newline at end of file diff --git a/node_modules/filesize/lib/filesize.js b/node_modules/filesize/lib/filesize.js deleted file mode 100644 index 5bb3fe2c..00000000 --- a/node_modules/filesize/lib/filesize.js +++ /dev/null @@ -1,243 +0,0 @@ -/** - * filesize - * - * @copyright 2022 Jason Mulligan - * @license BSD-3-Clause - * @version 9.0.11 - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.filesize = factory()); -})(this, (function () { 'use strict'; - - function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); - } - - var ARRAY = "array"; - var BIT = "bit"; - var BITS = "bits"; - var BYTE = "byte"; - var BYTES = "bytes"; - var EMPTY = ""; - var EXPONENT = "exponent"; - var FUNCTION = "function"; - var IEC = "iec"; - var INVALID_NUMBER = "Invalid number"; - var INVALID_ROUND = "Invalid rounding method"; - var JEDEC = "jedec"; - var OBJECT = "object"; - var PERIOD = "."; - var ROUND = "round"; - var S = "s"; - var SI_KBIT = "kbit"; - var SI_KBYTE = "kB"; - var SPACE = " "; - var STRING = "string"; - var ZERO = "0"; - - var strings = { - symbol: { - iec: { - bits: ["bit", "Kibit", "Mibit", "Gibit", "Tibit", "Pibit", "Eibit", "Zibit", "Yibit"], - bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] - }, - jedec: { - bits: ["bit", "Kbit", "Mbit", "Gbit", "Tbit", "Pbit", "Ebit", "Zbit", "Ybit"], - bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"] - } - }, - fullform: { - iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"], - jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"] - } - }; - - /** - * filesize - * - * @method filesize - * @param {Mixed} arg String, Int or Float to transform - * @param {Object} descriptor [Optional] Flags - * @return {String} Readable file size String - */ - - function filesize(arg) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$bits = _ref.bits, - bits = _ref$bits === void 0 ? false : _ref$bits, - _ref$pad = _ref.pad, - pad = _ref$pad === void 0 ? false : _ref$pad, - _ref$base = _ref.base, - base = _ref$base === void 0 ? -1 : _ref$base, - _ref$round = _ref.round, - round = _ref$round === void 0 ? 2 : _ref$round, - _ref$locale = _ref.locale, - locale = _ref$locale === void 0 ? EMPTY : _ref$locale, - _ref$localeOptions = _ref.localeOptions, - localeOptions = _ref$localeOptions === void 0 ? {} : _ref$localeOptions, - _ref$separator = _ref.separator, - separator = _ref$separator === void 0 ? EMPTY : _ref$separator, - _ref$spacer = _ref.spacer, - spacer = _ref$spacer === void 0 ? SPACE : _ref$spacer, - _ref$symbols = _ref.symbols, - symbols = _ref$symbols === void 0 ? {} : _ref$symbols, - _ref$standard = _ref.standard, - standard = _ref$standard === void 0 ? EMPTY : _ref$standard, - _ref$output = _ref.output, - output = _ref$output === void 0 ? STRING : _ref$output, - _ref$fullform = _ref.fullform, - fullform = _ref$fullform === void 0 ? false : _ref$fullform, - _ref$fullforms = _ref.fullforms, - fullforms = _ref$fullforms === void 0 ? [] : _ref$fullforms, - _ref$exponent = _ref.exponent, - exponent = _ref$exponent === void 0 ? -1 : _ref$exponent, - _ref$roundingMethod = _ref.roundingMethod, - roundingMethod = _ref$roundingMethod === void 0 ? ROUND : _ref$roundingMethod, - _ref$precision = _ref.precision, - precision = _ref$precision === void 0 ? 0 : _ref$precision; - - var e = exponent, - num = Number(arg), - result = [], - val = 0, - u = EMPTY; // Sync base & standard - - if (base === -1 && standard.length === 0) { - base = 10; - standard = JEDEC; - } else if (base === -1 && standard.length > 0) { - standard = standard === IEC ? IEC : JEDEC; - base = standard === IEC ? 2 : 10; - } else { - base = base === 2 ? 2 : 10; - standard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC; - } - - var ceil = base === 10 ? 1000 : 1024, - full = fullform === true, - neg = num < 0, - roundingFunc = Math[roundingMethod]; - - if (isNaN(arg)) { - throw new TypeError(INVALID_NUMBER); - } - - if (_typeof(roundingFunc) !== FUNCTION) { - throw new TypeError(INVALID_ROUND); - } // Flipping a negative number to determine the size - - - if (neg) { - num = -num; - } // Determining the exponent - - - if (e === -1 || isNaN(e)) { - e = Math.floor(Math.log(num) / Math.log(ceil)); - - if (e < 0) { - e = 0; - } - } // Exceeding supported length, time to reduce & multiply - - - if (e > 8) { - if (precision > 0) { - precision += 8 - e; - } - - e = 8; - } - - if (output === EXPONENT) { - return e; - } // Zero is now a special case because bytes divide by 1 - - - if (num === 0) { - result[0] = 0; - u = result[1] = strings.symbol[standard][bits ? BITS : BYTES][e]; - } else { - val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e)); - - if (bits) { - val = val * 8; - - if (val >= ceil && e < 8) { - val = val / ceil; - e++; - } - } - - var p = Math.pow(10, e > 0 ? round : 0); - result[0] = roundingFunc(val * p) / p; - - if (result[0] === ceil && e < 8 && exponent === -1) { - result[0] = 1; - e++; - } - - u = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : strings.symbol[standard][bits ? BITS : BYTES][e]; - } // Decorating a 'diff' - - - if (neg) { - result[0] = -result[0]; - } // Setting optional precision - - - if (precision > 0) { - result[0] = result[0].toPrecision(precision); - } // Applying custom symbol - - - result[1] = symbols[result[1]] || result[1]; - - if (locale === true) { - result[0] = result[0].toLocaleString(); - } else if (locale.length > 0) { - result[0] = result[0].toLocaleString(locale, localeOptions); - } else if (separator.length > 0) { - result[0] = result[0].toString().replace(PERIOD, separator); - } - - if (pad && Number.isInteger(result[0]) === false && round > 0) { - var x = separator || PERIOD, - tmp = result[0].toString().split(x), - s = tmp[1] || EMPTY, - l = s.length, - n = round - l; - result[0] = "".concat(tmp[0]).concat(x).concat(s.padEnd(l + n, ZERO)); - } - - if (full) { - result[1] = fullforms[e] ? fullforms[e] : strings.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S); - } // Returning Array, Object, or String (default) - - - return output === ARRAY ? result : output === OBJECT ? { - value: result[0], - symbol: result[1], - exponent: e, - unit: u - } : result.join(spacer); - } // Partial application for functional programming - - - filesize.partial = function (opt) { - return function (arg) { - return filesize(arg, opt); - }; - }; - - return filesize; - -})); diff --git a/node_modules/filesize/lib/filesize.min.js b/node_modules/filesize/lib/filesize.min.js deleted file mode 100644 index 3d470e59..00000000 --- a/node_modules/filesize/lib/filesize.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - 2022 Jason Mulligan - @version 9.0.11 -*/ -!function(i,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(i="undefined"!=typeof globalThis?globalThis:i||self).filesize=t()}(this,(function(){"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(i){return typeof i}:function(i){return i&&"function"==typeof Symbol&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},i(t)}var t="array",o="bits",e="byte",n="bytes",r="",b="exponent",l="function",a="iec",d="Invalid number",f="Invalid rounding method",u="jedec",s="object",c=".",p="round",y="kbit",m="string",v={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function g(g){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},B=h.bits,M=void 0!==B&&B,S=h.pad,T=void 0!==S&&S,w=h.base,x=void 0===w?-1:w,E=h.round,j=void 0===E?2:E,N=h.locale,P=void 0===N?r:N,k=h.localeOptions,G=void 0===k?{}:k,K=h.separator,Y=void 0===K?r:K,Z=h.spacer,z=void 0===Z?" ":Z,I=h.symbols,L=void 0===I?{}:I,O=h.standard,q=void 0===O?r:O,A=h.output,C=void 0===A?m:A,D=h.fullform,F=void 0!==D&&D,H=h.fullforms,J=void 0===H?[]:H,Q=h.exponent,R=void 0===Q?-1:Q,U=h.roundingMethod,V=void 0===U?p:U,W=h.precision,X=void 0===W?0:W,$=R,_=Number(g),ii=[],ti=0,oi=r;-1===x&&0===q.length?(x=10,q=u):-1===x&&q.length>0?x=(q=q===a?a:u)===a?2:10:q=10===(x=2===x?2:10)||q===u?u:a;var ei=10===x?1e3:1024,ni=!0===F,ri=_<0,bi=Math[V];if(isNaN(g))throw new TypeError(d);if(i(bi)!==l)throw new TypeError(f);if(ri&&(_=-_),(-1===$||isNaN($))&&($=Math.floor(Math.log(_)/Math.log(ei)))<0&&($=0),$>8&&(X>0&&(X+=8-$),$=8),C===b)return $;if(0===_)ii[0]=0,oi=ii[1]=v.symbol[q][M?o:n][$];else{ti=_/(2===x?Math.pow(2,10*$):Math.pow(1e3,$)),M&&(ti*=8)>=ei&&$<8&&(ti/=ei,$++);var li=Math.pow(10,$>0?j:0);ii[0]=bi(ti*li)/li,ii[0]===ei&&$<8&&-1===R&&(ii[0]=1,$++),oi=ii[1]=10===x&&1===$?M?y:"kB":v.symbol[q][M?o:n][$]}if(ri&&(ii[0]=-ii[0]),X>0&&(ii[0]=ii[0].toPrecision(X)),ii[1]=L[ii[1]]||ii[1],!0===P?ii[0]=ii[0].toLocaleString():P.length>0?ii[0]=ii[0].toLocaleString(P,G):Y.length>0&&(ii[0]=ii[0].toString().replace(c,Y)),T&&!1===Number.isInteger(ii[0])&&j>0){var ai=Y||c,di=ii[0].toString().split(ai),fi=di[1]||r,ui=fi.length,si=j-ui;ii[0]="".concat(di[0]).concat(ai).concat(fi.padEnd(ui+si,"0"))}return ni&&(ii[1]=J[$]?J[$]:v.fullform[q][$]+(M?"bit":e)+(1===ii[0]?r:"s")),C===t?ii:C===s?{value:ii[0],symbol:ii[1],exponent:$,unit:oi}:ii.join(z)}return g.partial=function(i){return function(t){return g(t,i)}},g})); -//# sourceMappingURL=filesize.min.js.map diff --git a/node_modules/filesize/lib/filesize.min.js.map b/node_modules/filesize/lib/filesize.min.js.map deleted file mode 100644 index 9cb41701..00000000 --- a/node_modules/filesize/lib/filesize.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filesize.min.js","sources":["../src/constants.js","../src/strings.js","../src/filesize.js"],"sourcesContent":["\"use strict\";\n\nexport const ARRAY = \"array\";\nexport const BIT = \"bit\";\nexport const BITS = \"bits\";\nexport const BYTE = \"byte\";\nexport const BYTES = \"bytes\";\nexport const EMPTY = \"\";\nexport const EXPONENT = \"exponent\";\nexport const FUNCTION = \"function\";\nexport const IEC = \"iec\";\nexport const INVALID_NUMBER = \"Invalid number\";\nexport const INVALID_ROUND = \"Invalid rounding method\";\nexport const JEDEC = \"jedec\";\nexport const OBJECT = \"object\";\nexport const PERIOD = \".\";\nexport const ROUND = \"round\";\nexport const S = \"s\";\nexport const SI_KBIT = \"kbit\";\nexport const SI_KBYTE = \"kB\";\nexport const SPACE = \" \";\nexport const STRING = \"string\";\nexport const ZERO = \"0\";\n","\"use strict\";\n\nexport const strings = {\n\tsymbol: {\n\t\tiec: {\n\t\t\tbits: [\"bit\", \"Kibit\", \"Mibit\", \"Gibit\", \"Tibit\", \"Pibit\", \"Eibit\", \"Zibit\", \"Yibit\"],\n\t\t\tbytes: [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\", \"EiB\", \"ZiB\", \"YiB\"]\n\t\t},\n\t\tjedec: {\n\t\t\tbits: [\"bit\", \"Kbit\", \"Mbit\", \"Gbit\", \"Tbit\", \"Pbit\", \"Ebit\", \"Zbit\", \"Ybit\"],\n\t\t\tbytes: [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"]\n\t\t}\n\t},\n\tfullform: {\n\t\tiec: [\"\", \"kibi\", \"mebi\", \"gibi\", \"tebi\", \"pebi\", \"exbi\", \"zebi\", \"yobi\"],\n\t\tjedec: [\"\", \"kilo\", \"mega\", \"giga\", \"tera\", \"peta\", \"exa\", \"zetta\", \"yotta\"]\n\t}\n};\n","\"use strict\";\n\nimport {\n\tARRAY,\n\tBIT,\n\tBITS,\n\tBYTE,\n\tBYTES,\n\tEMPTY,\n\tEXPONENT,\n\tFUNCTION,\n\tIEC,\n\tINVALID_NUMBER,\n\tINVALID_ROUND,\n\tJEDEC,\n\tOBJECT,\n\tPERIOD,\n\tROUND,\n\tS,\n\tSI_KBIT,\n\tSI_KBYTE,\n\tSPACE,\n\tSTRING,\n\tZERO\n} from \"./constants\";\nimport {strings} from \"./strings\";\n\n/**\n * filesize\n *\n * @method filesize\n * @param {Mixed} arg String, Int or Float to transform\n * @param {Object} descriptor [Optional] Flags\n * @return {String} Readable file size String\n */\nfunction filesize (arg, {\n\tbits = false,\n\tpad = false,\n\tbase = -1,\n\tround = 2,\n\tlocale = EMPTY,\n\tlocaleOptions = {},\n\tseparator = EMPTY,\n\tspacer = SPACE,\n\tsymbols = {},\n\tstandard = EMPTY,\n\toutput = STRING,\n\tfullform = false,\n\tfullforms = [],\n\texponent = -1,\n\troundingMethod = ROUND,\n\tprecision = 0\n} = {}) {\n\tlet e = exponent,\n\t\tnum = Number(arg),\n\t\tresult = [],\n\t\tval = 0,\n\t\tu = EMPTY;\n\n\t// Sync base & standard\n\tif (base === -1 && standard.length === 0) {\n\t\tbase = 10;\n\t\tstandard = JEDEC;\n\t} else if (base === -1 && standard.length > 0) {\n\t\tstandard = standard === IEC ? IEC : JEDEC;\n\t\tbase = standard === IEC ? 2 : 10;\n\t} else {\n\t\tbase = base === 2 ? 2 : 10;\n\t\tstandard = base === 10 ? JEDEC : standard === JEDEC ? JEDEC : IEC;\n\t}\n\n\tconst ceil = base === 10 ? 1000 : 1024,\n\t\tfull = fullform === true,\n\t\tneg = num < 0,\n\t\troundingFunc = Math[roundingMethod];\n\n\tif (isNaN(arg)) {\n\t\tthrow new TypeError(INVALID_NUMBER);\n\t}\n\n\tif (typeof roundingFunc !== FUNCTION) {\n\t\tthrow new TypeError(INVALID_ROUND);\n\t}\n\n\t// Flipping a negative number to determine the size\n\tif (neg) {\n\t\tnum = -num;\n\t}\n\n\t// Determining the exponent\n\tif (e === -1 || isNaN(e)) {\n\t\te = Math.floor(Math.log(num) / Math.log(ceil));\n\n\t\tif (e < 0) {\n\t\t\te = 0;\n\t\t}\n\t}\n\n\t// Exceeding supported length, time to reduce & multiply\n\tif (e > 8) {\n\t\tif (precision > 0) {\n\t\t\tprecision += 8 - e;\n\t\t}\n\n\t\te = 8;\n\t}\n\n\tif (output === EXPONENT) {\n\t\treturn e;\n\t}\n\n\t// Zero is now a special case because bytes divide by 1\n\tif (num === 0) {\n\t\tresult[0] = 0;\n\t\tu = result[1] = strings.symbol[standard][bits ? BITS : BYTES][e];\n\t} else {\n\t\tval = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));\n\n\t\tif (bits) {\n\t\t\tval = val * 8;\n\n\t\t\tif (val >= ceil && e < 8) {\n\t\t\t\tval = val / ceil;\n\t\t\t\te++;\n\t\t\t}\n\t\t}\n\n\t\tconst p = Math.pow(10, e > 0 ? round : 0);\n\t\tresult[0] = roundingFunc(val * p) / p;\n\n\t\tif (result[0] === ceil && e < 8 && exponent === -1) {\n\t\t\tresult[0] = 1;\n\t\t\te++;\n\t\t}\n\n\t\tu = result[1] = base === 10 && e === 1 ? bits ? SI_KBIT : SI_KBYTE : strings.symbol[standard][bits ? BITS : BYTES][e];\n\t}\n\n\t// Decorating a 'diff'\n\tif (neg) {\n\t\tresult[0] = -result[0];\n\t}\n\n\t// Setting optional precision\n\tif (precision > 0) {\n\t\tresult[0] = result[0].toPrecision(precision);\n\t}\n\n\t// Applying custom symbol\n\tresult[1] = symbols[result[1]] || result[1];\n\n\tif (locale === true) {\n\t\tresult[0] = result[0].toLocaleString();\n\t} else if (locale.length > 0) {\n\t\tresult[0] = result[0].toLocaleString(locale, localeOptions);\n\t} else if (separator.length > 0) {\n\t\tresult[0] = result[0].toString().replace(PERIOD, separator);\n\t}\n\n\tif (pad && Number.isInteger(result[0]) === false && round > 0) {\n\t\tconst x = separator || PERIOD,\n\t\t\ttmp = result[0].toString().split(x),\n\t\t\ts = tmp[1] || EMPTY,\n\t\t\tl = s.length,\n\t\t\tn = round - l;\n\n\t\tresult[0] = `${tmp[0]}${x}${s.padEnd(l + n, ZERO)}`;\n\t}\n\n\tif (full) {\n\t\tresult[1] = fullforms[e] ? fullforms[e] : strings.fullform[standard][e] + (bits ? BIT : BYTE) + (result[0] === 1 ? EMPTY : S);\n\t}\n\n\t// Returning Array, Object, or String (default)\n\treturn output === ARRAY ? result : output === OBJECT ? {\n\t\tvalue: result[0],\n\t\tsymbol: result[1],\n\t\texponent: e,\n\t\tunit: u\n\t} : result.join(spacer);\n}\n\n// Partial application for functional programming\nfilesize.partial = opt => arg => filesize(arg, opt);\n\nexport default filesize;\n"],"names":["ARRAY","BITS","BYTE","BYTES","EMPTY","EXPONENT","FUNCTION","IEC","INVALID_NUMBER","INVALID_ROUND","JEDEC","OBJECT","PERIOD","ROUND","SI_KBIT","STRING","strings","symbol","iec","bits","bytes","jedec","fullform","filesize","arg","_ref","arguments","length","undefined","_ref$bits","_ref$pad","pad","_ref$base","base","_ref$round","round","_ref$locale","locale","_ref$localeOptions","localeOptions","_ref$separator","separator","_ref$spacer","spacer","_ref$symbols","symbols","_ref$standard","standard","_ref$output","output","_ref$fullform","_ref$fullforms","fullforms","_ref$exponent","exponent","_ref$roundingMethod","roundingMethod","_ref$precision","precision","e","num","Number","result","val","u","ceil","full","neg","roundingFunc","Math","isNaN","TypeError","_typeof","floor","log","pow","p","toPrecision","toLocaleString","toString","replace","isInteger","x","tmp","split","s","l","n","concat","padEnd","value","unit","join","partial","opt"],"mappings":";;;;+cAEO,IAAMA,EAAQ,QAERC,EAAO,OACPC,EAAO,OACPC,EAAQ,QACRC,EAAQ,GACRC,EAAW,WACXC,EAAW,WACXC,EAAM,MACNC,EAAiB,iBACjBC,EAAgB,0BAChBC,EAAQ,QACRC,EAAS,SACTC,EAAS,IACTC,EAAQ,QAERC,EAAU,OAGVC,EAAS,SCnBTC,EAAU,CACtBC,OAAQ,CACPC,IAAK,CACJC,KAAM,CAAC,MAAO,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,SAC7EC,MAAO,CAAC,IAAK,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,QAE/DC,MAAO,CACNF,KAAM,CAAC,MAAO,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QACtEC,MAAO,CAAC,IAAK,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,QAGzDE,SAAU,CACTJ,IAAK,CAAC,GAAI,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QAClEG,MAAO,CAAC,GAAI,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,MAAO,QAAS,WCoBtE,SAASE,EAAUC,GAiBX,IAAAC,EAAAC,UAAAC,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,QAAQpE,EAAQ6B,IAG9CV,IAAuC,IAAhC8B,OAAOoB,UAAUnB,GAAO,KAAiB3B,EAAQ,EAAG,CAC9D,IAAM+C,GAAIzC,GAAa7B,EACtBuE,GAAMrB,GAAO,GAAGiB,WAAWK,MAAMF,IACjCG,GAAIF,GAAI,IAAM/E,EACdkF,GAAID,GAAE1D,OACN4D,GAAIpD,EAAQmD,GAEbxB,GAAO,GAAP,GAAA0B,OAAeL,GAAI,IAAKD,OAAAA,WAAIG,GAAEI,OAAOH,GAAIC,GFhJvB,MEwJnB,OALIrB,KACHJ,GAAO,GAAKV,EAAUO,GAAKP,EAAUO,GAAK3C,EAAQM,SAASyB,GAAUY,IAAMxC,EFvK1D,MEuKuEjB,IAAuB,IAAd4D,GAAO,GAAW1D,EFzJpG,ME6JT6C,IAAWjD,EAAQ8D,GAASb,IAAWtC,EAAS,CACtD+E,MAAO5B,GAAO,GACd7C,OAAQ6C,GAAO,GACfR,SAAUK,EACVgC,KAAM3B,IACHF,GAAO8B,KAAKjD,UAIjBpB,EAASsE,QAAU,SAAAC,GAAG,OAAI,SAAAtE,GAAG,OAAID,EAASC,EAAKsE"} \ No newline at end of file diff --git a/node_modules/filesize/package.json b/node_modules/filesize/package.json index 02c42ed4..347c69cf 100644 --- a/node_modules/filesize/package.json +++ b/node_modules/filesize/package.json @@ -1,55 +1,55 @@ -{ - "name": "filesize", - "description": "JavaScript library to generate a human readable String describing the file size", - "version": "9.0.11", - "homepage": "https://filesizejs.com", - "author": "Jason Mulligan ", - "repository": { - "type": "git", - "url": "git://github.com/avoidwork/filesize.js.git" - }, - "bugs": { - "url": "https://github.com/avoidwork/filesize.js/issues" - }, - "files": [ - "lib", - "*.d.ts" - ], - "license": "BSD-3-Clause", - "browser": "lib/filesize.min.js", - "main": "lib/filesize.js", - "module": "lib/filesize.esm.js", - "types": "filesize.d.ts", - "engines": { - "node": ">= 0.4.0" - }, - "scripts": { - "build": "rollup -c", - "watch": "rollup -c -w", - "changelog": "auto-changelog -p", - "test": "npm run build && npm run lint && npm run test:unit && npm run test:type", - "test:unit": "nodeunit test/filesize_test.js", - "test:type": "tsc -p test", - "lint": "eslint test/*.js src/*.js" - }, - "devDependencies": { - "@babel/core": "^7.18.5", - "@babel/preset-env": "^7.18.2", - "auto-changelog": "^2.4.0", - "eslint": "^8.17.0", - "nodeunit-x": "^0.15.0", - "rollup": "^2.75.6", - "rollup-plugin-babel": "^4.4.0", - "rollup-plugin-terser": "^7.0.2", - "typescript": "^4.7.3" - }, - "keywords": [ - "file", - "filesize", - "size", - "readable", - "file system", - "bytes", - "diff" - ] -} +{ + "name": "filesize", + "description": "JavaScript library to generate a human readable String describing the file size", + "version": "10.0.7", + "homepage": "https://filesizejs.com", + "author": "Jason Mulligan ", + "repository": { + "type": "git", + "url": "git://github.com/avoidwork/filesize.js.git" + }, + "bugs": { + "url": "https://github.com/avoidwork/filesize.js/issues" + }, + "files": [ + "dist", + "types" + ], + "license": "BSD-3-Clause", + "main": "dist/filesize.cjs", + "module": "dist/filesize.esm.js", + "types": "types/filesize.d.ts", + "type": "module", + "sourceType": "module", + "engines": { + "node": ">= 10.4.0" + }, + "scripts": { + "build": "npm run rollup", + "changelog": "auto-changelog -p", + "coverage": "nyc npm run test", + "lint": "eslint *.js src/*.js test/*.js", + "mocha": "mocha test/*.js", + "rollup": "rollup --config", + "test": "npm run lint && npm run mocha", + "test-webpack": "mkdir -p test/webpack && rm -rf test/webpack/* && git clone git@github.com:rabelais88/typescript-webpack.git test/webpack && echo \"import { filesize } from 'filesize';console.log(filesize(1234));\" >> test/webpack/src/index.ts && cd test/webpack && npm install && mkdir -p node_modules/filesize/dist && cp ../../package.json node_modules/filesize/ && cp ../../dist/* node_modules/filesize/dist/ && npm run build", + "types": "npx -p typescript tsc src/*.js --declaration --allowJs --emitDeclarationOnly --outDir types" + }, + "devDependencies": { + "@rollup/plugin-terser": "^0.4.0", + "auto-changelog": "^2.4.0", + "eslint": "^8.37.0", + "mocha": "^10.2.0", + "rollup": "^3.20.2", + "typescript": "^5.0.2" + }, + "keywords": [ + "file", + "filesize", + "size", + "readable", + "file system", + "bytes", + "diff" + ] +} diff --git a/node_modules/filesize/types/constants.d.ts b/node_modules/filesize/types/constants.d.ts new file mode 100644 index 00000000..2fffea6f --- /dev/null +++ b/node_modules/filesize/types/constants.d.ts @@ -0,0 +1,41 @@ +export const ARRAY: "array"; +export const BIT: "bit"; +export const BITS: "bits"; +export const BYTE: "byte"; +export const BYTES: "bytes"; +export const EMPTY: ""; +export const EXPONENT: "exponent"; +export const FUNCTION: "function"; +export const IEC: "iec"; +export const INVALID_NUMBER: "Invalid number"; +export const INVALID_ROUND: "Invalid rounding method"; +export const JEDEC: "jedec"; +export const OBJECT: "object"; +export const PERIOD: "."; +export const ROUND: "round"; +export const S: "s"; +export const SI_KBIT: "kbit"; +export const SI_KBYTE: "kB"; +export const SPACE: " "; +export const STRING: "string"; +export const ZERO: "0"; +export namespace STRINGS { + namespace symbol { + namespace iec { + const bits: string[]; + const bytes: string[]; + } + namespace jedec { + const bits_1: string[]; + export { bits_1 as bits }; + const bytes_1: string[]; + export { bytes_1 as bytes }; + } + } + namespace fullform { + const iec_1: string[]; + export { iec_1 as iec }; + const jedec_1: string[]; + export { jedec_1 as jedec }; + } +} diff --git a/node_modules/filesize/types/filesize.d.ts b/node_modules/filesize/types/filesize.d.ts new file mode 100644 index 00000000..809626e5 --- /dev/null +++ b/node_modules/filesize/types/filesize.d.ts @@ -0,0 +1,46 @@ +export function filesize(arg: any, { bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision }?: { + bits?: boolean; + pad?: boolean; + base?: number; + round?: number; + locale?: string; + localeOptions?: {}; + separator?: string; + spacer?: string; + symbols?: {}; + standard?: string; + output?: string; + fullform?: boolean; + fullforms?: any[]; + exponent?: number; + roundingMethod?: string; + precision?: number; +}): string | number | any[] | { + value: any; + symbol: any; + exponent: number; + unit: string; +}; +export function partial({ bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision }?: { + bits?: boolean; + pad?: boolean; + base?: number; + round?: number; + locale?: string; + localeOptions?: {}; + separator?: string; + spacer?: string; + symbols?: {}; + standard?: string; + output?: string; + fullform?: boolean; + fullforms?: any[]; + exponent?: number; + roundingMethod?: string; + precision?: number; +}): (arg: any) => string | number | any[] | { + value: any; + symbol: any; + exponent: number; + unit: string; +}; diff --git a/node_modules/node-fetch/README.md b/node_modules/node-fetch/README.md index 2dde7428..4f87a59a 100644 --- a/node_modules/node-fetch/README.md +++ b/node_modules/node-fetch/README.md @@ -188,6 +188,49 @@ fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') }); ``` +In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch +errors -- the longer a response runs, the more likely it is to encounter an error. + +```js +const fetch = require('node-fetch'); +const response = await fetch('https://httpbin.org/stream/3'); +try { + for await (const chunk of response.body) { + console.dir(JSON.parse(chunk.toString())); + } +} catch (err) { + console.error(err.stack); +} +``` + +In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams +did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors +directly from the stream and wait on it response to fully close. + +```js +const fetch = require('node-fetch'); +const read = async body => { + let error; + body.on('error', err => { + error = err; + }); + for await (const chunk of body) { + console.dir(JSON.parse(chunk.toString())); + } + return new Promise((resolve, reject) => { + body.on('close', () => { + error ? reject(error) : resolve(); + }); + }); +}; +try { + const response = await fetch('https://httpbin.org/stream/3'); + await read(response.body); +} catch (err) { + console.error(err.stack); +} +``` + #### Buffer If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API) diff --git a/node_modules/node-fetch/browser.js b/node_modules/node-fetch/browser.js index 83c54c58..ee86265a 100644 --- a/node_modules/node-fetch/browser.js +++ b/node_modules/node-fetch/browser.js @@ -11,15 +11,15 @@ var getGlobal = function () { throw new Error('unable to locate global object'); } -var global = getGlobal(); +var globalObject = getGlobal(); -module.exports = exports = global.fetch; +module.exports = exports = globalObject.fetch; // Needed for TypeScript and Webpack. -if (global.fetch) { - exports.default = global.fetch.bind(global); +if (globalObject.fetch) { + exports.default = globalObject.fetch.bind(globalObject); } -exports.Headers = global.Headers; -exports.Request = global.Request; -exports.Response = global.Response; \ No newline at end of file +exports.Headers = globalObject.Headers; +exports.Request = globalObject.Request; +exports.Response = globalObject.Response; diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js index 4852f7cb..79d717be 100644 --- a/node_modules/node-fetch/lib/index.es.js +++ b/node_modules/node-fetch/lib/index.es.js @@ -1413,6 +1413,20 @@ const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); }; +/** + * isSameProtocol reports whether the two provided URLs use the same protocol. + * + * Both domains must already be in canonical form. + * @param {string|URL} original + * @param {string|URL} destination + */ +const isSameProtocol = function isSameProtocol(destination, original) { + const orig = new URL$1(original).protocol; + const dest = new URL$1(destination).protocol; + + return orig === dest; +}; + /** * Fetch function * @@ -1444,7 +1458,7 @@ function fetch(url, opts) { let error = new AbortError('The user aborted a request.'); reject(error); if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); + destroyStream(request.body, error); } if (!response || !response.body) return; response.body.emit('error', error); @@ -1485,9 +1499,43 @@ function fetch(url, opts) { req.on('error', function (err) { reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + + if (response && response.body) { + destroyStream(response.body, err); + } + finalize(); }); + fixResponseChunkedTransferBadEnding(req, function (err) { + if (signal && signal.aborted) { + return; + } + + if (response && response.body) { + destroyStream(response.body, err); + } + }); + + /* c8 ignore next 18 */ + if (parseInt(process.version.substring(1)) < 14) { + // Before Node.js 14, pipeline() does not fully support async iterators and does not always + // properly handle when the socket close/end events are out of order. + req.on('socket', function (s) { + s.addListener('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = s.listenerCount('data') > 0; + + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } + req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1559,7 +1607,7 @@ function fetch(url, opts) { size: request.size }; - if (!isDomainOrSubdomain(request.url, locationURL)) { + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { requestOpts.headers.delete(name); } @@ -1652,6 +1700,13 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); return; } @@ -1671,6 +1726,41 @@ function fetch(url, opts) { writeToStream(req, request); }); } +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; + + request.on('socket', function (s) { + socket = s; + }); + + request.on('response', function (response) { + const headers = response.headers; + + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket.listenerCount('data') > 0; + + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); +} + +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } +} + /** * Redirect code matching * diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js index e5b04f10..337d6e52 100644 --- a/node_modules/node-fetch/lib/index.js +++ b/node_modules/node-fetch/lib/index.js @@ -1417,6 +1417,20 @@ const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); }; +/** + * isSameProtocol reports whether the two provided URLs use the same protocol. + * + * Both domains must already be in canonical form. + * @param {string|URL} original + * @param {string|URL} destination + */ +const isSameProtocol = function isSameProtocol(destination, original) { + const orig = new URL$1(original).protocol; + const dest = new URL$1(destination).protocol; + + return orig === dest; +}; + /** * Fetch function * @@ -1448,7 +1462,7 @@ function fetch(url, opts) { let error = new AbortError('The user aborted a request.'); reject(error); if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); + destroyStream(request.body, error); } if (!response || !response.body) return; response.body.emit('error', error); @@ -1489,9 +1503,43 @@ function fetch(url, opts) { req.on('error', function (err) { reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + + if (response && response.body) { + destroyStream(response.body, err); + } + finalize(); }); + fixResponseChunkedTransferBadEnding(req, function (err) { + if (signal && signal.aborted) { + return; + } + + if (response && response.body) { + destroyStream(response.body, err); + } + }); + + /* c8 ignore next 18 */ + if (parseInt(process.version.substring(1)) < 14) { + // Before Node.js 14, pipeline() does not fully support async iterators and does not always + // properly handle when the socket close/end events are out of order. + req.on('socket', function (s) { + s.addListener('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = s.listenerCount('data') > 0; + + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } + req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1563,7 +1611,7 @@ function fetch(url, opts) { size: request.size }; - if (!isDomainOrSubdomain(request.url, locationURL)) { + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { requestOpts.headers.delete(name); } @@ -1656,6 +1704,13 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); return; } @@ -1675,6 +1730,41 @@ function fetch(url, opts) { writeToStream(req, request); }); } +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; + + request.on('socket', function (s) { + socket = s; + }); + + request.on('response', function (response) { + const headers = response.headers; + + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket.listenerCount('data') > 0; + + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); +} + +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } +} + /** * Redirect code matching * diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs index 49ee05ec..ace669fd 100644 --- a/node_modules/node-fetch/lib/index.mjs +++ b/node_modules/node-fetch/lib/index.mjs @@ -1411,6 +1411,20 @@ const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); }; +/** + * isSameProtocol reports whether the two provided URLs use the same protocol. + * + * Both domains must already be in canonical form. + * @param {string|URL} original + * @param {string|URL} destination + */ +const isSameProtocol = function isSameProtocol(destination, original) { + const orig = new URL$1(original).protocol; + const dest = new URL$1(destination).protocol; + + return orig === dest; +}; + /** * Fetch function * @@ -1442,7 +1456,7 @@ function fetch(url, opts) { let error = new AbortError('The user aborted a request.'); reject(error); if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); + destroyStream(request.body, error); } if (!response || !response.body) return; response.body.emit('error', error); @@ -1483,9 +1497,43 @@ function fetch(url, opts) { req.on('error', function (err) { reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + + if (response && response.body) { + destroyStream(response.body, err); + } + finalize(); }); + fixResponseChunkedTransferBadEnding(req, function (err) { + if (signal && signal.aborted) { + return; + } + + if (response && response.body) { + destroyStream(response.body, err); + } + }); + + /* c8 ignore next 18 */ + if (parseInt(process.version.substring(1)) < 14) { + // Before Node.js 14, pipeline() does not fully support async iterators and does not always + // properly handle when the socket close/end events are out of order. + req.on('socket', function (s) { + s.addListener('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = s.listenerCount('data') > 0; + + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } + req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1557,7 +1605,7 @@ function fetch(url, opts) { size: request.size }; - if (!isDomainOrSubdomain(request.url, locationURL)) { + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { requestOpts.headers.delete(name); } @@ -1650,6 +1698,13 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); return; } @@ -1669,6 +1724,41 @@ function fetch(url, opts) { writeToStream(req, request); }); } +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; + + request.on('socket', function (s) { + socket = s; + }); + + request.on('response', function (response) { + const headers = response.headers; + + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket.listenerCount('data') > 0; + + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); +} + +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } +} + /** * Redirect code matching * diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json index 3c1bd8da..177e847d 100644 --- a/node_modules/node-fetch/package.json +++ b/node_modules/node-fetch/package.json @@ -1,6 +1,6 @@ { "name": "node-fetch", - "version": "2.6.7", + "version": "2.6.9", "description": "A light-weight module that brings window.fetch to node.js", "main": "lib/index.js", "browser": "./browser.js", @@ -39,7 +39,7 @@ "dependencies": { "whatwg-url": "^5.0.0" }, - "peerDependencies": { + "peerDependencies": { "encoding": "^0.1.0" }, "peerDependenciesMeta": { @@ -53,7 +53,9 @@ "abortcontroller-polyfill": "^1.3.0", "babel-core": "^6.26.3", "babel-plugin-istanbul": "^4.1.6", - "babel-preset-env": "^1.6.1", + "babel-plugin-transform-async-generator-functions": "^6.24.1", + "babel-polyfill": "^6.26.0", + "babel-preset-env": "1.4.0", "babel-register": "^6.16.3", "chai": "^3.5.0", "chai-as-promised": "^7.1.1", @@ -72,5 +74,16 @@ "rollup-plugin-babel": "^3.0.7", "string-to-arraybuffer": "^1.0.2", "teeny-request": "3.7.0" + }, + "release": { + "branches": [ + "+([0-9]).x", + "main", + "next", + { + "name": "beta", + "prerelease": true + } + ] } } diff --git a/package-lock.json b/package-lock.json index df15102f..9fb897ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "action-download-artifact", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -45,9 +45,9 @@ } }, "node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", "dependencies": { "tunnel": "^0.0.6" } @@ -167,9 +167,9 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -256,9 +256,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -368,309 +368,5 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" } - }, - "dependencies": { - "@actions/artifact": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.1.1.tgz", - "integrity": "sha512-Vv4y0EW0ptEkU+Pjs5RGS/0EryTvI6s79LjSV9Gg/h+O3H/ddpjhuX/Bi/HZE4pbNPyjGtQjbdFWphkZhmgabA==", - "requires": { - "@actions/core": "^1.9.1", - "@actions/http-client": "^2.0.1", - "tmp": "^0.2.1", - "tmp-promise": "^3.0.2" - } - }, - "@actions/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", - "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", - "requires": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" - } - }, - "@actions/github": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz", - "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==", - "requires": { - "@actions/http-client": "^2.0.1", - "@octokit/core": "^3.6.0", - "@octokit/plugin-paginate-rest": "^2.17.0", - "@octokit/plugin-rest-endpoint-methods": "^5.13.0" - } - }, - "@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", - "requires": { - "tunnel": "^0.0.6" - } - }, - "@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", - "requires": { - "@octokit/types": "^6.0.3" - } - }, - "@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", - "requires": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", - "requires": { - "@octokit/types": "^6.0.3", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", - "requires": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" - }, - "@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", - "requires": { - "@octokit/types": "^6.40.0" - } - }, - "@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", - "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", - "requires": { - "@octokit/types": "^6.39.0", - "deprecation": "^2.3.1" - } - }, - "@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", - "requires": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", - "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", - "universal-user-agent": "^6.0.0" - } - }, - "@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", - "requires": { - "@octokit/types": "^6.0.3", - "deprecation": "^2.0.0", - "once": "^1.4.0" - } - }, - "@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "requires": { - "@octokit/openapi-types": "^12.11.0" - } - }, - "adm-zip": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz", - "integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" - }, - "filesize": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.0.7.tgz", - "integrity": "sha512-iMRG7Qo9nayLoU3PNCiLizYtsy4W1ClrapeCwEgtiQelOAOuRJiw4QaLI+sSr8xr901dgHv+EYP2bCusGZgoiA==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "requires": { - "rimraf": "^3.0.0" - } - }, - "tmp-promise": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", - "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", - "requires": { - "tmp": "^0.2.0" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" - }, - "universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - } } }